/* Funcions javascript per a enviament del missatge a un amic */
var theUrl;
function getUrl(localizacion,fitxer) {
	var pepe;
	pepe=location.href;
	y=pepe.replace(fitxer,localizacion);
	
	document.write(y);
}	
function init() {
	theUrl = location.href;
}

function envia(titol, autor) {
	window.open('http://www.uoc.es/web/cat/articles/formulari/formulari.html?Titol='+titol+'&Autor='+autor+'&url='+theUrl+'','Formulari','width=540,height=450,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes,status=no');
}

function redirect(autor)
{
if(document.layers)
{
var index=document.layers['eines'].document.formu.idioma.options[document.layers['eines'].document.formu.idioma.selectedIndex].value;
}else{
var index=document.formu.idioma.options[document.formu.idioma.selectedIndex].value;
}
	
if (index==1) location.href="../../../../artnodes/espai/esp/art/" + autor + "/" + autor + ".html"
 	else
 	 	if (index==2) location.href="../../../../artnodes/espai/cat/art/" + autor + "/" + autor + ".html"
 	 	else
	 	 	if (index==3) location.href="../../../../artnodes/espai/eng/art/" + autor + "/" + autor + ".html"
		 	 	else
					 if (index==4) location.href= autor + "_abs.html"
				 	 	else
							 if (index==5) location.href= autor + "_resumen.html"
								else					
									location.href= autor + "_resum.html"
}

function pop(url) {
	window.open(url,'pop','width=500,height=160,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no');
}

function debat() {
	window.open('debat.html','Debat','width=300,height=200,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no');
}

function curriculum(url_cv) {
	window.open(url_cv,'Curriculum','width=500,height=400,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes,status=no');
}

function theAbstract(url_abs) {
	window.open(url_abs,'Abstract','width=500,height=400,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes,status=no');
}

function Note2See(evnt, strId) {
	if (document.all) {
		eval(strId).style.visibility = "visible";	
		eval(strId).style.top = evnt.y + document.body.scrollTop - 15;
	} else {
		document.layers[eval('\''+strId+'\'')].visibility = "visible";	
		document.layers[eval('\''+strId+'\'')].top = evnt.pageY - 15;	
	}
}

function Note2Hide(strId) {
	if (document.all) {
		eval(strId).style.visibility = "hidden";	
	} else {
		document.layers[eval('\''+strId+'\'')].visibility = "hidden";
	}
}

		function getWinNm() {
			var now = new Date();
			var hr = new String(now.getHours());
			var mn = new String(now.getMinutes());
			var sc = new String(now.getSeconds());
			var winNm = hr + mn + sc;
			return winNm;
				}
		
		function openWin(url) { //sense scrollbars
   			window.open(url,getWinNm(),'width=620,height=520,location=no,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,status=no');   			
			}

		function obre(url,wd,hg) {
   			window.open(url,getWinNm(),'width='+wd+',height='+hg+',location=no,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,status=no');   			
			}
		function obre2(url,wd,hg) {
   			window.open(url,getWinNm(),'width='+wd+',height='+hg+',location=no,toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=yes,status=no');   			
			}						
