function imprimirSinFoto() {
	var imgs = document.getElementsByTagName("img");
	var imgLen = imgs.length;
	for (i = 0; i < imgLen; i++) {
		var img = imgs[i];
		var imgsrc = img.src;
		if ((imgsrc.indexOf("/00000000060000000279.jpg") > 0) ||
			(imgsrc.indexOf("/00000000060000000280.jpg") > 0) ||
			(imgsrc.indexOf("/00000000060000000281.jpg") > 0)) {
				var obj = img.parentNode.parentNode;
				obj.style.visibility="hidden";
				var imght = img.height;
				img.height = 0;
				window.print();
				img.height = imght;
				obj.style.visibility="visible";
		}
	}
}

function isValidReferrer() {
	var father = document.referrer;
	var son  = location.href;
	var px = father.lastIndexOf("hgxpp001?");
	if (px==-1)	{ return false } // no es gxportal
	px = son.lastIndexOf("?");
	var pcoma = son.indexOf(",");
	var straux = son.substr(px+1,pcoma-px-1);
	var gxsitio = eval(straux);
	px = pcoma+1;
	pcoma = son.indexOf(",",px);
	straux = son.substr(px,pcoma-px);
	var gxcanal = eval(straux);
	px = son.indexOf(";",pcoma);
	px = son.indexOf(";",px+1);
	pcoma = son.indexOf(";",px+1);
	straux = son.substr(px+1,pcoma-px-1);
	var gxpagina = eval(straux);
	var fatherURL = "hgxpp001?"+gxsitio+","+gxcanal+","+gxpagina+",";
	return (father.indexOf(fatherURL)>=0)
}

