var MuestraVentana
function marcos(imagen,ancho,alto,titulo) 
{
	if (MuestraVentana != null && !MuestraVentana.closed) {
		CuadroViejo = MuestraVentana;
		CuadroViejo.name = "CuadroViejo";
		CuadroViejo.close();
	 }
	MuestraVentana=window.open("","CuadroNuevo","toolbar=no,location=no, status=no,menubar=no,resizable=no,left=20,top=20,scrollbars=no,width="+ancho+",height="+alto);
	MuestraVentana.document.write("<html><head><title>"+titulo+"</title>");
	MuestraVentana.document.write("<script language=\"JavaScript\">");
	MuestraVentana.document.write("var mensaje=\"Derechos reservados por los autores. Prohibida su reproducción.\";");
	MuestraVentana.document.write("function nosepuede(A){if (document.all){if (event.button == 2) {alert(mensaje);	return false;	}}");
	MuestraVentana.document.write("if(document.layers){if(A.which == 3){alert(mensaje);return false;}	}}");
	MuestraVentana.document.write("if(document.layers){document.captureEvents(Event.MOUSEDOWN);}document.onmousedown=nosepuede;");
	MuestraVentana.document.write("</script>");
	MuestraVentana.document.write("</head><body>");
	MuestraVentana.document.write('<div style="position:absolute;width:'+ancho+'px;height:'+alto+'px;left:0px;top:0px">');
	MuestraVentana.document.write("<img src="+imagen+" alt=\""+titulo+"\"></div></body></html>");
	MuestraVentana.document.close();
	if (MuestraVentana.opener == null)	{
		MuestraVentana.opener = carolina;
	}
		MuestraVentana.opener.name = "VentanaOriginal";
        MuestraVentana.focus();
}
function closeWin()
	{
		this.close();
		MuestraVentana = null;
	}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function findObj(n, d) { //v4.01
	var p,i,x;  
	if(!d) d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
	if (!(x=d[n])&&d.all) x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for (i=0;!x&&d.layers&&i<d.layers.length;i++) 	x=findObj(n,d.layers[i].document);
	if (!x && d.getElementById) x=d.getElementById(n); 
	return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function swapImage() { //v3.0
	var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=findObj(a[i]))!=null){
		document.sr[j++]=x; 
		if (!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
	}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

///// Abre formulario para email en listados
var Ventana
function email(idcliente,extension) {
	if (!extension){
		extension="";
	}
	if (Ventana != null && !Ventana.closed) {
		Ventana.close();
	 }
	Ventana=window.open("/email"+extension+".html?idcliente="+idcliente,"VentanaNueva","toolbar=no,location=no, status=no,menubar=no,left=150,top=100,resizable=no,scrollbars=no,width=350,height=300");
	Ventana.focus();
}
<!--
function flvFSTI4(){//v1.01
this.style.filter="";}

function flvFSTI3(v1,v2){//v1.01
var v3;if (v1.filters[0]&&v1.filters[0].status==2){v1.filters[0].Stop();}if (v2==0){v3="blendTrans(Duration="+v1.STI8+")";}else {v3="revealTrans(Duration="+v1.STI8+",Transition="+(v2-1)+")";}v1.style.filter=v3;}

function flvFSTI2(){//v1.01
var v1,v2=document,v3=v2.STI4,v4;for (v4=0;v3&&v4<v3.length&&(v1=v3[v4])&&v1.STI5;v4++){if (v1.filters&&!v2.STI7){flvFSTI3(v1,v1.STI3);v1.filters[0].Apply();}v1.src=v1.STI5;if (v1.filters&&!v2.STI7){v1.filters[0].Play();}}}

function flvFSTI1(){//v1.01
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.STI1.nl/dreamweaver/)
var v1=arguments,v2=document,v3;v2.STI4=new Array();v2.STI7=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);for (var v4=0;v4<v1.length-2;v4+=5){v3=findObj(v1[v4]);if (v3){v3.STI5=v3.src;v3.STI6=v1[v4+1];v3.STI2=v1[v4+2];v3.STI3=v1[v4+3];v3.STI8=v1[v4+4];v2.STI4[v2.STI4.length]=v3;if (v3.filters&&!v2.STI7){flvFSTI3(v3,v3.STI2);v3.onfilterchange=flvFSTI4;v3.filters[0].Apply();}v3.src=v3.STI6;if (v3.filters&&!v2.STI7){v3.filters[0].Play();}}}}

function flvFTSS4(){//v1.04
this.style.filter="";}

function flvFTSS3(){//v1.04
var v1=arguments,v2=v1[0],v3=findObj(v2);if (v3&&v3.TSS1!=null){clearTimeout(v3.TSS1);}}

