/************************************************************/
/**SiteCatalyst code version: H.11.**************************/
/**Copyright 1997-2007 Omniture, Inc. More info available at*/
/**http://www.omniture.com***********************************/
//LIBRERIA DE DATOS DE OMNITURE
/*document.write("<script src='/CmsPanda/js/s_code.js' language='JavaScript'><\/script>");*/
//VARIABLES GENERALES
var s_URL;
var s_docHost;
var s_docURL;
var s_docProtocol;
var s_docPort;
var s_docParams;
//Añadimos los distintos paises de tratamiento
var paisTratamiento = new Array("usa","spain","france","germany","italy","portugal","sweden","uk","finland","shouthafrica","belgium","poland","hungary","canada-eng","canada-fr","switzerland-de","switzerland-fr","switzerland-it","brazil","netherlands","mexico","venezuela","argentina","colombia","bolivia","peru","lithuania","pakistan","romania","costarica","austria","thailand","ukraine","turkey","elsalvador","guatemala","israel","norway","denmark","puertorico","greece","uruguay","india","Slovakia","malasia","slovenia","srilanka","cyprus","paraguay","uae","latvia","bulgaria","chile","japan","china","taiwan","russia");
var paisPorDefecto = "international";
//Declaramos las variables de indice.
var indicePropiedad = 1;
var indicePropiedadP = 15;
//Parametros excluidos del tratamiento
var parametrosExcluidosP = new Array(/campoexcluido=/i);
//Nombre de las variables para el tratamiento con OMNITURE
vVariablePropiedad = "s.prop";
vVariableCanal = "s.channel";
vVariableHier = "s.hier1";
vVariablePageName = "s.pageName";
//FUNCIONES DE TRABAJO
//Funcion que define el pais o canal de tratamiento. Por defecto se pone el valor de la variable "paisPorDefecto"
function definirPais(valor)
{
	if (!valor) return paisPorDefecto;
	for (i=0;i<paisTratamiento.length;i++)
	{
		if (paisTratamiento[i] == valor)
		{
			return valor;
			break;
		}
	}
	return paisPorDefecto;
}
//Funcion que crea el campo segun el nombre del campo, el valor de paso y un indice numerico.
function crearCampos(campo,valor,indice)
{
	eval(campo + indice + ' = "' + valor + '"');
}
//Funcion que especifica si el parametro de paso del formulario ha de ser tratado o no.
function incluirParametroP(vParametro)
{
	for (var j=0;j<parametrosExcluidosP.length;j++)
	{
		if (vParametro.search(parametrosExcluidosP[j])>-1)
		{
			return false;
		}
	}
	return true;
}
//Funcion que crea las propiedades segun los directorios de paso. 
//El primero de ellos sera el canal en caso de que no este establecido.
function crearPropiedades(pDirectorios)
{
	if (eval(vVariableCanal + "=='" + paisPorDefecto + "'")) 
	{
		crearCampos(vVariablePropiedad,paisPorDefecto,indicePropiedad)
		indicePropiedad++;
	}
	for (i=0;i<pDirectorios.length;i++)
	{
		if (pDirectorios[i] == "")
			crearCampos(vVariablePropiedad,'/',indicePropiedad)
		else
			crearCampos(vVariablePropiedad,pDirectorios[i],indicePropiedad)
		indicePropiedad++;
	}
}
//Funcion que trata los parametros de paso como propiedades.
//Excluye los no deseados parametrosExcluidosP, el resto los incluye como estan.
function crearParametros()
{
	if (s_docParams && s_docParams != "") 
		s_docParams = s_docParams.substr(1,s_docParams.length);
	else
		return;
	vDocParams = s_docParams.split("&");
	for (i=0;i<vDocParams.length;i++)
	{
		if (incluirParametroP(vDocParams[i]))
		{
			crearCampos(vVariablePropiedad,vDocParams[i],indicePropiedadP)
			indicePropiedadP++;
		}
	}	
}
/*************************/
/*BLOQUE DE INSTRUCCIONES*/
/*************************/
//Toma de variables del objeto window.location. Puesto a minusculas para facilitar su tratamiento.
s_URL = window.location.href.toLowerCase();
s_docHost = window.location.hostname.toLowerCase();
s_docURL = window.location.pathname.toLowerCase();
s_docProtocol = window.location.protocol.toLowerCase();
s_docPort = window.location.port.toLowerCase();
s_docParams = window.location.search.toLowerCase();
//Troceamos la direccion en un array por la cadena "/"
var vDirectorios = s_docURL.split("/");
if (vDirectorios[0]=="") vDirectorios.shift();//En caso de que el primer valor sea nulo lo descartamos.
//Definimos el pais o canal al que se accede.
eval(vVariableCanal + "='" + definirPais(vDirectorios[0]) + "'");
//Definir las propiedades
crearPropiedades(vDirectorios);
//Definir los parametros
crearParametros();
//Establecemos las variables generales de Catalyst (variable HIER y PAGENAME).
if (indicePropiedad > 1)
{
	eval(vVariableHier + "=''");
	for (i=1;i<indicePropiedad;i++)
	{
		if (eval(vVariablePropiedad + i) != "/")
			eval(vVariableHier + "='" + eval(vVariableHier) + "/" + eval(vVariablePropiedad + i) + "'");
		else
			eval(vVariableHier + "='" + eval(vVariableHier) + eval(vVariablePropiedad + i) + "'");
	}
}
eval(vVariablePageName + "='" + eval(vVariableHier) + "'");
//************* NO ALTERAR LA SIGUIENTE LINEA **************/
//************* LINEA DE NEGOCIO DE OMNITURE****************/
var s_code = s.t();
if (s_code) document.write(s_code);
/**********************************************************/
/**End SiteCatalyst code version: H.11.********************/
/**********************************************************/

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 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')
	}
}
 
