   	function codifica(sCadena) {
		var sCodCadena = "";
		if (sCadena != "") {
			sCodCadena = escape(sCadena);
		}		
		return sCodCadena;
	}

	popup=function(u,n,w,h,toolbar,scroll)
	{
		if (!n)
		{
			var rand = parseInt(Math.random()*99999).toString()
			nv = "ventana"+rand
			n = "vent"+rand
		}
		else
		{
			nv=n+"ventana";
			n=n+"vent"
		}
		if (!w) w=200
		if (!h) h=200
		l=(screen.width-w)/2
		t=(screen.height-h)/2
		if (!toolbar) toolbar=0
		if (!scroll) scroll=0
		eval(n+'=open(u,nv,"width="+w+",height="+h+",resizable=1,toolbar="+toolbar+",scrollbars="+scroll+",left="+l+",top="+t)')
		vent=eval("window."+n)
		vent.focus()
		vent=null
	}
   	
