// Funciones para funcionamiento de pagina pPiso de Exhibicion
// Por Nextia Marketing www.nextiamarketing.com

var xmlHttp = createXmlHttpRequestObject();
function createXmlHttpRequestObject(){
	var xmlHttp;
	try{
		xmlHttp = new XMLHttpRequest();
	}
	catch(e){
		var XmlHttpVersions = new Array("MSXML2.XMLHTTP.6.0",
										"MSXML2.XMLHTTP.5.0",
										"MSXML2.XMLHTTP.4.0",
										"MSXML2.XMLHTTP.3.0",
										"MSXML2.XMLHTTP",
										"Microsoft.XMLHTTP");
		for (var i=0; i<XmlHttpVersions.length && !xmlHttp; i++){
			try{
				xmlHttp = new ActiveXObject(XmlHttpVersions[i]);
			}
			catch (e) {}
		}
	}
	if (!xmlHttp)
		alert("Error creating the XMLHttpRequest object.");
	else
	return xmlHttp;
}

//Funciones para mostrar listas de eventos y proveedores***********************************************************************************************************
var EventUrl = "/Util/Php/pisoE.php";
function btnloadEC(le,ec,ep){
	window.location.replace('http://eventos.pisodeexhibicion.com/index.php?le='+ le + "&ec=" + ec + "&ep=" + ep);
}

function loadEvent(le,ec,ep){
	if(window.XMLHttpRequest){
		loadEvents(le,ec,ep);
		return;
	}
	if (window.ActiveXObject){
		loadEvents(le,ec,ep);
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function loadEvents(le,ec,ep){
	editableId = false;
	if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
		var query = EventUrl + "?le=" + le + "&ec=" + ec + "&ep=" + ep;
		xmlHttp.open("GET", query, true);
		xmlHttp.onreadystatechange = handleLoadEvents;
		xmlHttp.send(null);
	}
}
function handleLoadEvents(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		document.getElementById("ListBox").style.display = "inline";
		document.getElementById("ListBox").style.visibility = "visible";
		document.getElementById("Loading").style.display = "none";
		document.getElementById("Loading").style.visibility = "hidden";
//		document.getElementById("lstEC").disabled = "";
		response = xmlHttp.responseText;
		if (response.indexOf("ERRNO") >= 0 || response.indexOf("error") >= 0 || response.length == 0){
			alert(response.length == 0 ? "Server serror." : response);
			return;
		}
		xmlResponse = xmlHttp.responseText;
		if (window.XMLHttpRequest || window.ActiveXObject){
			var gridDiv = document.getElementById("ListBox");
			gridDiv.innerHTML=xmlHttp.responseText;
		}
	}
	else{
		document.getElementById("ListBox").style.display = "none";
		document.getElementById("ListBox").style.visibility = "hidden";
		document.getElementById("Loading").style.display = "inline";
		document.getElementById("Loading").style.visibility = "visible";
//		document.getElementById("lstEC").disabled = "disabled";
	}
}


var ProvUrl = "Util/Php/pisoP.php";
function btnloadP(act,sec,pg){
	window.location.replace('http://proveedores.pisodeexhibicion.com/index.php?act='+ act + "&sec=" + sec + "&pg=" + pg);
}
function loadProv(act,sec,pg){
	if(window.XMLHttpRequest){
		loadProvs(act,sec,pg);
		return;
	}
	if (window.ActiveXObject){
		loadProvs(act,sec,pg);
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function loadProvs(act,sec,pg){
	editableId = false;
	if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
		var query = ProvUrl + "?act=lp&sec=" + sec + "&pg=" + pg;
		xmlHttp.open("GET", query, true);
		xmlHttp.onreadystatechange = handleGridPageLoad;
		xmlHttp.send(null);
	}
}
function handleGridPageLoad(seccions,seccionh){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		document.getElementById("Loading").style.display = "none";
		document.getElementById("Loading").style.visibility = "hidden";
		document.getElementById("ListBox").style.display = "inline";
		document.getElementById("ListBox").style.visibility = "visible";
		document.getElementById("lstSeccion").disabled = "";
		response = xmlHttp.responseText;
		if (response.indexOf("ERRNO") >= 0 || response.indexOf("error") >= 0 || response.length == 0){
			alert(response.length == 0 ? "Server serror." : response);
			return;
		}
		xmlResponse = xmlHttp.responseText;
		if (window.XMLHttpRequest || window.ActiveXObject){
			var gridDiv = document.getElementById("ListBox");
			gridDiv.innerHTML=xmlHttp.responseText;
		}
	}
	else{
		document.getElementById("ListBox").style.display = "none";
		document.getElementById("ListBox").style.visibility = "hidden";
		document.getElementById("Loading").style.display = "inline";
		document.getElementById("Loading").style.visibility = "visible";
		document.getElementById("lstSeccion").disabled = "disabled";
	}
}

