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()*10000000000000000)))}

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('&')))
	terminaen=(liga.substring(liga.length-1,liga.length))
	if(terminaen!='0'){
		switch (cual){
			case "new_e.htm":cual="new_r_e.htm";break;
			case "distributors_e.htm":cual="distributors_r_e.htm";break;
			case "policies_e.htm":cual="policies_r_e.htm";break;
			//default:
		}
	}
	liga2=(document.location.search.lastIndexOf('nombre=')==-1?' ':document.location.search.substring(document.location.search.lastIndexOf('nombre')+7,document.location.search.length))
	liga2=liga2.substring(0,(liga2.lastIndexOf('&')==-1?liga2.length:liga2.indexOf('&')))
	w_nombre=(liga2==' '?'':'&nombre='+liga2)
	window.location.href=cual+'?sessionid='+liga+w_nombre
}