function getTitle() {
	var thisURL   = location.href;
	var lastURL   = document.referrer;
	var lastPageTitle = getCookie("miga_last");

	var cases = new Array();
	var nc = 0;
	cases[nc] = new Array( new Array('6,5,69'), new Array('6,5,377','6,5,212','6,5,231','6,5,233','6,5,214','6,5,215','6,5,232'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,69'), new Array('6,5,379','6,5,212','6,5,231','6,5,233','6,5,214','6,5,215','6,5,232'), "Industria y Comercio · Sociedades", "Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personales - Opción"); nc +=1;
	cases[nc] = new Array( new Array('6,6,69'), new Array('6,6,379','6,6,212','6,6,415','6,6,231','6,6,233','6,6,214'),	"Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IVA", "Independiente · Opción IRAE"); nc +=1;
	cases[nc] = new Array( new Array('6,6,69'), new Array('6,6,379','6,6,212','6,6,415','6,6,231','6,6,233','6,6,214'),	"Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - IVA", "Capital - Inmob"); nc +=1;
	cases[nc] = new Array( new Array('6,6,69'), new Array('6,6,380','6,6,212','6,6,415','6,6,231','6,6,233','6,6,214'),	"Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - IVA", "IRAE Precep"); nc +=1;
	cases[nc] = new Array( new Array('6,5,70'), new Array('6,5,57','6,5,209','6,5,210'), "Empresas - Servicios · Sociedades - IPAT", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,70'), new Array('6,6,380','6,6,209','6,6,210'), "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - IPAT", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,74'), new Array('6,5,90','6,5,321'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - FIS", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,71'), new Array('6,5,90','6,5,318','6,5,319','6,5,449'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - IMESI", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,102'), new Array('6,5,365','6,5,425','6,5,168','6,5,166','6,5,175','6,5,173','6,5,293','6,5,292','6,5,174','6,5,171','6,5,176','6,5,391'), "Personas - IRPF · Rentas de Trabajo - Independiente · Mantiene IRPF", "Empresas - Servicios · Persona Física - Servicios Personales - Mantiene IRPF", "Física - Servicios Personales"); nc +=1;
	cases[nc] = new Array( new Array('6,5,123'), new Array('6,5,376','6,5,419','6,5,198','6,5,424'), "Personas - IRPF · Entidades que Atribuyen Rentas", "Empresas - Servicios · Entidades que Atribuyen Rentas", "Servicios"); nc +=1;
	cases[nc] = new Array( new Array('6,6,149'), new Array('6,6,379','6,6,342','6,6,345','6,6,368','6,6,346','6,6,351','6,6,366','6,6,364'), "- Impuesto al Patrimonio", "- IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT", "IRAE"); nc +=1;
	cases[nc] = new Array( new Array('6,5,149'), new Array('6,5,379','6,5,342','6,5,345','6,5,368','6,5,346','6,5,351','6,5,366','6,5,364'), "Personas - Impuesto al Patrimonio", "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT", "Personales - Opción"); nc +=1;
	cases[nc] = new Array( new Array('6,5,209','6,5,210'), new Array('6,5,70'), "Industria y Comercio", "Servicios",""); nc +=1;
	cases[nc] = new Array( new Array('6,6,209'), new Array('6,6,70'), "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - IPAT - Normativa", "",""); nc +=1;
	cases[nc] = new Array( new Array('6,6,210'), new Array('6,6,70'), "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - IPAT - Decl.Jurada", "",""); nc +=1;
	cases[nc] = new Array( new Array('6,5,212','6,5,231','6,5,233','6,5,214'), new Array('6,5,69'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,212','6,5,231','6,5,233','6,5,214'), new Array('6,5,69'), "Industria y Comercio · Sociedades", "Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personales - Opción"); nc +=1;
	cases[nc] = new Array( new Array('6,6,212','6,6,214','6,6,231','6,6,233','6,6,415'), new Array('6,6,69'), "Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IVA", "Independiente · Opción IRAE"); nc +=1;
	cases[nc] = new Array( new Array('6,6,212','6,6,214','6,6,231','6,6,233','6,6,415'), new Array('6,6,69'), "Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - IVA", "Inmobiliario - Opción IRAE"); nc +=1;
	cases[nc] = new Array( new Array('6,6,212','6,6,214','6,6,231','6,6,233','6,6,415'), new Array('6,6,69'), "Empresas - Industria y Comercio · Sociedades - IVA", "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - IVA", "IRAE Precep"); nc +=1;
	cases[nc] = new Array( new Array('6,5,214'), new Array('6,5,215','6,5,232'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,215','6,5,232'), new Array('6,5,214'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,302','6,5,313','6,5,392','6,5,304'), new Array('6,5,310'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,302','6,5,313','6,5,392','6,5,304'), new Array('6,5,310'), "Industria y Comercio · Sociedades", "Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personales - Opción"); nc +=1;
	cases[nc] = new Array( new Array('6,6,302','6,6,304','6,6,313','6,6,392','6,6,415'), new Array('6,6,310'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - Más Info", "Independiente · Opción IRAE"); nc +=1;
	cases[nc] = new Array( new Array('6,6,302','6,6,304','6,6,313','6,6,392'), new Array('6,6,310'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - Más Info - IRAE", "Capital - Inmob"); nc +=1;
	cases[nc] = new Array( new Array('6,6,302','6,6,304','6,6,313','6,6,392','6,6,415'), new Array('6,6,310'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - Más Info", "IRAE Precep"); nc +=1;
	cases[nc] = new Array( new Array('6,5,310'), new Array('6,5,377','6,5,302','6,5,313','6,5,392','6,5,304'), "Industria y Comercio · Sociedades", "Servicios · Entidades que Atribuyen Rentas - IRAE por Opción", "Atribuyen Rentas"); nc +=1;
	cases[nc] = new Array( new Array('6,5,310'), new Array('6,5,379','6,5,302','6,5,313','6,5,392','6,5,304'), "Industria y Comercio · Sociedades", "Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personales - Opción"); nc +=1;
	cases[nc] = new Array( new Array('6,6,310'), new Array('6,6,379','6,6,302','6,6,313','6,6,392','6,6,415','6,6,304'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - Más Info", "Independiente · Opc"); nc +=1;
	cases[nc] = new Array( new Array('6,6,310'), new Array('6,6,380','6,6,302','6,6,313','6,6,392','6,6,415','6,6,304'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo - Más Info", "IRAE Precep"); nc +=1;
	cases[nc] = new Array( new Array('6,6,310'), new Array('6,6,379','6,6,302','6,6,313','6,6,392','6,6,415','6,6,304'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - Más Info - IRAE", "Capital"); nc +=1;
	cases[nc] = new Array( new Array('6,5,318'), new Array('6,5,71'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - IMESI - Normativa", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,319'), new Array('6,5,71'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - IMESI - Decl.Jurada", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,321'), new Array('6,5,74'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - FIS - Normativa", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,342'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Preg.Frecuentes", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,342'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Preg.Frecuentes", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,345'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Normativa", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,345'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Normativa", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,346'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Instructivos", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,346'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Instructivos", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,351'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Plan.Cálculo", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,351'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Plan.Cálculo", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,364'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Trámite", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,364'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Trámite", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,366'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Decl.Jurada", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,366'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Decl.Jurada", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,5,368'), new Array('6,5,149'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE - IPAT - Anticipos", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,368'), new Array('6,6,149'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE - IPAT - Anticipos", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,379'), new Array('6,6,330'), "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - Más Info", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,379'), new Array('6,6,35'), "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,379'), new Array('6,6,310','6,6,69','6,6,149','6,6,212','6,6,214','6,6,231','6,6,233'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personas - IRPF · Rentas de Trabajo - Independiente · Opción IRAE", "Trabajo - Indep"); nc +=1;
	cases[nc] = new Array( new Array('6,6,379'), new Array('6,6,310','6,6,69','6,6,149','6,6,212','6,6,214','6,6,231','6,6,233'), "Empresas - Servicios · Persona Física - Servicios Personales - Opción IRAE", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE", "Capital - Inmob"); nc +=1;
	cases[nc] = new Array( new Array('6,6,380'), new Array('6,6,35','6,6,69','6,6,70','6,6,209','6,6,210','6,6,310','6,6,302','6,6,313','6,6,392','6,6,415','6,6,304'), "Personas - IRPF · Rentas de Trabajo - Independiente · IRAE Preceptivo", "", ""); nc +=1;
	cases[nc] = new Array( new Array('6,6,415'), new Array('6,6,310'), "Empresas - Industria y Comercio · Sociedades - IRAE", "Personas - IRPF · Rentas de Capital - Inmobiliario - Opción IRAE - Más Info - IRAE", "Capital - Inmob"); nc +=1;
	cases[nc] = new Array( new Array('6,5,419','6,5,198','6,5,424'), new Array('6,5,123'), "Personas - IRPF · Entidades que Atribuyen Rentas", "Empresas - Servicios · Entidades que Atribuyen Rentas", "Servicios"); nc +=1;
	cases[nc] = new Array( new Array('6,5,425','6,5,168','6,5,166','6,5,175','6,5,173','6,5,293','6,5,292','6,5,174','6,5,171','6,5,176','6,5,391'), new Array('6,5,102'), "Personas - IRPF · Rentas de Trabajo - Independiente · Mantiene IRPF", "Empresas - Servicios · Persona Física - Servicios Personales - Mantiene IRPF", "Física - Servicios Personales"); nc +=1;
	cases[nc] = new Array( new Array('6,5,449'), new Array('6,5,71'), "Empresas - Agropecuario y Agroindustrial · IRAE - Otros · Otros Impuestos - IMESI - De Interés", "", ""); nc +=1;

	for (cc = 0; cc < cases.length; cc++) {
		thisPCPs = cases[cc][0];
		prevPCPs = cases[cc][1];
		newTitle = cases[cc][2];
		replaceWith = cases[cc][3];
		included = cases[cc][4];
		for (tt=0; tt < thisPCPs.length; tt++) {
			thisPCP = thisPCPs[tt]
			for (pp=0; pp < prevPCPs.length; pp++) {
				prevPCP = prevPCPs[pp];
				if (((thisURL.lastIndexOf("001?"+thisPCP+","))!=-1)&&((lastURL.lastIndexOf("001?"+prevPCP+","))!=-1)) {
					if (replaceWith=="") {
						//setCookie("debug","rename:"+thisPCP+":"+prevPCP+":"+newTitle+":");				
						document.title = newTitle;
					} else {
						if ((included=="")||(lastPageTitle.lastIndexOf(included)!=-1)) {
							//setCookie("debug","replace:"+newTitle+":"+replaceWith+":");				
							document.title = document.title.replace(newTitle,replaceWith);
						}
					}				
				}
			}
		}
	}

	var thistitle =	document.title;
	return thistitle;
}

function breadcrumbs() {
	var aTit     = new Array();
	var aURL     = new Array();
	var sTit     = getTitle();
	var sURL     = location.href;
	var result   = "";
	var dadFound = false;
	var dadTit   = "";
	var thisPageTitle = sTit;
	var salir    = false;

	var pos = sURL.lastIndexOf("hgxpp001?");
	if (pos==-1) {
		pos = sURL.lastIndexOf("hgxpt001?");
	}
	if (pos!=-1) {
		sURL = sURL.substr(pos,sURL.length);
		sURL = sURL.replace(/,/g,"_").replace(/;/g,"-").replace("?","A");
	}
	pos = sTit.lastIndexOf(" - ");
	getCrumbs(aTit,aURL);
	if (pos<0) {
		posaux = sTit.indexOf("n de contenido");
		if (posaux>=0) {
			lastPageTitle = getCookie("miga_last");
			if (isValidReferrer()) {
				thisPageTitle = lastPageTitle;
				var posA = lastPageTitle.indexOf(" - Ampliaci");
				if (posA<0)	{
					thisPageTitle = lastPageTitle +" - Ampliaci&#243;n";
				}
				sTit = thisPageTitle;
				pos  = sTit.lastIndexOf(" - ");
			}
			else {
				// si llegó usando el "back" o no tengo una página anterior => no mostrará migas
			}
		}
	}
	while (pos>0) {
		var previous = sTit.substr(0,pos);
		var posaux = previous.lastIndexOf(" - ");
		if (posaux>0) {
			prevTit = previous.substr(posaux+3);
		}
		else {
			prevTit = previous;
		}
		if (!dadFound) {
			dadTit = previous;
			dadFound = true;
		}
		var dadUrl = findUrl(aTit,aURL,previous);
		if (dadUrl.length>0) {
			result = '<A href="'+dadUrl+'">'+prevTit+'</A>' + ' &#187 ' + result;
		}
		else {
			result = prevTit + ' &#187 ' + result;
//			document.write('<span style="font-family:Verdana,Arial;font-size:8pt;color:#ffffff">.</span>');
//			salir = true; // no encontrada la URL del padre (comparar título página de padre e hijo)
		}
		sTit = previous;
		pos = sTit.lastIndexOf(" - ");
	}
	if (!salir)	{
		sTit = thisPageTitle;
		if (result.length>0) {
			pos = sTit.lastIndexOf(" - ");
			result = result + sTit.substr(pos+2);
			result = '<span style="font-family:Verdana,Arial;font-size:8pt;color:#5a5a5a">'+result+'</span>';
			document.write(result);
		}
		setCookie("miga_last",thisPageTitle);
		newCrumb(aTit,aURL,sTit,sURL);
		saveCrumbs(aTit,aURL);
	}
}

function findUrl(aTit,aURL,crumb) {
	var found = false;
	var ff = 0;
	while ((!found)&&(ff<500)) {
		if ((aTit[ff]==crumb) || (aTit[ff].length==0)) {
			return aURL[ff].replace(/_/g,",").replace(/-/g,";").replace(/A/g,"?");	
		}
		ff++
	}
	return "";
}

function getCrumbs(aTit,aURL) {
	nc = 0;
	for (j = 0; j<10; j++) {
		var ckn = "miga" + String(j);
		var aux2 = getCookie(ckn);
		while (aux2!=="") {
			var hatspos = aux2.indexOf(".x.");
			if (hatspos>0) {
				var aux = aux2.substr(0,hatspos);
				aux2 = aux2.substr(hatspos+3);
			}
			else {
				aux = aux2;
				aux2 = "";
			}
			if (aux!=="") {
				var pipespos = aux.indexOf("_._");
				aTit[nc] = aux.substr(0,pipespos);
				aURL[nc] = aux.substr(pipespos+3);
				nc++;
			}
		}
	}
	while (nc<500) {
		aTit[nc] = "";
		aURL[nc] = "";
		nc++;
	}
}

function saveCrumbs(aTit,aURL) {
	var nc = 0;
	var j = 0;
	var ckv = "";
	while ((aTit[nc]!="")&&(j<10)) {
		var newCrumb = aTit[nc]+"_._"+aURL[nc];
		if ((ckv.length+newCrumb.length)<=1965) {
			if (ckv.length>0) {
				ckv = ckv + ".x." + newCrumb;
			}
			else {
				ckv = newCrumb;
			}
		}
		else {
			var ckn = "miga" + String(j);
			setCookie(ckn,ckv);
			ckv = newCrumb;
			j++;
		}
		nc++;
	}
	if ((ckv!=="")&&(j<10)) {
		var ckn = "miga" + String(j);
		setCookie(ckn,ckv);
	}
}

function newCrumb(aTit,aURL,newTit,newURL) {
	var posicion = existsCrumb(aTit,aURL,newTit,newURL);
	if (posicion==0) {
		push(aTit,aURL,499);
	}
	else {
		push(aTit,aURL,posicion);
	}
	aTit[0] = newTit;
	aURL[0] = newURL;
}

function push(aTit,aURL,hasta) {
	for (zz = hasta; zz>0; zz--) {
		aTit[zz] = aTit[zz-1];
		aURL[zz] = aURL[zz-1];
	}
}

function existsCrumb(aTit,aURL,newTit,newURL) {
	var ee = 0;
	var found = 0;
	while ((!found)&&(ee<500)) {
		if (aTit[ee]==newTit) {
			aURL[ee]==newURL; // refreshing, pensando en cambios de links
			found = ee;
		}
		ee++;
	}
	return found;
}

function setCookie( name, value) {
	setCookie2(name,value,0,'','','');
}

function setCookie2( name, value, expires, path, domain, secure ) {
	// set time, it's in milliseconds
	var today = new Date();
	today.setTime( today.getTime() );

	//if the expires variable is set, make the correct expires time, the current script below will set 
	//it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24
	
	if ( expires )
	{
	expires = expires * 1000 * 60 * 60 * 24;
	}
	var expires_date = new Date( today.getTime() + (expires) );

	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
	( ( path ) ? ";path=" + path : "" ) + 
	( ( domain ) ? ";domain=" + domain : "" ) +
	( ( secure ) ? ";secure" : "" );
}

function getCookie( check_name ) {
	// first we'll split this cookie up into name/value pairs
	// note: document.cookie only returns name=value, not the other components
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f
	
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		// now we'll split apart each name=value pair
		a_temp_cookie = a_all_cookies[i].split( '=' );
		
		
		// and trim left/right whitespace while we're at it
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
	
		// if the extracted name matches passed check_name
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			// we need to handle case where cookie has no value but exists (no = sign, that is):
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			// note that in cases where cookie is initialized but no value, null is returned
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return "";
	}
}