/* 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/esp/articles/formulari/formulario.html?Titol='+titol+'&Autor='+autor+'&url='+theUrl+'','Formulari','width=540,height=450,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no');
}

function debat() {
	window.open('debat.html',Math.round(Math.random()*100),'width=300,height=200,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=no,status=no');
}

function curriculum(url_cv) {
	window.open('../../ponents/'+url_cv,Math.round(Math.random()*100),'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,Math.round(Math.random()*100),'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) {
   			window.open(url,getWinNm(),'width=510,height=520,location=no,toolbar=yes,directories=no,menubar=yes,resizable=yes,scrollbars=yes,status=no');
			}

//****************(c) UOC 2002************************************IGP//
function getAudio (url) {	
	if (url.indexOf('http://') > -1) var cleaned_protocol=url.substring(7, url.length); 
	else if(url.indexOf('mms://') > -1) cleaned_protocol=url.substring(6, url.length); //Detecta el protocol i retorna la resta de contingut 
	
	if ((navigator.appVersion.substring(0,3)<'5') && (navigator.appName == 'Netscape')) location.href='http://'+ cleaned_protocol;
  else location.href='mms://'+cleaned_protocol; // obre finestra nova amb IE o bé localitza en la mateixa pàg. quan és <NS5
}
//*******************************************************************//
