function popFrame(url,name,params){
	if(name=="PopSin"){
		popsyspath = "/osocial/popup/popupSinCapcelera.html";
	}else{
		popsyspath = "/osocial/popup/popup.html";
	}
	theurl=popsyspath+"?link="+url;
	window.open(theurl,name,params);
	}

function magnify(imgurl){
	magnifysyspath = "/osocial/popup/magnify.html";
	magnurl=magnifysyspath+"?link="+imgurl;
	window.open(magnurl,'magnify','resizable=yes,width=100,height=100');
	}

function popRebuild(){
	if(top.document.location==document.location){
		popsyspath = "/osocial/popup/popup.html";
		//alert("no se ha llamado desde popup frame: "+top.document.location);
		window.location=popsyspath+"?link="+document.location;
		}
	}
function navegador(){
	var agt = navigator.userAgent.toLowerCase();
	if(agt.indexOf("msie")!=-1){naveg="msie";}  // explorer
	else if(agt.indexOf("gecko")!=-1){naveg="gecko";}   // netscape 6 o superior
	else{naveg="ns4";} // netscape 4
	return naveg;
}

function getLangFromUrl(urlstring){
	if (urlstring.indexOf("/2/") != -1){ return 2;}  // Castellano
	else if (urlstring.indexOf("/3/") != -1){ return 3;} // English
	else { return 1;}  // Català
	}

function getFundFromUrl(furl){
	if (furl.indexOf("x1y") != -1){ return 1;}
	else if (furl.indexOf("x2y") != -1){ return 2;}
	else if (furl.indexOf("x3y") != -1){ return 3;}
	else if (furl.indexOf("x4y") != -1){ return 4;}
	else if (furl.indexOf("x0y") != -1){ return 0;}
	else if (furl.indexOf("x5y") != -1){ return 5;}
	else{return undefined;}
}

function getFundFromTitle(ptitle){
	if (ptitle.indexOf("FCC |") != -1){ return 1;}
	else if (ptitle.indexOf("FTP |") != -1){ return 2;}
	else if (ptitle.indexOf("FUSM |") != -1){ return 3;}
	else if (ptitle.indexOf("FVC |") != -1){ return 4;}
	else if (ptitle.indexOf("OS |") != -1){return 0;}
	else if (ptitle.indexOf("RD |") != -1){return 5;}
	else {return undefined;}
}
