/************* ACCESSIBILITAT *************/
var base=10;
function zoom(tipus){
	var maxi=14;
	var mini=6;
	if(tipus=="in" && base<maxi){
		base=base+2;
		document.body.style.fontSize=base+'px';
	}
	if(tipus=="out" && base>mini){
		base=base-2;
		document.body.style.fontSize=base+'px';	
	}
}
/************* ACCESSIBILITAT *************/

/********** MENÚS DESPLEGABLES ***********/
sfHover = function() {
	var sfEls = document.getElementById("SelMenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

sfHover2 = function() {
	var sfEls = document.getElementById("LangMenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfHover2";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfHover2\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
/********** MENÚS DESPLEGABLES ***********/

/************* FORMULARIS *****************/
function inputFocus(id, txt){
	if(document.getElementById(id).value==txt){
		document.getElementById(id).value="";
	}
}
function inputBlur(id, txt){
	if(document.getElementById(id).value==""){
		document.getElementById(id).value=txt;
	}
}
/************* FORMULARIS *****************/

$(function(){
	$("#mostrar").click(function(event) {
		event.preventDefault();
		$("#caja").slideToggle();
	});	
	$("#caja a").click(function(event) {
		event.preventDefault();
		$("#caja").slideUp();
	});
});
function MM_goToURL() { //v3.0
	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Link(Url){
	if(Url!=""){
		document.location.href=Url;
	}
}

//Envia form amb ENTER
function iSubmitEnter(oEvento, idFormulario){
     var iAscii;

     if (oEvento.keyCode)
         iAscii = oEvento.keyCode;
     else if (oEvento.which)
         iAscii = oEvento.which;
     else
         return false;

     if (iAscii == 13) document.getElementById(""+idFormulario).submit();

     return true;
}