var SubjectMail= "No te pierdas las últimas novedades en seguridad antivirus de Panda Software";

menuAct = "-";
menuAnt = "-";

//Colores para menu
fondo="#f4f4f4";
resalta="#e1e1e1";
pincha="#aaaaaa";
suelta="#aaaaaa";
separa="#f4f4f4";
var BGColorSec="#ffffff"; //Variable para el color de la opción que estamos visitando.
var DownmouseColor="#aaaaaa"; //Variable para el color cuando se hace click.
var DownmouseFontColor="#000000"; //Variable para el color de la fuente cuando se hace click.
//precarga de botones
var nFile1=''
var nFile2=''

b_a=new Image();
b_a.src="/CmsPanda/img/hom/01hom_info.gif";
b_b=new Image();
b_b.src="/CmsPanda/img/hom/01hom_info_il.gif";

c_a=new Image();
c_a.src="/CmsPanda/img/hom/01hom_probar.gif";
c_b=new Image();
c_b.src="/CmsPanda/img/hom/01hom_probar_il.gif";

d_a=new Image();
d_a.src="/CmsPanda/img/hom/01hom_comprar.gif";
d_b=new Image();
d_b.src="/CmsPanda/img/hom/01hom_comprar_il.gif";

e_a=new Image();
e_a.src="/CMSPANDA/img/des/01des_ac_desc.gif";
e_b=new Image();
e_b.src="/CMSPANDA/img/des/01des_ac_desc_on.gif";



function apli_style1(oStyle, cFondo, cursor, fColor, id, modo )
	{	
	   if(event.button==2)return;	    
			menuAnt = menuAct;
			menuAct = id;
			oStyle.style.background = cFondo;
			oStyle.style.cursor=cursor;
			oStyle1 = document.getElementById(id);			
		   	oStyle1.style.color = fColor;
	}
function abrir_popup(pagina,w,h)
{	x=(screen.width-w)/2;
	y=(screen.height-h)/2;
window.open(pagina,"_blank","scrollbars=yes,resizable=yes,width="+w+",height="+h+",left="+x+", top="+y);
}

function abrir_guia()
{abrir_popup("http://www.pandasoftware.es/multimedia/selector.htm",730,450)}

function poll(idopcion)
{window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=851&id_opcion='+idopcion,'encuesta','width=250,height=100')}

function ventana_tru()
{
window.open('/cmspanda/partners/truprevent/truprevent.htm','','height=500 , width=800 , scrollbars=yes')
}

function ventana_tru_en()
{
window.open('/cmspanda/partners/truprevent/en/truprevent.htm','','height=500 , width=800 , scrollbars=yes')
}

function ventana_gatedefender_es()
{
window.open('/microsites/es/gatedefender','','height=500 , width=800 , scrollbars=yes')
}

function ventana_gatedefender_en()
{
window.open('/microsites/en/gatedefender','','height=500 , width=800 , scrollbars=yes')
}

function abrirMapa3()
{
	var dir;
	if (window.document.location.href.indexOf("#")>0)
	{
		dir = window.document.location.href.substring(0,window.document.location.href.indexOf("#"))
	}
	else
	{
		dir = window.document.location.href;
	}
	if (window.document.referrer.indexOf(dir)<0)
	{
		window.open('/virus_info/flash/mapa_popup.htm', 'mapavirus','toolbar=no,width=613,height=377,resizable=no')
	}
}

function abrirMapa3_en()
{
	var dir;
	if (window.document.location.href.indexOf("#")>0)
	{
		dir = window.document.location.href.substring(0,window.document.location.href.indexOf("#"))
	}
	else
	{
		dir = window.document.location.href;
	}
	if (window.document.referrer.indexOf(dir)<0)
	{
		window.open('/virus_info/flash/02mapa_popup.htm', 'mapavirus','toolbar=no,width=613,height=377,resizable=no')
	}
}

//Funciones para encuestas del Right Banner
function get_opciones_1272() { 
  valores=''; 
  if (tableOfContents = document.getElementById('tabla_pool_1272')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox' && rows[x].checked) { 
                valores += (valores==''?'':',')+rows[x].name; 
			} 
		} 
  } 
  if(valores=='') alert('Seleccione una opcion. !!!'); 
  else { 
    window.open('http://217.76.135.107/tech-marketresearch.com/miniencuestas/briefing_datos_form.php?id=1272&valores='+valores,'encuesta_1272','width=250,height=150');
    document.getElementById('div_1272').style.display='none'; 
    if (tableOfContents = document.getElementById('tabla_pool_1272')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox') { 
                rows[x].disabled=true; ; 
			} 
		} 
    } 
  }
} 
function get_opciones_1274(opcion_id)
{ 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1274&id_opcion='+opcion_id,'encuesta_1274','width=250,height=150');
} 
function get_opciones_1275(opcion_id)
{ 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1275&id_opcion='+opcion_id,'encuesta_1275','width=250,height=150');
} 
function get_opciones_1269(opcion_id)
{ 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1269&id_opcion='+opcion_id,'encuesta_1269','width=250,height=150');
} 
function get_opciones_1243(opcion_id)
{ 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1243&id_opcion='+opcion_id,'encuesta_1243','width=250,height=150');
} 
function get_opciones_1210(opcion_id) { 
			window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1210&id_opcion='+opcion_id,'encuesta_1210','width=250,height=150');
} 
function gestcombo(surl)
{
	if (surl==1)
	{
		window.open ('http://acs.pandasoftware.com/updates/newversions/pbrowser.phtml?language=0')
	}
	else
	{
		location.href=surl;
	}	
}

