<!--
// No Cambiar
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_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_findObj(n, d) { //v3.0
  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); 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 CambioIdioma(ID){
	document.CambioIdioma.txtIdioma.value=ID;
	document.CambioIdioma.submit();
}


function MostrarError(varRS){
//*********************************************************************
// Mostramos una ventana con el error producido en Remote Scripting
//*********************************************************************
	var varW;
	
	//Detección alquimista del fin de sesión
	if (varRS.data.substr(0, 6) == "<html>" || varRS.data.substr(0, 6) == "<HTML>") {
		IrAConexion();
		return;
	}

		varW = window.open("","Error","width=250,height=200,toolbar=no,location=no,directories=no,status=no,menubar=no");
	varW.document.write("<HTML>");
	varW.document.write("<BODY bgcolor='#9F1739'>");
	varW.document.write("<CENTER>");
	varW.document.write("<H2>Error en llamada remota:</H2>");
	varW.document.write("<TABLE border=1 cellpadding=10 bgcolor=#dddddd><TR><TD>");
	varW.document.write(varRS.data)
	varW.document.write("</TD></TR></TABLE>");
	varW.document.write("<FORM id=form1 name=form1><INPUT type=button value=\" OK \" onclick=self.close()></FORM>");
	varW.document.write("</CENTER>");
	varW.document.write("</BODY>");
	varW.document.write("</HTML>");	

}


//funcion que me elimina las comillas dobles y simples
function FormatearDatos(cadena){
	var cad;
	
	cad=cadena.replace(/'/g,'´');
	cad=cad.replace(/"/g,"´´");
//	cad=cad.replace(/\r\n/g," ");
	
	return cad;
}
	
function QuitarSaltosLinea(strCampo)
	{		
	var strTexto;
	var strCaracterABuscar;
	var intLongitud;
	var strTextoSinIntros = "";	
	
	strTexto = eval('document.forms.'+strCampo+'.value');
	
	// anulacion de saltos de linea
	eval('intLongitud = document.forms.'+strCampo+'.value.length');
	aryTexto = new Array(intLongitud);
	for (i = 0; i < intLongitud; i++)
		{
		aryTexto[i] = strTexto.charAt(i);
		}
	for (i = 0; i < intLongitud; i ++)
		{
		if (strTexto.charCodeAt([i]) == 13)	
			{
			if(strTexto.charCodeAt([i+1]) == 10)
				{
				if(strTexto.charAt(i-1) == " ")
					{
					aryTexto[i] = "";	
					}
				else
					{
					aryTexto[i] = " ";	
					}
				aryTexto[i+1] = "";
				}
			}
		}
	
	for (i = 0; i < intLongitud; i ++)
		{
		strTextoSinIntros = strTextoSinIntros + aryTexto[i]
		}

	eval('document.forms.'+strCampo+'.value = strTextoSinIntros');
	}
	
function SeguirEscribiendo(Campo, Tope){
// Esta funcion pone un tope a los campos textarea y se utiliza añadiento esto al tag del textarea 
// onKeypress="if(SeguirEscribiendo(this, tamaño)==false)event.returnValue = false"

	if(Campo.value.length>=Tope)return false;
	 else return true
}

//-->
