var cadena=document.location.search; cadena=cadena.substring(1,cadena.length);
var parametros=cadena.split("&"); var valores=new Array;
var nombres=new Array; var valores_legibles=new Array;
var temporal= new Array; var posicion=null;
var total=null;
for (var i=0; i<parametros.length;i++)
{
	temporal=parametros[i].split("=");valores[i]=temporal[1];nombres[i]=temporal[0];
	valores_legibles[i]=unescape(valores[i]);posicion=valores_legibles[i].indexOf("+");
	while (posicion > -1)
	{
		total=valores_legibles[i].length;
		valores_legibles[i]=valores_legibles[i].substring(0,posicion)+" "+valores_legibles[i].substring(posicion+1,total);
		posicion=valores_legibles[i].indexOf("+");
	}
}
if(document.location.search.length == 0){document.location.replace(document.location.href + '?sessionid=' + (Math.ceil(Math.random()*1000000000000000))+'0')}


<!-- privacidad de fotos -->
var message="Imágen Restringida uso exclusivo de: IC";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

function Ir(cual)
{
	liga=document.location.search.substring(document.location.search.lastIndexOf('sessionid')+10,document.location.search.length)
	liga=liga.substring(0,(liga.lastIndexOf('&')==-1?liga.length:liga.indexOf('&')))
	window.location.href=cual+'?sessionid='+liga;
}

function AplicarSoloSessionAtodosLosLinks(){
	permiso=false;
	liga=document.location.search.substring(document.location.search.lastIndexOf('sessionid')+10,document.location.search.length)
	liga=liga.substring(0,(liga.lastIndexOf('&')==-1?liga.length:liga.indexOf('&')))
	terminaen=(liga.substring(liga.length-1,liga.length))

	elsearch = document.location.search.split('&', document.location.search.length)
	if(elsearch.length>0)
	{
		for(i=0; i < document.links.length; i++)
		{
			if(document.links[i].search=='')
			{
				if(document.links[i].href.indexOf('javascript') < 0&&document.links[i].href.indexOf('mailto') < 0)
				{
					if (terminaen=='0'){
						document.links[i].href='javascript:alert("Se necesita registrarse para accesar a este Menú")'
					}else{	
						document.links[i].href += elsearch[0];
						permiso=true;
				  }
					}
				}
			else
			{
			}
		}
	}
}

function UnCliente(nombre,sessionid){
  alert((nombre==''?'Contraseña no válida':'Bienvenid@ ... '+nombre))
  window.location.href=(nombre==''?'promociones.htm':'promociones.htm?sessionid='+sessionid)
}