function flvFTSS2(){//v1.04
var v1=arguments,v2=v1[0],v3=findObj(v2),v4=v1[1],v5=v1[2],v6,v7,v8,v9,v10,v11,v12=document;if (v3&&v3.TSS6){flvFTSS3(v2);v9="flvFTSS2('"+v2+"',"+v4+","+v5+")";if (v4==1){if (!v3.TSS4.complete){v3.TSS1=setTimeout(v9,50);return;}v6=v3.TSS8+1;if (v6>v3.TSS6.length-1){if (v3.TSS9==0){return;}else {v6=0;}}else if (v6<v3.TSS6.length-1){v3.TSS4=new Image();v3.TSS4.src=v3.TSS6[v6+1][0];}}else {if (!v3.TSS2.complete){v3.TSS1=setTimeout(v9,50);return;}v6=v3.TSS8-1;if (v6<0){if (v3.TSS9==0){return;}else {v6=v3.TSS6.length-1;}}else if (v6>0){v3.TSS2=new Image();v3.TSS2.src=v3.TSS6[v6-1][0];}}v10=v3.TSS6[v6][0];v11=v3.TSS6[v6][1];v7=(v3.filters&&!v12.TSS5&&v11<25);if (v7){if (v3.filters[0]&&v3.filters[0].status==2){v3.filters[0].Stop();}if (v11==0){v8="blendTrans(Duration="+v3.TSS7+")";}else {v8="revealTrans(Duration="+v3.TSS7+",Transition="+(v11-1)+")";}v3.style.filter=v8;v3.onfilterchange=flvFTSS4;v3.filters[0].Apply();}v3.src=v10;if (v7){v3.filters[0].Play();}v3.TSS8=v6;if (v5==1){v3.TSS1=setTimeout(v9,v3.TSS3);}}}

