if(navigator.appVersion.substring(0,1)>=3)
	{
	bot0		=new Image();
	bot0.src	="iconos/cab_07.gif";
	bot0p		=new Image();
	bot0p.src	="iconos/cabx_07.gif";
	bot1		=new Image();
	bot1.src	="iconos/cab_08.gif";
	bot1p		=new Image();
	bot1p.src	="iconos/cabx_08.gif";
	bot2		=new Image();
	bot2.src	="iconos/cab_09.gif";
	bot2p		=new Image();
	bot2p.src	="iconos/cabx_09.gif";
	bot3		=new Image();
	bot3.src	="iconos/cab_10.gif";
	bot3p		=new Image();
	bot3p.src	="iconos/cabx_10.gif";
	bot4		=new Image();
	bot4.src	="iconos/cab_11.gif";
	bot4p		=new Image();
	bot4p.src	="iconos/cabx_11.gif";
	bot5		=new Image();
	bot5.src	="iconos/cab_12.gif";
	bot5p		=new Image();
	bot5p.src	="iconos/cabx_12.gif";

	bot69		=new Image();
	bot69.src	="iconos/cab_01.gif";
	bot69p		=new Image();
	bot69p.src	="iconos/cabx_01.gif";

	bot6		=new Image();
	bot6.src	="iconos/cab_02.gif";
	bot6p		=new Image();
	bot6p.src	="iconos/cabx_02.gif";
	bot7		=new Image();
	bot7.src	="iconos/cab_03.gif";
	bot7p		=new Image();
	bot7p.src	="iconos/cabx_03.gif";
	bot8		=new Image();
	bot8.src	="iconosnew/ayu.gif";
	bot8p		=new Image();
	bot8p.src	="iconosnew/ayu_on.gif";
	bot9		=new Image();
	bot9.src	="iconosnew/p.gif";
	bot9p		=new Image();
	bot9p.src	="iconosnew/c_t.gif";
	bot91p		=new Image();
	bot91p.src	="iconosnew/m_t.gif";
	bot92p		=new Image();
	bot92p.src	="iconosnew/a_t.gif";
	bot93p		=new Image();
	bot93p.src	="iconosnew/h_t.gif";
	bot10		=new Image();
	bot10.src	="iconosnew/hom.gif";
	bot10p		=new Image();
	bot10p.src	="iconosnew/hom_on.gif";
	bot11		=new Image();
	bot11.src	="iconosnew/i_b1.gif";
	bot11p		=new Image();
	bot11p.src	="iconosnew/i_b1o.gif";
	bot12		=new Image();
	bot12.src	="iconosnew/i_b2.gif";
	bot12p		=new Image();
	bot12p.src	="iconosnew/i_b2o.gif";
	bot13		=new Image();
	bot13.src	="iconosnew/i_b3.gif";
	bot13p		=new Image();
	bot13p.src	="iconosnew/i_b3o.gif";
	bot14		=new Image();
	bot14.src	="iconosnew/i_b3_1.gif";
	bot14p		=new Image();
	bot14p.src	="iconosnew/i_b3_1o.gif";
	bot15		=new Image();
	bot15.src	="iconosnew/i_b3_2.gif";
	bot15p		=new Image();
	bot15p.src	="iconosnew/i_b3_2o.gif";
	bot16		=new Image();
	bot16.src	="iconosnew/i_b3_3.gif";
	bot16p		=new Image();
	bot16p.src	="iconosnew/i_b3_3o.gif";
	bot17		=new Image();
	bot17.src	="iconosnew/i_b3_4.gif";
	bot17p		=new Image();
	bot17p.src	="iconosnew/i_b3_4o.gif";
	bot18		=new Image();
	bot18.src	="iconosnew/i_b4.gif";
	bot18p		=new Image();
	bot18p.src	="iconosnew/i_b4o.gif";
	}

function CambiaImg(imgid,imgnew)
	{
	if(navigator.appVersion.substring(0,1)>=3)
		{
		document.images[imgid].src=eval(imgnew+".src");
		}
	}