function get_opciones_1256(opcion_id) { 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1256&id_opcion='+opcion_id,'encuesta_1256','width=250,height=150');
} 

function abrir_Vent(url){

   var w;

   window.open(url);

}

function abrirAnimacion(animacion)
{
			 
			 window.open(animacion,'multimedia','width=680,height=500,top=100');
}	
	
function pp(IdVendor, IdLang, IdPais)
{								
				switch (IdPais)
				{
					case 3: //Alemania					
						window.open("http://www.pandasoftware.com/activescan/de/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 29:  //Bolivia

						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 34:  //Bulgaria
						window.open("http://www.pandasoftware.com/activescan/com/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 43:  //Chile
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 44:  //China
						window.open("http://www.pandasoftware.com/activescan/com/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 46:  //Colombia
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 48:  //Costa Rica
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 55:  //Ecuador
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 60: //Eslovaquia
						window.open("http://www.pandasoftware.com/activescan/sk/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 62:  //España								
						window.open("http://www.pandasoftware.com/activescan/es/default.asp?IdVendor=1&IdLang=1&IdPais=62","ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 69:  //Francia
						window.open("http://www.pandasoftware.com/activescan/fr/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 74: //Grecia
						window.open("http://www.pandasoftware.com/activescan/gr/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 99:  //Italia
						window.open("http://www.pandasoftware.com/activescan/it/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 101: //Japon
						window.open("http://www.pandasoftware.com/activescan/jp/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 121: //Malasya
						window.open("http://www.pandasoftware.com/activescan/com/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 130:  //Mexico
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 153: //Portugal
						window.open("http://www.pandasoftware.com/activescan/pt/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 154:  //Puerto Rico
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 158: //Rep. Checa
						window.open("http://www.pandasoftware.com/activescan/com/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 163: //Russia
						window.open("http://www.pandasoftware.com/activescan/ru/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 152:  //Polonia
						window.open("http://www.pandasoftware.com/activescan/pol/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true)
					break;
					case 181:  //Suiza
						window.open("http://www.pandasoftware.com/activescan/de/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 197:  //Uruguay
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					case 201: //Venezuela
						window.open("http://www.pandasoftware.es/activescan/es/default.asp?IdVendor="+IdVendor+"&IdLang="+IdLang+"&IdPais="+IdPais,"ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
					break;
					default:  //inglés
						window.open("http://www.pandasoftware.com/activescan/com/default.asp?IdVendor=1&IdLang=2&IdPais=63", "ASAnalisis","height=335,width=539,status=yes,toolbar=no,menubar=no,location=no",true);
				}
			}

function get_opciones_1245(opcion_id) { 
    valores=''; 
  if (tableOfContents = document.getElementById('tabla_pool_1245')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'radio' && rows[x].checked) { 
                valores += (valores==''?'':',')+rows[x].name; 
			} 
		} 
  } 
  if(valores=='') alert('Seleccione una opcion. !!!'); 
  else { 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing_datos_form.php?id=1245&valores='+valores,'encuesta_1245','width=250,height=150');
    document.getElementById('div_1245').style.display='none'; 
    if (tableOfContents = document.getElementById('tabla_pool_1245')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'radio') { 
                rows[x].disabled=true; ; 
			} 
		} 
    } 
  }
} 


function get_opciones_1254(opcion_id) { 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing.php?id=1254&id_opcion='+opcion_id,'encuesta_1254','width=250,height=150');
} 

                                                                                                                                              
  function Campo_blanco(vcampo, ncampo, vacioSI, aMSG)
{	
	var tamano;
	var x;
	var campoOK;
	tamano = vcampo.length;
	
	//Test for mail file.
	myFile = ncampo.toLowerCase();
	if (myFile.indexOf("mail")!=-1)
	{
		if (emailOK(vcampo)) 
		{
			return true;		
		}
		else 
		{
			alert (nFile1 + aMSG + nFile2);
			return false;
		}
	} 
	// Comprobar si el valor del campo esta rellenado con blancos, o no ha sido rellenado.
	if (tamano>0)
	{
		for (x=0;x<=tamano-1;x++) 
		{			
			if (vcampo.charAt(x)==" ")
			{
				campoOK=false;
				return false;
			} else
			{
				return true;
			}			
		}
	}
	else
	{ 
		if (vacioSI=="True")
		{
			campoOK=false;
		} else 
		{
			campoOK=true
		}
	
	}
		
	// Mostrar mensaje de error.
	if (campoOK==false) 
	{
		alert (nFile1 + aMSG + nFile2);
		return false;
	} else { return true; }	
		
}

function emailOK(email)
{
	return (checkEmail(email));
}
	
function checkEmail(emailStr) {
   if (emailStr.length == 0)
     return true;
   var emailPat= /^(.+)@(.+)$/;
   var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
   var validChars="\[^\\s" + specialChars + "\]";
   var quotedUser="(\"[^\"]*\")";
   var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
   var atom=validChars + '+';
   var word="(" + atom + "|" + quotedUser + ")";
   var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
   var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

//   var specialChars= \"()<>@,;:\\\".[]\";
//   var validChars= \"[^s\" + specialChars + \"]\";
//   var quotedUser=\"(\\\"[^\\\"]*\\\")\";
//   var ipDomainPat=/^(d{1,3})[.](d{1,3})[.](d{1,3})[.](d{1,3})$/;
//   var atom=validChars + \'+\';
//   var word=\"(\" + atom + \"|\" + quotedUser + \")\";
//   var userPat=new RegExp(\"^\" + word + \"(.\" + word + \")*$\");
//   var domainPat=new RegExp(\"^\" + atom + \"(.\" + atom + \")*$\");
//   var matchArray=emailStr.match(emailPat);

   if (matchArray == null)
      return false;

   var user=matchArray[1];
   var domain=matchArray[2];

   if (user.match(userPat) == null)
      return false;

   var IPArray = domain.match(ipDomainPat);
   if (IPArray != null) {
      for (var i = 1; i <= 4; i++) {
         if (IPArray[i] > 255)
         	return false;
   		}

   return true;
	 }

   var domainArray=domain.match(domainPat);
   if (domainArray == null)
      return false;

   var atomPat=new RegExp(atom,"g");
   var domArr=domain.match(atomPat);
   var len=domArr.length;

   if (domArr[domArr.length-1].length < 2 || domArr[domArr.length-1].length > 3)
      return false;

   if (len < 2)
      return false;

   return true;
}
	
function multimedia(animacion)
{
	if (animacion==null)
	{
		window.open('http://www.pandasoftware.es/incCMS/Flash/ES/PavASP.html','multimedia','width=640,height=520,top=100');
	}
	else
	{
		window.open(animacion,'multimedia','width=550,height=430,top=100');
	}
}	

function multimedia_en(animacion)
{
	if (animacion==null)
	{
		window.open('http://www.pandasoftware.com/incCMS/Flash/US/PavASP.html','multimedia','width=640,height=520,top=100');
	}
	else
	{
		window.open(animacion,'multimedia','width=550,height=430,top=100');
	}
}	

function EnviarCorreoEntorno()
	{
	  var texto;
	  texto = location.href;
	  window.open('http://www.pandasoftware.es/send.asp?SubjectMail='+ URLEncodeClientCorreo(SubjectMail) + '&texto=' + URLEncodeClientCorreo(texto), 'Enviar_a_un_amigo', 'resizable=no,width=296,height=368,left=0, top=0');
	}
	
function URLEncodeClientCorreo(texto)
	{
	        var re;
	 
	        texto = texto.replace(/xE9/g, "%E9");
	        texto = texto.replace(/xED/g, "%ED");
	        texto = texto.replace(/xF3/g, "%F3");
	        texto = texto.replace(/xFA/g, "%FA");
	        texto = texto.replace(/xC1/g, "%C1");
	        texto = texto.replace(/xC9/g, "%C9");
	        texto = texto.replace(/xCD/g, "%CD");
	        texto = texto.replace(/xD3/g, "%D3");
	        texto = texto.replace(/xDA/g, "%DA");
	        texto = texto.replace(/xA1/g, "%A1");
	        texto = texto.replace(/xBF/g, "%BF");
	        texto = texto.replace(/xF1/g, "%F1");
	        texto = texto.replace(/xD1/g, "%D1");
	 
	        re= new RegExp("\"","g");
	        texto = texto.replace(re, "%22");
	        re= new RegExp("'","g");
	        texto = texto.replace(re, "%27");
	        re= new RegExp("&","g");
	        texto = texto.replace(re, "%26");
	        re= new RegExp("/","g");
	        texto = texto.replace(re, "%2F");
	        texto = texto.replace(/\\/g, "%5C");
	        return (texto);
}

// Funcione de cálculo para el ROITOOL
gatedefender=new Array(new Array("PGDA","GateDefender 8050",1990,"A"),	
new Array("PGDB","GateDefender 8100",2990,"B"),	
new Array("PGDC","GateDefender 8200",10990,"C"));	

antivirus_module = new Array(new Array("B?PGD?AVA","GateDefender AntiVirus Module",10,25,40.00,60.00,80.00),
new Array("B?PGD?AVB","GateDefender AntiVirus Module",26,50,34.80,52.20,69.60),
new Array("B?PGD?AVC","GateDefender AntiVirus Module",51,100,33.41,50.11,66.82),
new Array("B?PGD?AVD","GateDefender AntiVirus Module",101,250,26.73,40.09,53.45),
new Array("B?PGD?AVE","GateDefender AntiVirus Module",251,500,24.59,36.88,49.18),
new Array("B?PGD?AVF","GateDefender AntiVirus Module",501,1000,21.88,32.83,43.77),
new Array("B?PGD?AVG","GateDefender AntiVirus Module",1001,2000,19.91,29.87,39.83),
new Array("B?PGD?AVH","GateDefender AntiVirus Module",2001,3000,17.52,26.29,35.05),
new Array("B?PGD?AVI","GateDefender AntiVirus Module",3001,5000,15.07,22.61,30.14),
new Array("B?PGD?AVJ","GateDefender AntiVirus Module",5001,7500,14.32,21.48,28.63),
new Array("B?PGD?AVK","GateDefender AntiVirus Module",7501,10000,13.60,20.40,27.20),
new Array("B?PGD?AVL","GateDefender AntiVirus Module",10001,12500,13.06,19.59,26.11),
new Array("B?PGD?AVM","GateDefender AntiVirus Module",12501,15000,12.54,18.80,25.07),
new Array("B?PGD?AVN","GateDefender AntiVirus Module",15001,17500,12.03,18.05,24.07),
new Array("B?PGD?AVO","GateDefender AntiVirus Module",17501,20000,11.55,17.33,23.10),
new Array("B?PGD?AVP","GateDefender AntiVirus Module",20001,25000,11.21,16.81,22.41),
new Array("B?PGD?AVQ","GateDefender AntiVirus Module",25001,30000,10.87,16.30,21.74),
new Array("B?PGD?AVR","GateDefender AntiVirus Module",30001,35000,10.54,15.82,21.09),
new Array("B?PGD?AVS","GateDefender AntiVirus Module",35001,40000,10.33,15.50,20.67),
new Array("B?PGD?AVT","GateDefender AntiVirus Module",40001,999999,10.13,15.19,20.25))

antispam_module = new Array(new Array("B?PGD?ASA","GateDefender AntiSpam Module",10,25,20.00,30.00,40.00), 
new Array("B?PGD?ASB","GateDefender AntiSpam Module",26,50,17.40,26.10,34.80),
new Array("B?PGD?ASC","GateDefender AntiSpam Module", 51,100,16.70,25.06,33.41),
new Array("B?PGD?ASD","GateDefender AntiSpam Module",101,250,13.36,20.04,26.73),
new Array("B?PGD?ASE","GateDefender AntiSpam Module",251,500,12.29,18.44,24.59),
new Array("B?PGD?ASF","GateDefender AntiSpam Module",501,1000,10.94,16.41,21.88),
new Array("B?PGD?ASG","GateDefender AntiSpam Module",1001,2000,9.96,14.94,19.91), 
new Array("B?PGD?ASH","GateDefender AntiSpam Module",2001,3000,8.76,13.14,17.52), 
new Array("B?PGD?ASI","GateDefender AntiSpam Module",3001,5000,7.54,11.30,15.07), 
new Array("B?PGD?ASJ","GateDefender AntiSpam Module",5001,7500,7.16,10.74,14.32), 
new Array("B?PGD?ASK","GateDefender AntiSpam Module",7501,10000,6.80,10.20,13.60), 
new Array("B?PGD?ASL","GateDefender AntiSpam Module",10001,12500,6.53,9.79,13.06), 
new Array("B?PGD?ASM","GateDefender AntiSpam Module",12501,15000,6.27,9.40,12.54),
new Array("B?PGD?ASN","GateDefender AntiSpam Module",15001,17500,6.02,9.03,12.03),
new Array("B?PGD?ASO","GateDefender AntiSpam Module",17501,20000,5.78,8.66,11.55), 
new Array("B?PGD?ASP","GateDefender AntiSpam Module",20001,25000,5.60,8.40,11.21), 
new Array("B?PGD?ASQ","GateDefender AntiSpam Module",25001,30000,5.43,8.15,10.87),
new Array("B?PGD?ASR","GateDefender AntiSpam Module",30001,35000,5.27,7.91,10.54),
new Array("B?PGD?ASS","GateDefender AntiSpam Module",35001,40000,5.17,7.75,10.33), 
new Array("B?PGD?AST","GateDefender AntiSpam Module",40001,999999,5.06,7.59,10.13)) 

webfilter_module = new Array(new Array("B?PGD?WFA","GateDefender Web Filter Module",10,25,12.00,18.00,24.00), 
new Array("B?PGD?WFB","GateDefender Web Filter Module",26,50,10.44,15.66,20.88),
new Array("B?PGD?WFC","GateDefender Web Filter Module",51,100,10.02,15.03,20.04), 
new Array("B?PGD?WFD","GateDefender Web Filter Module",101,250,8.02,12.03,16.04), 
new Array("B?PGD?WFE","GateDefender Web Filter Module",251,500,7.38,11.06,14.75), 
new Array("B?PGD?WFF","GateDefender Web Filter Module",501,1000,6.57,9.85,13.13), 
new Array("B?PGD?WFG","GateDefender Web Filter Module",1001,2000,5.97,8.96,11.95), 
new Array("B?PGD?WFH","GateDefender Web Filter Module",2001,3000,5.26,7.89,10.51), 
new Array("B?PGD?WFI","GateDefender Web Filter Module",3001,5000,4.52,6.78,9.04), 
new Array("B?PGD?WFJ","GateDefender Web Filter Module",5001,7500,4.30,6.44,8.59), 
new Array("B?PGD?WFK","GateDefender Web Filter Module",7501,10000,4.08,6.12,8.16), 
new Array("B?PGD?WFL","GateDefender Web Filter Module",10001,12500,3.92,5.88,7.83), 
new Array("B?PGD?WFM","GateDefender Web Filter Module",12501,15000,3.76,5.64,7.52), 
new Array("B?PGD?WFN","GateDefender Web Filter Module",15001,17500,3.61,5.42,7.22), 
new Array("B?PGD?WFO","GateDefender Web Filter Module",17501,20000,3.47,5.20,6.93), 
new Array("B?PGD?WFP","GateDefender Web Filter Module",20001,25000,3.36,5.04,6.72), 
new Array("B?PGD?WFQ","GateDefender Web Filter Module",25001,30000,3.26,4.89,6.52), 
new Array("B?PGD?WFR","GateDefender Web Filter Module",30001,35000,3.16,4.74,6.33), 
new Array("B?PGD?WFS","GateDefender Web Filter Module",35001,40000,3.10,4.65,6.20), 
new Array("B?PGD?WFT","GateDefender Web Filter Module",40001,999999,3.04,4.56,6.08)) 

var indice_antivirus=null;
var indice_antispam=null;
var indice_filtrado=null;

var max_licencias=null;
var indice_gatedefender=null;
function calcular_max_licencias()
{
if(parseInt(document.Plantilla_1_Placeholder.b6.value)>=parseInt(document.Plantilla_1_Placeholder.b14.value))
{max_licencias=parseInt(document.Plantilla_1_Placeholder.b6.value)}
else {max_licencias=parseInt(document.Plantilla_1_Placeholder.b14.value);}
if(parseInt(document.Plantilla_1_Placeholder.b32.value)>max_licencias) {max_licencias=parseInt(document.Plantilla_1_Placeholder.b32.value);}
calcular_b3_b4()
}

function calcular_indice_antivirus(valor) 
{for (i=0;i<antivirus_module.length;i++)
{
if ((antivirus_module[i][2]<=valor) && (antivirus_module[i][3]>=valor))
{	indice_antivirus=i;
	break;}}}

function calcular_indice_antispam(valor) 
{for (i=0;i<antispam_module.length;i++)
{
if ((antispam_module[i][2]<=valor) && (antispam_module[i][3]>=valor))
{	indice_antispam=i;
	break;}}}	
	
function calcular_indice_filtrado(valor) 
{for (i=0;i<webfilter_module.length;i++)
{
if ((webfilter_module[i][2]<=valor) && (webfilter_module[i][3]>=valor))
{	indice_filtrado=i;
	break;}}}

function calcular_b3_b4()
{
if (max_licencias<=25) indice_gatedefender=0;
if ((max_licencias>25)&&(max_licencias<=500)) indice_gatedefender=1;
if (max_licencias>500) indice_gatedefender=2;

if (max_licencias>0){
 document.Plantilla_1_Placeholder.b3.value= gatedefender[indice_gatedefender][1];
  document.Plantilla_1_Placeholder.b4.value= gatedefender[indice_gatedefender][2];
calcular_b42();
}
}

function redondear(param)
{
return (Math.round(param*100)/100)
}
function calcular_b9()
{
aux_b9=document.Plantilla_1_Placeholder.b6.value*document.Plantilla_1_Placeholder.b7.value*document.Plantilla_1_Placeholder.b8.value;
if (aux_b9>0) 
{
document.Plantilla_1_Placeholder.b9.value=aux_b9*document.Plantilla_1_Placeholder.b2.value;
calcular_b11();
calcular_b41();
}
}

function calcular_b10()
{
if ((indice_antivirus!=null)){

aux_b10=antivirus_module[indice_antivirus][parseInt(document.Plantilla_1_Placeholder.b2.value)+3]*document.Plantilla_1_Placeholder.b6.value
if (aux_b10>0)
{ document.Plantilla_1_Placeholder.b10.value=redondear(aux_b10);}
calcular_b11();calcular_b12();calcular_b42()
}
}

function calcular_b11()
{
aux_b11=document.Plantilla_1_Placeholder.b9.value-document.Plantilla_1_Placeholder.b10.value
if (aux_b11>0) document.Plantilla_1_Placeholder.b11.value=redondear(aux_b11);
}

function calcular_b12()
{
aux_b12=document.Plantilla_1_Placeholder.b11.value/document.Plantilla_1_Placeholder.b10.value
if (aux_b12>0) document.Plantilla_1_Placeholder.b12.value=redondear(aux_b12);
}


function calcular_b23()
{
aux_b23=document.Plantilla_1_Placeholder.b18.value*document.Plantilla_1_Placeholder.b15.value*document.Plantilla_1_Placeholder.b16.value*document.Plantilla_1_Placeholder.b17.value/60*document.Plantilla_1_Placeholder.b14.value
if (aux_b23>0) {
document.Plantilla_1_Placeholder.b23.value=redondear(aux_b23);
calcular_b27();
}
}

function calcular_b24()
{
aux_b24=document.Plantilla_1_Placeholder.b14.value*document.Plantilla_1_Placeholder.b19.value*document.Plantilla_1_Placeholder.b15.value*document.Plantilla_1_Placeholder.b20.value
if (aux_b24>0) document.Plantilla_1_Placeholder.b24.value=aux_b24;
}

function calcular_b25()
{
aux_b25=document.Plantilla_1_Placeholder.b21.value/60*document.Plantilla_1_Placeholder.b18.value*document.Plantilla_1_Placeholder.b17.value
if (aux_b25>0) document.Plantilla_1_Placeholder.b25.value=redondear(aux_b25);
}

function calcular_b26()
{
aux_b26=document.Plantilla_1_Placeholder.b22.value*document.Plantilla_1_Placeholder.b17.value*12
if (aux_b26>0) {
document.Plantilla_1_Placeholder.b26.value=aux_b26;
calcular_b27();
}
}

function calcular_b27()
{
aux_b27=(parseFloat(document.Plantilla_1_Placeholder.b23.value)+parseFloat(document.Plantilla_1_Placeholder.b26.value))*document.Plantilla_1_Placeholder.b2.value;
if (aux_b27>0) document.Plantilla_1_Placeholder.b27.value=redondear(aux_b27);
calcular_b29();
calcular_b41();
}

function calcular_b28()
{
if ((indice_antispam!=null)){
aux_b28=antispam_module[indice_antispam][parseInt(document.Plantilla_1_Placeholder.b2.value)+3]*document.Plantilla_1_Placeholder.b14.value
if (aux_b28>0)
{ document.Plantilla_1_Placeholder.b28.value=redondear(aux_b28);}
calcular_b29();
calcular_b30();
calcular_b42();
}
}

function calcular_b29()
{
aux_b29=document.Plantilla_1_Placeholder.b27.value-document.Plantilla_1_Placeholder.b28.value
if (aux_b29>0) {
document.Plantilla_1_Placeholder.b29.value=redondear(aux_b29);
calcular_b30();
}
}

function calcular_b30()
{
aux_b30=document.Plantilla_1_Placeholder.b29.value/document.Plantilla_1_Placeholder.b28.value
if (aux_b30>0) document.Plantilla_1_Placeholder.b30.value=redondear(aux_b30);
}

function calcular_b36()
{
aux_b36=document.Plantilla_1_Placeholder.b34.value*document.Plantilla_1_Placeholder.b33.value*document.Plantilla_1_Placeholder.b35.value*document.Plantilla_1_Placeholder.b32.value*document.Plantilla_1_Placeholder.b2.value;
if (aux_b36>0){
 
 document.Plantilla_1_Placeholder.b36.value=aux_b36;
 calcular_b38();
 calcular_b41();
 }
}

function calcular_b37()
{
if ((indice_filtrado!=null)){

aux_b37=webfilter_module[indice_filtrado][parseInt(document.Plantilla_1_Placeholder.b2.value)+3]*document.Plantilla_1_Placeholder.b32.value
if (aux_b37>0)
{ document.Plantilla_1_Placeholder.b37.value=redondear(aux_b37);
calcular_b38();
calcular_b39();
calcular_b42();
}
}
}

function calcular_b38()
{
aux_b38=document.Plantilla_1_Placeholder.b36.value-document.Plantilla_1_Placeholder.b37.value
if (aux_b38>0){
 document.Plantilla_1_Placeholder.b38.value=redondear(aux_b38);
 calcular_b39()
 }
}

function calcular_b39()
{
aux_b39=document.Plantilla_1_Placeholder.b38.value/document.Plantilla_1_Placeholder.b37.value
if (aux_b39>0) document.Plantilla_1_Placeholder.b39.value=redondear(aux_b39);
}

function calcular_b41()
{
aux_b41=parseFloat(document.Plantilla_1_Placeholder.b36.value)+parseFloat(document.Plantilla_1_Placeholder.b27.value)+parseFloat(document.Plantilla_1_Placeholder.b9.value)
if (aux_b41>0){
 document.Plantilla_1_Placeholder.b41.value=redondear(aux_b41);
 calcular_b43();
 }
}

function calcular_b42()
{
aux_b42=parseFloat(document.Plantilla_1_Placeholder.b37.value)+parseFloat(document.Plantilla_1_Placeholder.b28.value)+parseFloat(document.Plantilla_1_Placeholder.b10.value)+parseFloat(document.Plantilla_1_Placeholder.b4.value);
if (aux_b42>0){
 document.Plantilla_1_Placeholder.b42.value=redondear(aux_b42);
 calcular_b43();
 calcular_b44();

 }
}

function calcular_b43()
{
aux_b43=parseFloat(document.Plantilla_1_Placeholder.b41.value)-parseFloat(document.Plantilla_1_Placeholder.b42.value);
if (aux_b43>0) {
document.Plantilla_1_Placeholder.b43.value=redondear(aux_b43);
calcular_b44();
}
}

function calcular_b44()
{
aux_b44=parseFloat(document.Plantilla_1_Placeholder.b43.value)/parseFloat(document.Plantilla_1_Placeholder.b42.value);
if (aux_b44>0) document.Plantilla_1_Placeholder.b44.value=redondear(aux_b44);
}

function init()
{calcular_indice_antivirus(10);
calcular_indice_antispam(10);
calcular_indice_filtrado(10);
calcular_max_licencias();
calcular_b3_b4()
calcular_b9()
calcular_b10()
calcular_b11()
calcular_b12()
calcular_b23()
calcular_b24()
calcular_b25()
calcular_b26()
calcular_b27()
calcular_b28()
calcular_b29()
calcular_b30()
calcular_b36()
calcular_b37()
calcular_b38()
calcular_b39()
calcular_b41()
calcular_b42()
calcular_b43()
calcular_b44()
}

function v_e(obj){

valor=obj.value 
    if (valor==parseFloat(valor) ) { 
	 return true
           
      }else{  obj.value=valor.substring(0,valor.length-1)} 
} 

function v_p(obj,numero){

valor=obj.value 
    if (valor>numero) { 
	 return true
           
      }else{ obj.value=numero} 
} 

function e_p()
{
if(event.keyCode==13) event.keyCode=9;
}


function get_opciones_1272() { 
  valores=''; 
  if (tableOfContents = document.getElementById('tabla_pool_1272')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox' && rows[x].checked) { 
                valores += (valores==''?'':',')+rows[x].name; 
			} 
		} 
  } 
  if(valores=='') alert('Seleccione una opcion. !!!'); 
  else { 
    window.open('http://217.76.135.107/tech-marketresearch.com/miniencuestas/briefing_datos_form.php?id=1272&valores='+valores,'encuesta_1272','width=250,height=150');
    document.getElementById('div_1272').style.display='none'; 
    if (tableOfContents = document.getElementById('tabla_pool_1272')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox') { 
                rows[x].disabled=true; ; 
			} 
		} 
    } 
  }
} 

function get_opciones_1254(opcion_id) { 
    window.open('http://217.76.135.107/tech-marketresearch.com/miniencuestas/briefing.php?id=1254&id_opcion='+opcion_id,'encuesta_1254','width=250,height=150');
} 

function get_opciones_1273() { 
  valores=''; 
  if (tableOfContents = document.getElementById('tabla_pool_1273')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox' && rows[x].checked) { 
                valores += (valores==''?'':',')+rows[x].name; 
			} 
		} 
  } 
  if(valores=='') alert('Seleccione una opcion. !!!'); 
  else { 
    window.open('http://217.76.135.107/tech-marketresearch.com/miniencuestas/briefing_datos_form.php?id=1273&valores='+valores,'encuesta_1273','width=250,height=150');
    document.getElementById('div_1273').style.display='none'; 
    if (tableOfContents = document.getElementById('tabla_pool_1273')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox') { 
                rows[x].disabled=true; ; 
			} 
		} 
    } 
  }
} 


function validar_leads_roitool()
 {	
 	 var x;
	 var obli;
	 var myType;
	 var colForms = document.forms	 

	 for (x=0;x!=document.plantilla_1_placeholder.length;x++)
	 {	 
	 	if (document.plantilla_1_placeholder.elements[x].type!="hidden")
		{
			if (navigator.userAgent.indexOf("Netscape6")!= -1)
			{
				obli=document.plantilla_1_placeholder.elements[x].getAttribute("obligar");
				msg=document.plantilla_1_placeholder.elements[x].getAttribute("msg");
			}
			else 	{ obli=document.plantilla_1_placeholder.elements[x].obligar;
					  msg=document.plantilla_1_placeholder.elements[x].msg;
					 }

			myType = document.plantilla_1_placeholder.elements[x].type;
			myType = myType.toLowerCase();
			if (myType=="text")
			{
				if (!Campo_blanco(document.plantilla_1_placeholder.elements[x].value, document.plantilla_1_placeholder.elements[x].name, obli, msg))
				{ 	document.plantilla_1_placeholder.elements[x].focus();
					return false;
				}
				else document.plantilla_1_placeholder.submit();
			} else {
				if ((myType=="select-one" || myType=="select") && !(document.plantilla_1_placeholder.elements[x].disabled))
				{
		 			if (!Campo_blanco(window.document.plantilla_1_placeholder.elements[x].options[window.document.plantilla_1_placeholder.elements[x].selectedIndex].value,
						document.plantilla_1_placeholder.elements[x].name, obli, msg))
						{
							document.plantilla_1_placeholder.elements[x].focus();
							return false;
						}
						else document.plantilla_1_placeholder.submit();
				}

			}
		}
	 }
  }  

function get_opciones_1279() { 
  valores=''; 
  if (tableOfContents = document.getElementById('tabla_pool_1279')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox' && rows[x].checked) { 
                valores += (valores==''?'':',')+rows[x].name; 
			} 
		} 
  } 
  if(valores=='') alert('Select an option. !!!'); 
  else { 
    window.open('http://www.tech-marketresearch.com/miniencuestas/briefing_datos_form.php?id=1279&valores='+valores,'encuesta_1279','width=250,height=150');
    document.getElementById('div_1279').style.display='none'; 
    if (tableOfContents = document.getElementById('tabla_pool_1279')) { 
		var rows = tableOfContents.getElementsByTagName('input'); ; 
		for (x=0; x < rows.length; x++) {  
			if (rows[x].type == 'checkbox') { 
                rows[x].disabled=true; ; 
			} 
		} 
    } 
  }
} 