function gestcombo(surl)
{
	if (surl==1)
	{
		window.open ('http://acs.pandasoftware.com/updates/newversions/pbrowser.phtml?language=0')
	}
	else
	{
		location.href=surl;
	}	
} 


function abrirAnimacion(animacion)
{
			 
			 window.open(animacion,'multimedia','width=680,height=500,top=100');
}	
	
function pp(IdVendor, IdLang, IdPais)
{	
ancho = screen.width; 
alto = screen.height; 
							
				switch (IdLang)
				{
					case 1: //Castellano					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=es-ES&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,scrollbars=yes,Toolbar=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 2: //Ingles					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=en-US&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					
					case 6: //Frances					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=fr-FR&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 3: //Aleman					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=de-DE&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 11: //Italiano				
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=it-IT&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 10: //Portugues					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=pt-PT&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 9: //Japones					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=en-US&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 30: //Polaco					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=en-US&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 17: //Eslovaco					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=en-US&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					case 14: //Ruso					
						window.open("http://www.pandasecurity.com/activescan/index/?track="+IdVendor+"&Lang=ru-RU&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;
					default:  //por defecto
window.open("http://www.pandasecurity.com/activescan/index/?Idtrack="+IdVendor+"&Lang=en-US&IdPais="+IdPais,"","Directories=yes,Location=yes,Menubar=yes,Status=yes,Titlebar=yes,Toolbar=yes,scrollbars=yes,Resizable=yes,top=0, left=0, width="+ancho+",height="+ alto);
					break;

					
				}
			}




                                                                                                                                              
  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)
{
	var regMailInvalido = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // No valida
	var regMailvalido = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; // Valida
		
	if (! ((!regMailInvalido.test(email) && regMailvalido.test(email) ) ) )
    	{

		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 = 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');
	  url=texto.toLowerCase();

	  if (url.indexOf(".pandasecurity.com/spain")>0){
		window.open('http://www.pandasecurity.com/spain/utilities/EnviarAmigo/EnviarPagina.htm?SubjectMail='+ URLEncodeClientCorreo(SubjectMail) + '&texto=' + URLEncodeClientCorreo(texto),'Enviar_a_un_amigo' ,'resizable=no,width=295,height=450,left=0, top=0');
	  }
	  else if(url.indexOf(".pandasecurity.com/")>=0){
		window.open('http://www.pandasecurity.com/utilities/EnviarAmigo/EnviarPagina.htm?SubjectMail='+ URLEncodeClientCorreo(SubjectMail) + '&texto=' + URLEncodeClientCorreo(texto),'Enviar_a_un_amigo' ,'resizable=no,width=295,height=450,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 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 abrirEncuesta()
{

	url=location.href;
	url=url.toLowerCase();
	

	if ((url.indexOf(".pandasecurity.com/")>=0)||(url.indexOf(".pandasecurity.com/spain")>0)){window.open('http://www.tech-marketresearch.net/pag_transito/trans_web_es.html', '', 'menubar=no,scrollbars=yes');}
	else{if((url.indexOf(".pandasecurity.com/")>=0)||(url.indexOf(".pandasecurity.com/")>0)){window.open('http://www.tech-marketresearch.net/pag_transito/trans_web_com.html', '', 'menubar=no,scrollbars=yes');}}
	 
}