<!--

/*
   -- Mòdul de Funcions Globals v.3.9 --------------------------
   Copyright (c) 1999-2003 Albert Alcaine i Peralta
   Tots els drets reservats · All rights reserved
   Prohibit tot ús sense autorització escrita de l'autor
   Per a més informació consulteu la nota legal
   -------------------------------------------------------------
*/

// Funcions antispam ------------------------------------------------------
function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
	}
// ------------------------------------------------------------------------

// Funcions botó dret -----------------------------------------------------
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
// ------------------------------------------------------------------------

// Funcions antisel·lecció ------------------------------------------------
document.onselectstart=new Function("return false");
// ------------------------------------------------------------------------

// Funcions de formularis colorejats --------------------------------------
var highlightcolor="#F2F8F8"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
//var intended=/INPUT|TEXTAREA|SELECT|OPTION/
var intended=/INPUT|TEXTAREA/
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}
//Function to highlight form element
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
// ------------------------------------------------------------------------

// Funció de només enviar un cop ------------------------------------------
function submitonce(theform){
if (document.all||document.getElementById){
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true
}
}
}
// ------------------------------------------------------------------------

-->