
// ------------------------------------------------------------------------
//  Script para control de menús realizado por:
//             Carles Martínez Rius (c) '2004
// 		rius@alumni.uv.es
//  No se permite la copia, distribución o modificación de
//  este código sin la obtención de un documento de conformidad
//  firmado por el autor. Posteriormente al citado procedimiento legal
//  será necesario indicar la fuente, y el autor del citado código en cada
//  código en el que sea utilizado.
// ------------------------------------------------------------------------

	var res = (navigator.appName).search("Microsoft");

	function marca_opcio(id)
	{
		if ( res == -1 )
			document.getElementById(id).style.background = '#ffcccc';
		else
			eval("document.all." + id + ".style.background = '#ffcccc'");
	}

	function desmarca_opcio(id)
	{
		if ( res == -1 )
			document.getElementById(id).style.background = '#ffffff';
		else
			eval("document.all." + id + ".style.background = '#ffffff'");
	}

	function marca_opcio2(id)
	{
		if ( res == -1 )
			document.getElementById(id).style.background = '#E4DB9A';
		else
			eval("document.all." + id + ".style.background = '#E4DB9A'");
	}

	function desmarca_opcio2(id)
	{
		if ( res == -1 )
			document.getElementById(id).style.background = '#ffffff';
		else
			eval("document.all." + id + ".style.background = '#ffffff'");
	}

	function mostra_descripcio(msg)
	{
		if ( res == -1 )
			document.getElementById("msgdesc").innerHTML = msg;
		else
			document.all.msgdesc.innerHTML =  msg ;
	}

	function vesA(link)
	{
		window.location.href = link;
	}

	function ObrirFinestraNEW(lloc,ample,alt)
	{
		finestraNEW = window.open(lloc,"finestraNEW","resizable=no,menubar=no,scrollbars=yes,status=no,width=" + ample + ",height=" + alt);
		finestraNEW.focus();
	}

	function lupamask(estado, obj)
	{
		var aux;
		var bgcolor;
		if ( estado=="on" ) { aux = "block"; bgcolor="#eeeeee" } else { aux = "none"; bgcolor="#dddddd" }

		if (res==-1) {
			document.getElementById(obj + "dins").style.display = aux;
			document.getElementById(obj).style.backgroundColor = bgcolor;
		} else {
			eval("document.all." + obj + "dins.style.display = aux");
			eval("document.all." + obj + ".style.backgroundColor = bgcolor");
		}
	}
