function fMenu(uiValor){
	//alert(uiValor)
	if (uiValor==0){
		document.pantalla.action = "index.php";
		document.pantalla.submit();
	}else if(uiValor==1){
		//document.pantalla.action = "index_developer.php";
		document.pantalla.action = "index.php";
		document.pantalla.submit();
	
	}else if(uiValor==100){
		document.pantalla.action = "quienes_somos.php";
		document.pantalla.submit();
	}else if(uiValor==200){
		document.pantalla.action = "recomiendanos.php";
		document.pantalla.submit();
	}else if(uiValor==300){
		document.pantalla.action = "anunciate.php";
		document.pantalla.submit();
	}else if(uiValor==400){
		document.pantalla.action = "contactenos.php";
		document.pantalla.submit();
	}else if(uiValor==500){
		document.pantalla.action = "terminos_condiciones.php";
		document.pantalla.submit();
	}else if(uiValor==600){
		document.pantalla.action = "privacidad.php";
		document.pantalla.submit();
	}else if(uiValor==700){
		//alert("sitio");
		pagina_inicio();
	}else if(uiValor==800){
		document.pantalla.action = "socios-anuncio.php";
		document.pantalla.submit();
	}
}

function pagina_inicio(){
	//alert("entro1");
	obj_pagina_inicio.style.behavior='url(#default#homepage)';
	obj_pagina_inicio.setHomePage("http://www.guadalajara33.com");
} 

function inicio(objk){
	alert("entro2");
	direccion = "http://www.guadalajara33.com";
	//if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>3)){
		objk.style.behavior="url(#default#homepage)";
		objk.setHomePage(direccion);
	//}else{
	//	alert("su navegador no dispone de esta opción");
	//}
} 


function fBuscar1(sValor){
	//alert(sValor);
	if (sValor!=""){
		document.pantalla.cmpPalabra1.value = sValor;
		document.pantalla.cmpPalabra2.value = "n/d";
		document.pantalla.action = "buscador.php";
		document.pantalla.submit();
	}
}
function fBuscar2(sValor){
	if (sValor!=""){
		document.pantalla.cmpPalabra1.value = "n/d";
		document.pantalla.cmpPalabra2.value = sValor;
		document.pantalla.action = "buscador.php";
		document.pantalla.submit();
	}
}
function fBuscar3(sValor1,sValor2){
	//alert("entro");
	sValor = sValor1 + " " + sValor2;
	if (sValor!=""){
		document.pantalla.cmpPalabra1.value = sValor1;
		document.pantalla.cmpPalabra2.value = sValor2;
		//document.pantalla.action = "buscador.php?cmpPalabra1="+sValor1+"&cmpPalabra2="+sValor2;
		document.pantalla.action = "buscador.php";
		document.pantalla.submit();
	}
}

function fBuscar4(){
	sValor1= document.getElementById("cmpBuscar1").value;
	sValor2= document.getElementById("cmpBuscar2").value;
	//alert("sValor1=" +sValor1);
	sValor = sValor1 + " " + sValor2;
	if (sValor!=""){
		document.pantalla.cmpPalabra1.value = sValor1;
		document.pantalla.cmpPalabra2.value = sValor2;
		//document.pantalla.action = "buscador.php?cmpPalabra1="+sValor1+"&cmpPalabra2="+sValor2;
		document.pantalla.action = "buscador-gdl33.php";
		document.pantalla.submit();
	}
}

function fEnter(e){
	
	//http://questchile.wordpress.com/2007/08/
	evt = e ? e : event;
    tcl = (window.Event) ? evt.which : evt.keyCode;
    //alert(tcl);
	if (tcl == 32){
        //return false;
    }
	if (tcl == 13){
		fBuscar4();
	}
    return true;

}

function fRegresar(bValor){
	if (bValor==1){
		document.pantalla.action = "index.php";
		document.pantalla.submit();
	}
}
function fWeb(sUrl){
		 window.open ("http://"+sUrl,"mywindow");
}
function fPopUpBanner(uiValor){
		 //alert(uiValor);
		 if (uiValor==1){
			
			uiW=729;
			uiH=590;
			ancho=window.screen.width; 
			alto=window.screen.height; 
			sValorW = "width=" + uiW;
			sValorH = "height=" + uiH;
			anchof = (ancho - uiW)/2;
			altof = (alto - uiH)/2;
			var myRef;
			myRef = window.open('popup/promciones.htm',"fullscreen",'left=20,top=20,' + sValorW + ',' + sValorH + 
			',location=No, scrollbars=no,toolbar=0,status=0,resizable=no');
			myRef.focus();		
			myRef.moveTo(anchof,altof);
			
		 }
}

//getURL("javascript:fPopUp('pantalla.htm',100,200);");
function fPopUp(sPagina,uiW,uiH){
		
			//uiW=611;
			//uiH=400;
			ancho=window.screen.width; 
			alto=window.screen.height; 
			sValorW = "width=" + uiW;
			sValorH = "height=" + uiH;
			anchof = (ancho - uiW)/2;
			altof = (alto - uiH)/2;
			var myRef;
			myRef = window.open(sPagina,"fullscreen",'left=20,top=20,' + sValorW + ',' + sValorH + 
			',location=No, scrollbars=no,toolbar=0,status=0,resizable=no');
			myRef.focus();		
			myRef.moveTo(anchof,altof);
		
}
function fGeneraDato(sDiv,sDivValor){
	if(Spry.$(sDiv)!=null)Spry.Utils.setInnerHTML(sDiv,sDivValor);
}
function fNoCache(){
	var start = new Date();
	var sTiempo = start.getTime();
	//sVer = "?ver="+sTiempo;
	//sVer = "";
	return sTiempo;
}
String.prototype.reemplazar = function(termino1, termino2) {
	var temp_array = this.split(termino1);
	var new_cadena = "";
	for (var k = 0; k<temp_array.length; k++) {
		new_cadena += temp_array[k]+""+termino2;
	}
	new_cadena = new_cadena.substring(0, new_cadena.length-termino2.length);
	return new_cadena;
};
function fVerMicrositio(uiFolio){
	document.pantalla.action = "micrositio.php?ref="+uiFolio;
	document.pantalla.submit();
}