//Funciones para acceso de usuarios registrados******************************************************************************************************************

//Validacion de datos de acceso
function validLogin(){
	var DirMail = (document.getElementById('dirMail').value);
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(DirMail)){
		document.getElementById('dirMail').style.background = "#C2FFA3";
		return validMailU = 2;
		if (validMailU==2 && validPass==2){
			document.getElementById('btnIngresar').disable = "";
		}
	}
	else {
		document.getElementById('dirMail').style.background = "#FFB2B2";
		return validMail = 0;
	}
}
function validPass(){
	var PassU = (document.getElementById('PassU').value);
	if (/^\w{6,12}/.test(PassU)){
		document.getElementById('PassU').style.background = "#C2FFA3";
		return validPassU = 2;
		if (validMailU==2 && validPassU==2){
			document.getElementById('btnIngresar').style,visibility = "visible";
		}
	}
	else {
		document.getElementById('PassU').style.background = "#FFB2B2";
	}
}


function getCookie(c_name){
	if (document.cookie.length>0){
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1){
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
		return unescape(document.cookie.substring(c_start,c_end));
		}
	}
return "";
}
function setCookie(c_name,value,expiredays){
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function checkCookie(){
	username=getCookie('NombreU');
	var LoginF=document.getElementById('LoginF');
	var LoginW=document.getElementById('LoginW');
	if (username!=null && username!=""){
		LoginF.style.visibility="hidden";
		LoginF.style.height="0";
		LoginF.style.position="absolute";
		LoginW.style.visibility="visible";
		LoginW.style.height="auto";
		LoginW.style.position="relative";
	}
	else{
		LoginF.style.visibility="visible";
		LoginF.style.position="relative";
	}
}

function checkCookieReg(){
	username=getCookie('NombreU');
	if (username!=null && username!=""){
		document.getElementById('LoginW').innerHTML = ('Hola ' + username + '!<p/ >');
		document.write("<a href='/eDatosEvent01.php'>Registrar Evento</a><p/ >");
		document.write("<input type='submit' class='boton' value='Salir' onclick=cerrarSecion('NombreU','Password','DirMailU') />");
	}
	else{
		location.href = "/";
	}
}
function cerrarSecion(NombreU,PassU,DirMailU,idUserU){
	setCookie(NombreU,"",-1);
	setCookie(PassU,"",-1);
	setCookie(DirMailU,"",-1);
	setCookie(idUserU,"",-1);
	//location.href = "/Login.php";
	window.open('/','_parent');
}

function checkU(){
	if(window.XMLHttpRequest){
		checkUser();
		return;
	}
	if (window.ActiveXObject){
		checkUser();
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function checkUser(){
	var DirMail = (document.getElementById('DirMailU').value);
	var uPass = (document.getElementById('Password').value);
	if (DirMail!=null && DirMail != "" && uPass!=null && uPass != ""){
		editableId = false;
		if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
			var params = 'DirMailU=' + DirMail + '&Password=' + uPass;
			xmlHttp.open("GET", "Ingresar.php?DirMailU=" + DirMail + "&Password=" + uPass, true);
			xmlHttp.onreadystatechange = handlecheckUser;
			xmlHttp.send();
		}
	}
	else {
		alert("El email y contrase�a no deben estar vacios")
	}
}
function handlecheckUser(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		response = xmlHttp.responseText;
		if (response.indexOf("ERRNO") >= 0 || response.indexOf("error") >= 0 || response.length == 0){
			alert(response.length == 0 ? "Server serror." : response);
			return;
		}
		xmlResponse = xmlHttp.responseText;
		if (window.XMLHttpRequest || window.ActiveXObject){
			if (xmlHttp.responseText == "badUser"){
				var r = confirm("Los datos son incorrectos o el usuario no esta registrado, �Deseas registrarte ahora?"); 
				if (r == true){
					parent.location.href = "/RegUser/index.php";
				}
			}
			else if (xmlHttp.responseText == "badPass"){
				alert("Contrase�a erronea");
				document.getElementById('Password').focus();
				document.getElementById('Password').select();
			}
			else if (xmlHttp.responseText == "ok"){
				parent.location.reload()
			}
		}
	}
}

//Funciones para registro de nuevos usuarios**************************************************************************************************************************
var DirMailUs = false; 
var PasswordU = false;
var checkEmpyCampU = false;
function checkFormRegU01(){
		checkMail();
		checkPassword();
		checkEmpyCamp('NombreU');
		checkEmpyCamp('Apellidos');
		checkEmpyCamp('Profesion');
		checkEmpyCamp('Sexo');	
		checkEmpyCamp('DiaN');
		checkEmpyCamp('MesN');
		checkEmpyCamp('AnoN');
	if(DirMailUs == true && PasswordU == true && checkEmpyCampU == true){
		document.getElementById("RegU1").submit();
	}
	else{
	alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkFormRegU02(){
	var CP = checkEmpyCamp('CP');
	var DelMun = checkEmpyCamp('DelMun');
	var Estado = checkEmpyCamp('Estado');
	var Pais = checkEmpyCamp('Pais');	
	var LadaTel = checkEmpyCamp('LadaTel');
	var Telefono= checkEmpyCamp('Telefono');
	if(CP == true && DelMun == true && Estado == true && Pais == true && LadaTel == true && Telefono == true){
		document.getElementById("RegU2").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkFormRegU03(){
	document.getElementById("RegU3").submit();
}

function checkMail(){
	if(window.XMLHttpRequest){
		checkMailS();
		return;
	}
	if (window.ActiveXObject){
		checkMailS();
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function checkMailS(){
	var DirMail = (document.getElementById('dirMail').value);
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(DirMail)){
		editableId = false;
		if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
			var query = "../../Util/Php/uCompUserReg.php?DirMailU=" + DirMail;
			xmlHttp.open("GET", query, true);
			xmlHttp.onreadystatechange = handleCheckMail;
			xmlHttp.send();
		}
	}
	else {
		document.getElementById('dirMail').style.background = "#FFB2B2";
		return DirMailUs = false;
	}
}
function handleCheckMail(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		response = xmlHttp.responseText;
		if (response.indexOf("ERRNO") >= 0 || response.indexOf("error") >= 0 || response.length == 0){
			alert(response.length == 0 ? "Server serror." : response);
			return;
		}
		xmlResponse = xmlHttp.responseText;
		if (window.XMLHttpRequest || window.ActiveXObject){
			if (xmlHttp.responseText == "ok"){
				alert ("La direccion de correo ya esta registrada");
				document.getElementById('dirMail').style.background = "#FFB2B2";
				document.getElementById('dirMail').value = "";
				document.getElementById('dirMail').focus();
				document.getElementById('dirMail').select();
				return DirMailUs = false;
			}
			else{
				document.getElementById('dirMail').style.background = "#C2FFA3";
				return DirMailUs = true;
			}
		}
	}
}

function checkPassword(){
	var Pass01 = (document.getElementById('PassA').value);
	var Pass02 = (document.getElementById('PassB').value);
	if (/^\w{6,12}/.test(Pass02)){
		if (Pass01 == Pass02){
			document.getElementById('PassA').style.background = "#C2FFA3";
			document.getElementById('PassB').style.background = "#C2FFA3";
			return PasswordU = true;
		}
		else{
			alert("Introdisca su contraseña")
			document.getElementById('PassA').value = "";
			document.getElementById('PassB').value = "";
			document.getElementById('PassA').style.background = "FFB2B2";
			document.getElementById('PassB').style.background = "FFB2B2";
			document.getElementById('PassA').focus();
			document.getElementById('PassA').select();
			return PasswordU = false;
		}
	}
	else{
		alert("La contraseña debe contener entre 6 y 12 caracteres")
		document.getElementById('PassA').value = "";
		document.getElementById('PassB').value = "";
		document.getElementById('PassA').style.background = "#FFB2B2";
		document.getElementById('PassB').style.background = "#FFB2B2";
		document.getElementById('PassA').focus();
		document.getElementById('PassA').select();
		return PasswordU = false;
		
	}
}

function checkEmpyCamp(thisCamp){
	if (document.getElementById(thisCamp).value != ""){
		document.getElementById(thisCamp).style.background = "#C2FFA3";
		return checkEmpyCampU = true;
	}
	else{
		document.getElementById(thisCamp).style.background = "#FFB2B2";
		return checkEmpyCampU = false;
	}
}

var regUserUrl = "../uSndDatesReg.php";
function regUser(regDates){
	if(window.XMLHttpRequest){
		sendRegs(regDates);
		return;
	}
	if (window.ActiveXObject){
		sendRegs(regDates);
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function sendRegs(regDates){
	editableId = false;
	if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
		var query = regUserUrl + regDates;
		xmlHttp.open("GET", query, true);
		xmlHttp.onreadystatechange = handleSendReg;
		xmlHttp.send(null);
	}
}
function handleSendReg(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		if (window.XMLHttpRequest || window.ActiveXObject){
			document.getElementById("RegDates").innerHTML=xmlHttp.responseText;
			document.getElementById("NoPaso").innerHTML="Paso 5 de 5";
			document.getElementById("TitPaso").innerHTML="Confirmaci&#243;n";
			document.getElementById('FLogin').src="/Login.php";
		}
	}
	else{
		document.getElementById("RegDates").innerHTML = "Procesando " + xmlHttp.readyState + xmlHttp.status;
	}
}

//Funciones para agregar y administrar eventos*********************************************************************************

function checkFormRegE(){
	var NombreE = checkEmpyCamp('NombreE');
	var Organiza = checkEmpyCamp('Organiza');
	var Contacto = checkEmpyCamp('Contacto');
	var LadaTel = checkEmpyCamp('LadaTel');	
	var Telefono = checkEmpyCamp('Telefono');	
	var DirMail = checkEmpyCamp('DirMail');
	if(NombreE == true && Organiza == true && Contacto == true && Telefono == true && DirMail == true){
		document.getElementById("RegE").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkFormRegE01(){
	var CantVis = checkEmpyCamp('CantVis');
	var CantExp = checkEmpyCamp('CantExp');
	var Edicion = checkEmpyCamp('Edicion');	
	var MCuadradosE = checkEmpyCamp('MCuadradosE');
	var idSeccionE = checkRama('idECE');
	var Tipo = checkEmpyCamp('Tipo');
	var Perfil = checkEmpyCamp('Perfil');
	var idRecintoE = checkRecinto('idSESite');
	var Ciudad = checkEmpyCamp('Ciudad');
	var DescripcionEsp = checkEmpyCamp('DescripcionEsp');
	if(NombreE == true && CantVis == true && CantExp == true && Edicion == true && MCuadradosE == true && 
		idSeccionE == true && Tipo == true && Perfil == true && idRecintoE == true && Ciudad == true &&
		DescripcionEsp == true){
		document.getElementById("RegE1").submit();
	}
	else{
	alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkRama(idRamaE){
	var idRama = document.getElementById(idRamaE);
	var oRama = document.getElementById('ECEvents');
	if(idRama.value != ""){
		if (idRama.value == "z.Otro"){
			oRama.style.visibility = "visible";
			oRama.disabled = "";
				if (oRama.value != ""){
					return idSeccionE = true;
				}
				else{
					return idSeccionE = false;
				}
		}
		else{
			oRama.style.visibility = "hidden";
			oRama.value = idRama.value;			
			return idSeccionE = true;
		}
	}
	else{
		oRama.style.visibility = "hidden";
		return idSeccionE = false;
	}
}

function checkRecinto(idRecint){
	var idRecinto = document.getElementById(idRecint);
	var oRecinto = document.getElementById('SESite');
	if(idRecinto.value != ""){
		if (idRecinto.value == "z"){
			oRecinto.style.visibility = "visible";
			oRecinto.disabled = "";
				if (oRecinto.value != ""){
					return idRecintoE = true;
				}
				else{
					return idRecintoE = false;
				}
		}
		else{
			oRecinto.style.background = "";
			oRecinto.style.visibility = "hidden";
			oRecinto.value = idRecinto.value;					
			return idRecintoE = true;
		}
	}
	else{
		oRecinto.style.background = "";
		return idRecintoE = false;
	}
}

function checkFormRegE02(){
	var Organiza = checkEmpyCamp('Organiza');
	var Contacto = checkEmpyCamp('Contacto');
	var Cargo = checkEmpyCamp('Cargo');
	var Telefono = checkEmpyCamp('Telefono');	
	var DirMail = checkEmpyCamp('DirMail');
	if(Organiza == true && Contacto == true && Cargo == true && Telefono == true && DirMail == true){
		document.getElementById("RegE2").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkFormRegE03(){
	var DiaInicio = checkEmpyCamp('DiaInicio');
	var MesInicio = checkEmpyCamp('MesInicio');
	var AnoInicio = checkEmpyCamp('AnoInicio');
	var DiaFin = checkEmpyCamp('DiaFin');	
	var MesFin = checkEmpyCamp('MesFin');
	var AnoFin = checkEmpyCamp('AnoFin');
	var HoraInicio = checkEmpyCamp('HoraInicio');
	var HoraFin = checkEmpyCamp('HoraFin');
	if(DiaInicio == true && MesInicio == true && AnoInicio == true && DiaFin == true && MesFin == true &&
		AnoFin == true && HoraInicio == true && HoraFin == true){
		document.getElementById("RegE3").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function writeHour(idHour,e){
	var hour = document.getElementById(idHour).value;
	var pressKey = e.keyCode;
	if(hour.length < 5){
		if(hour.length == 2 && pressKey != 8){
			document.getElementById(idHour).value = hour + ":";
		}
	}
}

function checkFormRegE04(){
	if(1==1){
		document.getElementById("RegE4").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

function checkFormRegE05(){
	if(1==1){
		document.getElementById("RegE5").submit();
	}
	else{
		alert("Llena todos los campos marcados para continuar con el registro");
	}
}

var regEventUrl = "../../Util/Php/eSndEventReg.php";
function regEvent(regDates){
	if(window.XMLHttpRequest){
		sendRegsE(regDates);
		return;
	}
	if (window.ActiveXObject){
		sendRegsE(regDates);
		return;
	}
	alert("Your browser doesn't support the necessary functionality.");
}
function sendRegsE(regDates){
	editableId = false;
	if (xmlHttp && (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)){
		var query = regEventUrl + regDates;
		xmlHttp.open("POST", query, true);
		xmlHttp.onreadystatechange = handleSendRegE;
		xmlHttp.send(null);
	}
}
function handleSendRegE(){
	if (xmlHttp.readyState == 4 && xmlHttp.status == 200 ){
		if (window.XMLHttpRequest || window.ActiveXObject){
			document.getElementById("RegDates").innerHTML=xmlHttp.responseText;
			document.getElementById("NoPaso").innerHTML="Paso 6 de 6";
			document.getElementById("TitPaso").innerHTML="Confirmaci&#243;n";
		}
	}
	else{
		document.getElementById("RegDates").innerHTML = "Procesando" + xmlHttp.readyState;
	}
}

//Funciones generales********************************************************************************************************************************************


//regresa pagina
function goBack(){
	window.history.back()
}

//Abrir pagina en una ventana nueva
function OPNW(Page){
	window.open(Page)
}

//Abrir pagina en la misma ventana
function OPSW(Page){
	window.open(Page,'_parent')
}

//Guardar pagina en favoritos
function bookmark()
	{window.external.AddFavorite("http://www.pisodeexhibicion.com/","www.pisodeexhibicion.com")
}

//Mostrar imagenes de fotoreportaje an mayor resoluci&#243;n
function showHrImage(imgDir,imgName,urlPage ){
	myWindow=window.open('','','width=840,height=620,scrollbars=yes');
	myWindow.document.write("<h1 style='color;#663399; font-family:arial; margin:0px; padding:0px; font-size:18px; ' >" + imgName + "</h1>");
	myWindow.document.write("<a href='http://" + urlPage + "' >" + urlPage + "</a>");
	myWindow.document.write("<img src='/Pub/1009/Images/Fotoreportaje/Fot-hrRecintosFerialesMexico" + imgDir + ".jpg' alt='" + imgName + "' style='border:3px solid #663399; margin-top:5px;'/>");
	myWindow.focus()
}

function showHrImageAll(imgDir,imgName ){
	myWindow=window.open('','','width=840,height=620,scrollbars=yes');
	myWindow.document.write("<h1 style='color;#663399; font-family:arial; margin:0px; padding:0px; font-size:18px; ' >" + imgName + "</h1>");
	myWindow.document.write("<img src='/Pub/" + imgDir + ".jpg' alt='" + imgName + "' style='border:3px solid #663399; margin-top:5px;'/>");
	myWindow.focus()
}

//Genera dias del mes
function DiasMes(){
	var i=0;
	for (i=1;i<=31;i++){
		document.write("<option value=" + i + ">" + i + "</option>");
	}
}

function MesAno(){
	var x;
	var mesesAno = new Array();
				mesesAno[1]="Enero";
				mesesAno[2]="Febrero";
				mesesAno[3]="Marzo";
				mesesAno[4]="Abril";
				mesesAno[5]="Mayo";
				mesesAno[6]="Junio";
				mesesAno[7]="julio";
				mesesAno[8]="Agosto";
				mesesAno[9]="Septiembre";
				mesesAno[10]="Otubre";
				mesesAno[11]="Noviembre";
				mesesAno[12]="Diciembre";
	for (x in mesesAno){
		document.write("<option value=" + mesesAno[x] + ">" + mesesAno[x] + "</option>");
	}
}

//Genera los ultimos 100 a&#241;os en orden decendente
function AnosDes(){
	var date = new Date();
	var i=(date.getFullYear());
	for (i=(date.getFullYear());i>=(date.getFullYear()-100);i--){
		document.write("<option value=" + i + ">" + i + "</option>");
	}
}

function AnosAse(){
	var date = new Date();
	var i=(date.getFullYear());
	for (i=(date.getFullYear());i<=(date.getFullYear()+10);i++){
		document.write("<option value=" + i + ">" + i + "</option>");
	}
}

function showhLogo(boxLetter,stepNo){
	document.getElementById(boxLetter).src = "/Images/Web/" + boxLetter + stepNo + ".gif";
}

function showSubMenu(seccions,seccionh){
	show = document.getElementById(seccions);
	hide = document.getElementById(seccionh);
		show.style.visibility = "visible";
		show.style.height = "auto";
		hide.style.visibility = "hidden";
		hide.style.height = "0px";
	HeightMenuS();
}

function todayDate(){
	var d=new Date()
	var weekday=new Array(7);
	weekday[0]="Domingo";
	weekday[1]="Lunes";
	weekday[2]="Martes";
	weekday[3]="Mi&#233;rcoles";
	weekday[4]="Jeves";
	weekday[5]="Viernes";
	weekday[6]="Sabado";
	var monthAno=new Array(12);
	monthAno[0]="Enero";
	monthAno[1]="Febrero";
	monthAno[2]="Marzo";
	monthAno[3]="Abril";
	monthAno[4]="Mayo";
	monthAno[5]="Junio";
	monthAno[6]="Julio";
	monthAno[7]="Agosto";
	monthAno[8]="Septiembre";
	monthAno[9]="Octubre";
	monthAno[10]="Noviembre";
	monthAno[11]="Diciembre";
	document.write(weekday[d.getDay()] + " " + d.getUTCDate() + " / " + monthAno[d.getMonth()] + " / " + d.getFullYear());
}
