var NS = (navigator.appName == "Netscape") ? 1 : 0;
var idioma=CogeCookie('uverskuld');
if((idioma==null)||(idioma=='')) idioma='cas';
var mod=0;
var ap=0;
direccion=document.location.href;
var local = direccion.indexOf("file://") != -1;
var logocargado=false;
function compruebamenu(){
	if((typeof(em_merlin_main)!="undefined") && (typeof(em_merlin_main.location)!="undefined")){
		em_obtenhref();
		if(typeof(em_merlin_menu)!="undefined") em_merlin_menu.location.reload();
		if(typeof(em_merlin_main.em_merlin_menu2)!="undefined") em_merlin_main.em_merlin_menu2.location.reload();
		var str='<br><a href="javascript:parent.volver();" class="normal11x">';
		if(idioma=='cas') {
			if(mod) str+='Inicio';
			else str+='Idiomas';
		}
		if(idioma=='cat') {
			if(mod) str+='Inici';
			else str+='Idiomes';
		}
		str+='</a>';
		if(logocargado) em_merlin_top.document.getElementById('enlaceini').innerHTML=str;
	}
}
function em_obtenhref(){
	mod=0;
	ap=0;
	if(typeof(em_merlin_main.em_merlin_main2)!="undefined") direccion=em_merlin_main.em_merlin_main2.location.href;
	else direccion=em_merlin_main.location.href;
	var prestring="menu"+idioma+"/index";
	nro=direccion.lastIndexOf(prestring)+prestring.length;
	nro2=direccion.lastIndexOf(".html");
	actual=direccion.substr(nro,nro2-nro);
	strtemp=actual.split('_');
	if (strtemp.length >= 1){mod=parseInt(strtemp[0]);}
	if (strtemp.length >= 2){ap=parseInt(strtemp[1]);}
}
var myWin;
function oWin(url,targetname,params){
	if(typeof(myWin)!="undefined") myWin.close();
	myWin = window.open(url,targetname,params); 
	if (NS) myWin.focus();
}
function volver(){
	if(mod){
		pagina='menu'+idioma+'/index0.html';
		em_merlin_main.document.location.href=pagina;
	}else{
		GuardaCookie('uverskuld','');
		document.location.href='index.html';
	}
}
