//Ayuda
var HelpPrincipal = new Array();
HelpPrincipal[0]="<iframe src='Ayuda/registrarseOInscribirse.html' width='100%' height='100%'></iframe>"
HelpPrincipal[1]="<iframe src='../Ayuda/registrarseOInscribirse.html' width='100%' height='100%'></iframe>"
//HelpPrincipal[0]="Registrarse o Inscribirse?";

var popUpWin=0;
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function Entratour_DoFSCommand(command, args) {
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	//var myFlashObj = InternetExplorer ? Entratour :  document.Entratour;
	popUpWin = open('infoprincipal.aspx','popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=780,height=640,left=150,top=50,screenX=250,screenY=250');
 }  

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('Sub Entratour_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call Entratour_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
}
function BannerCNU_DoFSCommand(command, args) {
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	//var myFlashObj = InternetExplorer ? Entratour :  document.Entratour;
	popUpWin = open('E-cnu/index.aspx','popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=720,height=502,left=150,top=50,screenX=250,screenY=250');
 }  

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
  document.write('<SCRIPT LANGUAGE=VBScript\> \n');
  document.write('on error resume next \n');
  document.write('Sub BannerCNU_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call BannerCNU_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
}
function popUpWindow(URLStr,btn)
{
	if ((document.formprincipal.hddenc.value == 1) && (btn == 1)) {
		alert('Ud. ya voto');
	}
	else {
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
		}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=300,height=130,left=300,top=200,screenX=250,screenY=250');
	document.formprincipal.hddenc.value = 1;
	}
}

//Version para el nuevo site
function popUpWindowNuevo(URLStr,btn)
{
	campoH = document.getElementById("hddenc");
	if ((campoH.value == 1) && (btn == 1)) {
		alert('Ud. ya voto');
	}
	else {
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
		}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=300,height=130,left=300,top=200,screenX=250,screenY=250');
	campoH.value = 1;
	}
}


function popUpWindowCarr(URLStr)
{
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
		}
	popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=300,height=130,left=300,top=200,screenX=250,screenY=250');		
}

function popUpWindowNE(URLStr)
{
	var resol;
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	resol=window.screen.width
	if (resol > 800)
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width=800,height=550,left=115, top=138,screenX=250,screenY=250');
	else
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width=800,height=550,left=0, top=0,screenX=250,screenY=250');
}

function popUpWindowEXA(URLStr)
{
	var resol;
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	resol=window.screen.width
	if (resol > 800)
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=720,height=502,left=115,top=138,screenX=250,screenY=250');
	else
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=720,height=502,left=0, top=0,screenX=250,screenY=250');
}

function popUpWindowTRIVIA(URLStr)
{
	var resol;
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	resol=window.screen.width
	if (resol > 800)
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=600,height=400,left=115,top=138,screenX=250,screenY=250');
	else
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=600,height=400,left=0, top=0,screenX=250,screenY=250');
}

function popUpWindowSUDOKU(URLStr)
{
	var resol;
	if(popUpWin)
	{
	if(!popUpWin.closed) popUpWin.close();
	}
	resol=window.screen.width
	if (resol > 800)
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=700,height=526,left=115,top=138,screenX=250,screenY=250');
	else
	popUpWin = open(URLStr,'popUpWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=700,height=526,left=0, top=0,screenX=250,screenY=250');
}

function cadena(form,btn)
{
	var todo = '?vov=1';
	for (i=0; i < form.votos.length; i++)
	{
		if (form.votos[i].checked == true)		{
			todo = todo + '&opc=' + [i] ;
		}
	}
	if (todo != '?vov=1') 
	{
		popUpWindow('encuestas/verResultados.aspx' + todo , btn);
	}
}

//Version para el nuevo site
function cadenaNuevo(form,btn)
{
	var todo = '?vov=1';
	for (i=0; i < form.votos.length; i++)
	{
		if (form.votos[i].checked == true)		{
			todo = todo + '&opc=' + [i] ;
		}
	}
	if (todo != '?vov=1') 
	{
		popUpWindowNuevo('encuestas/verResultados.aspx' + todo , btn);
	}
}

function TamanoScreen(){
	var ww = window.screen.availWidth;
	if (ww >= 1024){
		document.write("------------------");	}
	else {
		document.write("-");}
}

function LoadPopUp(aTit,aRef){
	popupWinbChangeTexts = true;
	popupWinnTitle = aTit;			
	popupWinespopup_winLoad();
	//document.getElementById('popupWin').style.bottom = aBottom;
	document.getElementById('popupWin_content').innerHTML=HelpPrincipal[aRef];
}

function divvisible()
	{
		RedBull.style.display="";
		if (window.screen.width==800)
		{
			RedBull.style.right = "125px";
		}
		else
		{
			RedBull.style.right = "240px";
		}
	}
function cerrardiv(div)
	{
		RedBull.style.display = "none";		
	}	