if(navigator.appVersion.substring(0,1)>=3)
	{
	
	bot8		=new Image();
	bot8.src	="iconosnew/ayu.gif";
	bot8p		=new Image();
	bot8p.src	="iconosnew/ayu_on.gif";
	bot9		=new Image();
	bot9.src	="iconosnew/p.gif";
	bot9p		=new Image();
	bot9p.src	="iconosnew/c_t.gif";
	bot91p		=new Image();
	bot91p.src	="iconosnew/m_t.gif";
	bot92p		=new Image();
	bot92p.src	="iconosnew/a_t.gif";
	bot93p		=new Image();
	bot93p.src	="iconosnew/h_t.gif";
	bot10		=new Image();
	bot10.src	="iconosnew/hom.gif";
	bot10p		=new Image();
	bot10p.src	="iconosnew/hom_on.gif";
	bot11		=new Image();
	bot11.src	="iconosnew/se_b1.gif";
	bot11p		=new Image();
	bot11p.src	="iconosnew/se_b1o.gif";
	bot11_1		=new Image();
	bot11_1.src	="iconosnew/se_b1_1.gif";
	bot11_1p	=new Image();
	bot11_1p.src="iconosnew/se_b1_1o.gif";
	bot11_2		=new Image();
	bot11_2.src	="iconosnew/se_b2_1.gif";
	bot11_2p	=new Image();
	bot11_2p.src="iconosnew/se_b2_1o.gif";
	bot12		=new Image();
	bot12.src	="iconosnew/se_b2.gif";
	bot12p		=new Image();
	bot12p.src	="iconosnew/se_b2o.gif";

	bot12_1			=new Image();
	bot12_1.src		="iconosnew/co_b2_1.gif";
	bot12_1p		=new Image();
	bot12_1p.src	="iconosnew/co_b2_1o.gif";
	bot12_2			=new Image();
	bot12_2.src		="iconosnew/co_b2_2.gif";
	bot12_2p		=new Image();
	bot12_2p.src	="iconosnew/co_b2_2o.gif";
	bot13		=new Image();
	bot13.src	="iconosnew/co_b3.gif";
	bot13p		=new Image();
	bot13p.src	="iconosnew/co_b3o.gif";

	
	}

	function CambiaPagTema()
	{
	option=document.forma.tema.options[document.forma.tema.selectedIndex].value;
	location.href="inf3"+option+".shtml";
	}

function dire_com()
	{
	window.open ('cgi-bin/scripts/dire_com.cgi', 'Dire', 'scrollbars=yes,status=no,width=632,height=500')
	}
function dire_com1()
	{
	window.open ('visa.htm', 'Dire', 'scrollbars=yes,status=no,width=606,height=402')
	}
function isWhitespace (s)
{   var i;
     var whitespace = " \t\n\r";
    if (isEmpty(s)) return true;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        // si el caracter en que estoy no aparece en whitespace,
        // entonces retornar falso
        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function EsEmail (s)
{
    if (isWhitespace(s)) return false;

    var i = 1;nro_arrobas=0;
    var sLength = s.length;

    while (i < sLength)
    {
		if (s.charAt(i) == "@") {nro_arrobas++;}
		i++
    }

	if (nro_arrobas>=2) {return false;}

    i = 1;
    var sLength = s.length;

    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

   if ((i >= sLength) || (s.charAt(i) != "@"))  return false;
    else i += 2;

    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

	var pospripun = i;

    if ((i >= sLength - 1) || (s.charAt(i) != ".")) {return false;}
    else
	{
		var npuntos = 0;
		while (pospripun < sLength)
		{
			if (s.charAt(pospripun) == ".")
			{
				npuntos++;
			}
			pospripun++;
		}
		if (npuntos > 2) {return false;}
		else
		{
			if (s.charAt(pospripun - 1) == ".") {return false;}
			else return true;
		}
	}

}

function verifica_caremail(cad)
{
  cadextr="!¡?´¿ç{}[]:û\/+$|*#;:,\'\t" + '\"';

  for (var i=0; i < cad.length;i++)
  {
   	 var letra=cad.substring(i,i+1)

     if (cadextr.indexOf(letra) > 0)
	 {
		return false;
	}
  }
  return true;
}

function HayApostrofe(s)
{
     var i;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (c=="'")
        return true;
    }
    return false;
}

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

function valido()
{
email=document.forma.email_1.value+document.forma.email_2.value;
//alert(email);
if (!isWhitespace(email))
{
	email=document.forma.email_1.value+"@"+document.forma.email_2.value;
	if (!verifica_caremail(email)){
 		alert("EL EMAIL debe tener caracteres válidos. Verifique.");
		document.forma.email_1.focus();
		return;
	}
	if (!EsEmail (email)){
		alert("Ingrese un email valido.");
		document.forma.email_1.focus();
		return;
	}
	else{
		if (HayApostrofe(email)){
			alert("No ingrese apostrofe en el email");
			document.forma.email_1.focus();
			return;
		}
	}
}
else {document.forma.email_1.value="";
	document.forma.email_2.value="";}

if (isWhitespace(document.forma.mensaje.value))
{
	alert("Ingrese un MENSAJE (comentarios, sugerencias y preguntas).");
	document.forma.mensaje.value="";
	document.forma.mensaje.focus();
	return;
}
document.forma.email.value=email;
//alert(document.forma.email.value);
document.forma.submit();
}

