<!--
var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindowDinamic(theURL,winName,width,height) { //v2.0
	var scrollbars;
	var top, left;

	if (width>screen.availWidth) {
		width = screen.availWidth - 50;
		left = 10;
		scrollbars = ', scrollbars=yes';
	} else {
		left = screen.availWidth/2 - width/2;
	}

	if (height>screen.availHeight) {
		height = screen.availHeight - 50;
		top = 10;
		scrollbars = ', scrollbars=yes';
	} else {
		top = screen.availHeight/2 - height/2;
	}
	window.open(theURL, winName, 'resize=no, menubar=no, left=' + left + ', top=' + top + scrollbars + ', width=' + width + ', height=' + height);
}

/*
JavaScript equivalent of java.net.URLEncoder.encode(String s)
(from Java Docs:-)
1.The ASCII characters 'a' through 'z', 'A' through 'Z', and '0'
  through '9' remain the same.
2.The space character ' ' is converted into a plus sign '+'.
3.All other characters are converted into the 3-character string
  "%xy", where xy is the two-digit hexadecimal representation of
  the lower 8-bits of the character.

usage: var coded = URLEncoder(string);

JavaScript equivalent of java.net.URLDecoder.decode(String s)
1.Exact reverse of java.net.URLEncoder.encode(String s)

usage: var decoded = URLDecoder(string);

Note: prior to JScrip 5.5 String.replace() will not accept a function
as it's second parameter so the function set-up will try to compensate.
*/
if('a'.replace(/a/, function(){return '';}).length == 0){
    window.URLDecoder = function(str){
        return str.replace(/%[0-9a-f]{2}|\+/gi, dec);
        function dec(cMatch){
            if(cMatch == '+')return ' ';
            var len = cMatch.length;
            var hex = cMatch.substring((len-2), len);
            return String.fromCharCode(parseInt(hex, 16));
        }
    }
    window.URLEncoder = function(str){
        return str.replace(/[^a-z0-9]/gi, enc);
        function enc(cMatch){
            if(cMatch == ' ')return '+';
            var hex = cMatch.charCodeAt(0).toString(16);
            var len = hex.length;
            switch(len){
                case 0:
                    hex = '00';
                    break;
                case 1:
                    hex = '0'+hex;
                case 2:
                    break;
                defalt:
                    hex = hex.substring((len-2), len);
                    break;
            }
            return '%'+hex;
        }
    }
}else{
    window.URLDecoder = function(str){
        var outSt = '';
        for(var c = 0;c < str.length;c++){
            var cTr = str.charAt(c);
            if((cTr == '%')&&((c + 2) <= str.length)){
                outSt += String.fromCharCode(
                         parseInt(str.substring((c+1),
                                    ((c+=2)+1)), 16));
            }else if(cTr == '+'){
                outSt += ' ';
            }else{
                outSt += cTr;
            }
        }
        return outSt;
    }
    window.URLEncoder = function(str){
        var outSt = '';
        for(var c = 0;c < str.length;c++){
            var cCode = str.charCodeAt(c);
            if(((cCode > 47)&&(cCode < 58))||
               ((cCode > 64)&&(cCode < 91))||
               ((cCode > 96)&&(cCode < 123))){
                outSt += str.charAt(c);
            }else if(cCode == 32){
                outSt += '+';
            }else{
                var hex = cCode.toString(16);
                var len = hex.length;
                switch(len){
                    case 0:
                        hex = '00';
                        break;
                    case 1:
                        hex = '0'+hex;
                    case 2:
                        break;
                    defalt:
                        hex = hex.substring((len-2), len);
                        break;
                }
                outSt += '%'+hex;
            }
        }
        return outSt;
    }
}

function EnviarComparar(strParametresAddicionals) {
	var strNouHREF;
	strNouHREF = '?l_comparar=' + URLEncoder(document.getElementById('l_comparar').value) + strParametresAddicionals;
	document.location = strNouHREF;
}

function ComprovarReturn(strParametresAddicionals) {
	if(event.keyCode==13) {
	    EnviarComparar(strParametresAddicionals);
	}
}

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]+"'");
}
//-->