function flvFTSS1(){//v1.04
// Copyright 2003, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var v1=arguments,v2=document,v3=v1[0],v4=findObj(v3),v5,v6;if (v4){v2.TSS5=(navigator.userAgent.toLowerCase().indexOf("mac")!=-1);v4.TSS7=v1[1]/1000;v4.TSS3=v1[2]+v1[1];v6=v1[3];v4.TSS9=v1[4];v4.TSS6=new Array();for (var v7=5;v7<v1.length;v7+=2){v4.TSS6[v4.TSS6.length]=new Array(v1[v7],v1[v7+1]);}v4.TSS8=0;v4.TSS4=new Image();v4.TSS4.src=v1[7];v4.TSS2=new Image();v4.TSS2.src=v1[v1.length-2];if (v6==1){v5="flvFTSS2('"+v3+"',1,"+v6+")";v4.TSS1=setTimeout(v5,v4.TSS3);}}}
//-->
///// Abre ventana con html dentro

var ImprimeVentana
function carolina(destino,ancho,alto,resi,scroll) {
	if (ImprimeVentana != null && !ImprimeVentana.closed) {
		VentanaVieja = ImprimeVentana;
		VentanaVieja.name = "VentanaVieja";
		VentanaVieja.close();
	 }
	ImprimeVentana=window.open(destino,"VentanaNueva","toolbar=no,location=no, status=no,menubar=no,left=0,top=0,resizable="+resi+",scrollbars="+scroll+",width="+ancho+",height="+alto);
	if (ImprimeVentana.opener == null)	{
		ImprimeVentana.opener = carolina;
	}
		ImprimeVentana.opener.name = "VentanaOriginal";
        ImprimeVentana.focus();
}
function closeWin()	{
	this.close();
	ImprimeVentana = null;
}

// IXF1.0 :: Image cross-fade 
// *****************************************************
// DOM scripting by brothercake -- http://www.brothercake.com/
//******************************************************
//global object
var ixw = { 'clock' : null, 'count' : 1 }
/*******************************************************



/*****************************************************************************
 List the images that need to be cached
*****************************************************************************/

ixw.imgs = [];

/*****************************************************************************
*****************************************************************************/



//cache the images
ixw.imgsLen = ixw.imgs.length;
ixw.cache = [];
for(var i=0; i<ixw.imgsLen; i++)
{
	ixw.cache[i] = new Image;
	ixw.cache[i].src = ixw.imgs[i];
}


//crosswipe setup function
function crosswipe()
{
	//if the timer is not already going
	if(ixw.clock == null)
	{
		//copy the image object 
		ixw.obj = arguments[0];
		
		//get its dimensions
		ixw.size = { 'w' : ixw.obj.width, 'h' : ixw.obj.height };
		
		//copy the image src argument 
		ixw.src = arguments[1];
		
		//change the image alt text if defined
		if(typeof arguments[4] != 'undefined' && arguments[4] != '')
		{
			ixw.obj.alt = arguments[4];
		}

		//if dynamic element creation is supported
		if(typeof document.createElementNS != 'undefined' || typeof document.createElement != 'undefined')
		{
			//create a new image object and append it to body
			//detecting support for namespaced element creation, in case we're in the XML DOM
			ixw.newimg = document.getElementsByTagName('body')[0].appendChild((typeof document.createElementNS != 'undefined') ? document.createElementNS('http://www.w3.org/1999/xhtml', 'img') : document.createElement('img'));

			//set positioning classname
			ixw.newimg.className = 'idupe';

			//set src to new image src
			ixw.newimg.src = ixw.src

			//move it to superimpose original image
			ixw.newimg.style.left = ixw.getRealPosition(ixw.obj, 'x') + 'px';
			ixw.newimg.style.top = ixw.getRealPosition(ixw.obj, 'y') + 'px';

			//set it to be completely hidden with clip
			ixw.newimg.style.clip = 'rect(0, 0, 0, 0)';

			//show the image 
			ixw.newimg.style.visibility = 'visible';

			//copy and convert fade duration argument 
			ixw.length = parseInt(arguments[2], 10) * 1000;

			//create fade resolution argument as 20 steps per transition
			ixw.resolution = parseInt(arguments[2], 10) * 20;

			//copy slide direction argument
			ixw.dir = arguments[3];

			//start the timer
			ixw.clock = setInterval('ixw.crosswipe()', ixw.length/ixw.resolution);
		}
		
		//otherwise if dynamic element creation is not supported
		else
		{
			//just do the image swap
			ixw.obj.src = ixw.src;
		}
		
	}
};


//crosswipe timer function
ixw.crosswipe = function()
{
	//decrease the counter on a linear scale
	ixw.count -= (1 / ixw.resolution);
	
	//if the counter has reached the bottom
	if(ixw.count < (1 / ixw.resolution))
	{
		//clear the timer
		clearInterval(ixw.clock);
		ixw.clock = null;
		
		//reset the counter
		ixw.count = 1;
		
		//set the original image to the src of the new image
		ixw.obj.src = ixw.src;
	}
	
	//animate the clip of the new image
	//using the width and height properties we saved earlier
	ixw.newimg.style.clip = 'rect('
		+ ( (/bt|bltr|brtl/.test(ixw.dir)) ? (ixw.size.h * ixw.count) : (/che|cc/.test(ixw.dir)) ? ((ixw.size.h * ixw.count) / 2) : (0) )
		+ 'px, '
		+ ( (/lr|tlbr|bltr/.test(ixw.dir)) ? (ixw.size.w - (ixw.size.w * ixw.count)) : (/cve|cc/.test(ixw.dir)) ? (ixw.size.w - ((ixw.size.w * ixw.count) / 2)) : (ixw.size.w) )
		+ 'px, '
		+ ( (/tb|tlbr|trbl/.test(ixw.dir)) ? (ixw.size.h - (ixw.size.h * ixw.count)) : (/che|cc/.test(ixw.dir)) ? (ixw.size.h - ((ixw.size.h * ixw.count) / 2)) : (ixw.size.h) )
		+ 'px, '
		+ ( (/lr|tlbr|bltr/.test(ixw.dir)) ? (0) : (/tb|bt|che/.test(ixw.dir)) ? (0) : (/cve|cc/.test(ixw.dir)) ? ((ixw.size.w * ixw.count) / 2) : (ixw.size.w * ixw.count) ) 
		+ 'px)';
			
	//keep new image in position with original image
	//in case text size changes mid transition or something
	ixw.newimg.style.left = ixw.getRealPosition(ixw.obj, 'x') + 'px';
	ixw.newimg.style.top = ixw.getRealPosition(ixw.obj, 'y') + 'px';
	
	//if the counter is at the top, which is just after the timer has finished
	if(ixw.count == 1)
	{
		//remove the duplicate image
		ixw.newimg.parentNode.removeChild(ixw.newimg);
	}
};



//get real position method
ixw.getRealPosition = function()
{
	this.pos = (arguments[1] == 'x') ? arguments[0].offsetLeft : arguments[0].offsetTop;
	this.tmp = arguments[0].offsetParent;
	while(this.tmp != null)
	{
		this.pos += (arguments[1] == 'x') ? this.tmp.offsetLeft : this.tmp.offsetTop;
		this.tmp = this.tmp.offsetParent;
	}
	
	return this.pos;
};


img20='';
function CambiaImagen(id,imagen1,imagen2,imagen3,tiempo){
	//pausecomp(tiempo*1000);
	if( img20=='' ){
		img20=imagen2;
	} else if( img20==imagen1 ){
		img20=imagen2;
	} else if( img20==imagen2 ){
		img20=imagen3;
	} else if( img20==imagen3 ){
		img20=imagen1;
	}
	setTimeout("crosswipe(document.getElementById('"+id+"'), '"+img20+"', '2', 'lr')",(tiempo*1000));
}