function dire_com()
	{
	window.open ('cgi-bin/scripts/dire_com.cgi', 'Dire', 'scrollbars=yes,status=no,width=632,height=500')
	}

	function CambiaPag()
{
opcion1=document.form1.mundo.options[document.form1.mundo.selectedIndex].value;
if ((opcion1!=0)  && (opcion1!=1) && (opcion1!=2) && (opcion1!=3) && (opcion1!=4)  && (opcion1!=5)  && (opcion1!=6)  && (opcion1!=7)  && (opcion1!=8)  && (opcion1!=9))
{
location.href=opcion1;
}
else if(opcion1==1)
{
window.open('http://www.visa.de');
}
else if(opcion1==2)
{
window.open('http://www.visa.com.ar');
}
else if(opcion1==3)
{
window.open('http://www.visa.com.br');
}
else if(opcion1==4)
{
window.open('http://www.visa.com/taiwan/main.html');
}
else if(opcion1==5)
{
window.open('http://www.visa.com');
}
else if(opcion1==6)
{
window.open('http://www.visa.com/taiwan/main.html');
}
else if(opcion1==7)
{
window.open('http://www.visa.co.jp');
}
else if(opcion1==8)
{
window.open('http://www.visa.com/taiwan/main.html');
}
else if(opcion1==9)
{
window.open('http://www.visanet.com.uy');
}

}

function cambia(pag)
{
                if (pag != 0)
                   {open(pag);}
}
function abre_comven()
  {
  	location.href="cgi-bin/scripts/com_serv.cgi";
  }
function abre_comven1()
  { ventana=open('com_ven.shtml','','width=622,height=500,noresize,scrollbars=yes');
  	location.href="cgi-bin/scripts/com_serv.cgi";
  }
function visa()
  { ventana=open('visa.htm','','width=606,height=402,noresize,scrollbars=yes');
  }

  var months=new Array(13);
months[1]="Enero";
months[2]="Febrero";
months[3]="Marzo";
months[4]="Abril";
months[5]="Mayo";
months[6]="Junio";
months[7]="Julio";
months[8]="Agosto";
months[9]="Setiembre";
months[10]="Octubre";
months[11]="Noviembre";
months[12]="Diciembre";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000)
year = year + 1900;

function isWhitespace (s)
{   var i;
     var whitespace = " \t\n\r";
    if (isEmpty(s)) return true;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        // si el caracter en que estoy no aparece en whitespace,
        // entonces retornar falso
        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function EsEmail (s)
{
    if (isWhitespace(s)) return false;

    var i = 1;nro_arrobas=0;
    var sLength = s.length;

    while (i < sLength)
    {
		if (s.charAt(i) == "@") {nro_arrobas++;}
		i++
    }

	if (nro_arrobas>=2) {return false;}

    i = 1;
    var sLength = s.length;

    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

   if ((i >= sLength) || (s.charAt(i) != "@"))  return false;
    else i += 2;

    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

	var pospripun = i;

    if ((i >= sLength - 1) || (s.charAt(i) != ".")) {return false;}
    else
	{
		var npuntos = 0;
		while (pospripun < sLength)
		{
			if (s.charAt(pospripun) == ".")
			{
				npuntos++;
			}
			pospripun++;
		}
		if (npuntos > 2) {return false;}
		else
		{
			if (s.charAt(pospripun - 1) == ".") {return false;}
			else return true;
		}
	}

}

function verifica_caremail(cad)
{
  cadextr="!¡?´¿ç{}[]:û\/+$|*#;:,\'\t" + '\"';

  for (var i=0; i < cad.length;i++)
  {
   	 var letra=cad.substring(i,i+1)

     if (cadextr.indexOf(letra) > 0)
	 {
		return false;
	}
  }
  return true;
}

function HayApostrofe(s)
{
     var i;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (c=="'")
        return true;
    }
    return false;
}

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

function valido()
{
email=document.forma.email_1.value+document.forma.email_2.value;
//alert(email);
if (!isWhitespace(email))
{
	email=document.forma.email_1.value+"@"+document.forma.email_2.value;
	if (!verifica_caremail(email)){
 		alert("EL EMAIL debe tener caracteres válidos. Verifique.");
		document.forma.email_1.focus();
		return;
	}
	if (!EsEmail (email)){
		alert("Ingrese un email valido.");
		document.forma.email_1.focus();
		return;
	}
	else{
		if (HayApostrofe(email)){
			alert("No ingrese apostrofe en el email");
			document.forma.email_1.focus();
			return;
		}
	}
}
else {document.forma.email_1.value="";
	document.forma.email_2.value="";}

if (isWhitespace(document.forma.mensaje.value))
{
	alert("Ingrese un MENSAJE (comentarios, sugerencias y preguntas).");
	document.forma.mensaje.value="";
	document.forma.mensaje.focus();
	return;
}
document.forma.email.value=email;
//alert(document.forma.email.value);
document.forma.submit();
}

