 function gup( name ){  
   name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
   var regexS = "[\\?&]"+name+"=([^&#]*)";  
   var regex = new RegExp( regexS );  
   var results = regex.exec( window.location.href );  
   if( results == null )    
   return "";  
   else    
   return results[1];}  
function leerCookie(name) {var dc = document.cookie;var prefix = name + "=";var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
	begin = dc.indexOf(prefix);
	if (begin != 0) return null;
	} else
	begin += 2;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
	end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end).toLowerCase());}
function ponerCookie(name, value) {
var curCookie = name+"=" + site + "; expires=Fri, 31-Dec-2100 00:00:00 GMT;path=/;domain=.abc.es";
document.cookie = curCookie;
var curCookie2 = name+"=" + site + "; expires=Fri, 31-Dec-2100 00:00:00 GMT;path=/;domain=.abcdesevilla.es";
document.cookie = curCookie2;
}
function borrarCookie(name) {var curCookie = name + "=;domain=abc.es;expires=Thu,01-Jan-70 00:00:01 GMT;";
document.cookie = curCookie;
var curCookie2 = name + "=;domain=abcdesevilla.es;expires=Thu,01-Jan-70 00:00:01 GMT;";
document.cookie = curCookie2;}
function ponerCookieSite(site){
borrarCookie("edicabc");
if (document.location.host=="www.abcdesevilla.es")
{
var curCookie = "edicabc=" + site + "; expires=Fri, 31-Dec-2100 00:00:00 GMT;path=/;domain=.abcdesevilla.es";
document.cookie = curCookie;
}
else{
var curCookie2 = "edicabc=" + site + "; expires=Fri, 31-Dec-2100 00:00:00 GMT;path=/;domain=.abc.es";
document.cookie = curCookie2;
}
}
function redireccionar() {
	var param = gup( 'cambio' );
	var param2 = gup( 'urlini' );
	var param3 = gup( 'ce' );
if((param=='1') && (param3!=""))
{
if (param2.indexOf("abc.es")>-1)
{
var curCookie = "edicabc=; expires=Thu,01-Jan-70 00:00:01 GMT;path=/;domain=.abcdesevilla.es";
document.cookie = curCookie;
}
else
{
var curCookie2 = "edicabc=; expires=Thu,01-Jan-70 00:00:01 GMT;path=/;domain=.abc.es";
document.cookie = curCookie2;
}
}
var host2 = document.location.host;
	var valor = leerCookie("edicabc");
if(valor != "" &&  valor != "null"  &&  valor != "undefined" &&  valor != null) {
if(host2 != valor ) {
	var protocol = document.location.protocol;
	var host = valor;
	var pathname = document.location.pathname;
	var hash = document.location.hash;
	var url = protocol + '//' + host + pathname + hash;
if(param=='1') {
			document.location.href =document.location.href.replace(document.location.host,valor);
		}
		else
			{
				if (param3!="")
				{

				document.location.href = document.location.href.replace(document.location.host,valor)+"?cambio=1&urlini="+host2;
				}
				else
				{
					if(host2!="paginasegura.abc.es")
						document.location.href = document.location.href.replace(document.location.host,valor)+"?cambio=1&urlini="+host2;
				}
			}
}}}
function validarCookie(){var f;var rtn="";var i;
	f=document.f;
	var indice = f.ce.selectedIndex; 
  rtn = f.ce.options[indice].value;
	ponerCookieSite(rtn);
	}
function leerDatos(){var i;var nav = leerCookie("edicabc");}	
// redireccionar();

