function construirCapa(nomid,ancho,alto,iz,arr,profundidad,visibilidad,c1,c2,fondo,estilo,alentrar,alsalir)
{
	if (document.all || document.getElementById){
		document.write('<div id="'+nomid+'" style="position:absolute;width:'+ ancho +';height:'+ alto+';left:'+ iz +';top:'+ arr+';z-index:'+profundidad+'10;visibility:'+visibilidad+';')
		if (c1!="" || c2!=""){
		document.write('clip:rect(0,'+c1+','+c2+',0);')
		}
		document.write('background-color:'+fondo+'" class="'+estilo+'" onMouseover="'+alentrar+'" onMouseOut="'+alsalir+'">')
	}
	else{
		document.write('<layer name="'+nomid+'" width='+ ancho +' height='+ alto+' left='+ iz +' top='+ arr+' z-index="'+profundidad+'" visibility="'+visibilidad+'"')
		document.write('CLIP="'+c1+','+c2+'"')
		document.write('bgcolor="'+fondo+'" class="'+estilo+'" onMouseover="'+alentrar+'" onMouseOut="'+alsalir+'">')

	}

}
function cerrarCapa()
{
	if (document.all || document.getElementById){
		document.write('</div>')
	}
	else{
		document.write('</layer> ')
	}
}


function cambiarPropiedad(p1capa,p2capa,capa,propiedad,valor){
if (valor=='hide'){ valor='hidden'};
if (valor=='show'){ valor='visible'};


	if (document.all){
		eval(capa+'.style.'+propiedad+'="'+valor+'"');
	}
	else if(document.getElementById)
	{
		eval('document.getElementById("'+capa+'").style.'+propiedad+'="'+valor+'"')
	}
	else
	{
		if (p1capa=="")
		{
		 	if (p2capa=="")
		 	{
		 	//solo hay un nivel
		 		eval('document.'+capa+'.' + propiedad + '="'+ valor+'"')
		 	}
		 	else
		 	{
		 	//hay dos niveles
		 		eval('document.'+p2capa+'.document.' + capa +'.' + propiedad + '="'+ valor +'"')
		 	}
		 }
		 else
		 {
		 		//hay 3 niveles
				eval('document.'+p1capa+ '.document.'+p2capa+'.document.' + capa +'.' + propiedad + '="'+ valor +'"')
		 }
	}

}
function RollOver(op,img)
{
eval('document.'+op+'.src="'+img+'"')
}
function MoverCapaVertical(dir,limiteArr)
{
	limiteArr=-1* (alcontenido-alcontenedor)
	var altura,limiteAbj=0; 
	if (document.all)altura=parseInt(contenido.style.top);
	else if(document.getElementById)altura=parseInt(document.getElementById("contenido").style.top);
	else altura=parseInt(document.layers["contenedor"].document.layers["contenido"].top);

	if (altura<limiteArr && dir==-1)
			{
			return true;
			}

	else if (altura>limiteAbj && dir==1)
			{
			return true;
			}
	else{

	  		if (valor=='1') {
				cambiarPropiedad('','contenedor','contenido','top',altura+dir*5)
				setTimeout('MoverCapaVertical('+dir+','+limiteArr+')',10);
							}
		}
		return true;
}

function appendPuntos(cadena,tope)
{

txt=cadena;
	if (txt.length>=tope){

		document.write(txt.substring(0,tope)+ ' ...' )
	
	}
	else{

		document.write(cadena)
	}
}