function dire_com()
	{
	window.open ('cgi-bin/scripts/dire_com.cgi', 'Dire', 'scrollbars=yes,status=no,width=632,height=500')
	}

	function isWhitespace (s)
{   var i;
     var whitespace = " \t\n\r";
    if (isEmpty(s)) return true;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        // si el caracter en que estoy no aparece en whitespace,
        // entonces retornar falso
        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function EsEmail (s)
{
    if (isWhitespace(s)) return false;

    var i = 1;nro_arrobas=0;
    var sLength = s.length;

    while (i < sLength)
    {
		if (s.charAt(i) == "@") {nro_arrobas++;}
		i++
    }

	if (nro_arrobas>=2) {return false;}

    i = 1;
    var sLength = s.length;

    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

   if ((i >= sLength) || (s.charAt(i) != "@"))  return false;
    else i += 2;

    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }

	var pospripun = i;

    if ((i >= sLength - 1) || (s.charAt(i) != ".")) {return false;}
    else
	{
		var npuntos = 0;
		while (pospripun < sLength)
		{
			if (s.charAt(pospripun) == ".")
			{
				npuntos++;
			}
			pospripun++;
		}
		if (npuntos > 2) {return false;}
		else
		{
			if (s.charAt(pospripun - 1) == ".") {return false;}
			else return true;
		}
	}

}

function verifica_caremail(cad)
{
  cadextr="!¡?´¿ç{}[]:û\/+$|*#;:,\'\t" + '\"';

  for (var i=0; i < cad.length;i++)
  {
   	 var letra=cad.substring(i,i+1)

     if (cadextr.indexOf(letra) > 0)
	 {
		return false;
	}
  }
  return true;
}

function HayApostrofe(s)
{
     var i;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (c=="'")
        return true;
    }
    return false;
}

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

function trim(cadena)
{ cadenaE="";
  for (i=0;i<cadena.length;i++)
  {     letra=cadena.substring(i,i+1);
    if (letra!=' ') { cadenaE=cadenaE + letra; }
  }
  return(cadenaE);
}

function isDigit (c)
{   return ((c >= "0") && (c <= "9"))
}

function EsNumero(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {
        var c = s.charAt(i);
        if (! (isDigit(c) ) || c=='.')
        return false;
    }
    return true;
}

function validar()
{
	if (isWhitespace(document.forma.nombreco.value)){
		 alert("El NOMBRE COMERCIAL no puede estar en blanco. Verifique.");
		 document.forma.nombreco.focus();
		 return;
		}

	if (isWhitespace(document.forma.ruc.value)){
		 alert("El RUC no puede estar en blanco. Verifique.");
		 document.forma.ruc.focus();
		 return;
		}
	document.forma.ruc.value=trim(document.forma.ruc.value);
	if (!EsNumero(document.forma.ruc.value)){
		 alert("El RUC solo puede tener números. Verifique.");
		 document.forma.ruc.focus();
		 return;
		}

	if (isWhitespace(document.forma.contacto.value)){
		 alert("LA PERSONA DE CONTACTO debe ser ingresada. Verifique.");
		 document.forma.contacto.focus();
		 return;
		}

	if (isWhitespace(document.forma.telef_contac.value)){
		 alert("El TELEFONO no puede estar en blanco. Verifique.");
		 document.forma.telef_contac.focus();
		 return;
		}

if (!isWhitespace(document.forma.email.value))
{
	if (!verifica_caremail(document.forma.email.value)){
 		alert("EL EMAIL debe tener caracteres válidos. Verifique.");
		document.forma.email.focus();
		return;
	}
	mail = document.forma.email.value;
	if (!EsEmail (mail)){
		alert("Ingrese un email valido.");
		document.forma.email.focus();
		return;
	}
	else{
		if (HayApostrofe(mail)){
			alert("No ingrese apostrofe en el email");
			document.forma.email.focus();
			return;
		}
	}
}
else {
	alert("EL CORREO ELECTRONICO no puede estar en blanco. Verifique.");
	document.forma.email.focus();
	return;
}


if (isWhitespace(document.forma.mensaje.value))
{
	alert("Ingrese un MENSAJE (comentarios, sugerencias y preguntas).");
	document.forma.mensaje.value="";
	document.forma.mensaje.focus();
	return;
}
document.forma.submit();
}