// TAMANYS DE TEXT

 function textam(accio,element){		 	
		//inicializaciones
			obj=document.getElementById(element);
		if (obj.style.fontSize==""){			
			obj.style.fontSize="100%";
		}
		actual=parseInt(obj.style.fontSize); //valor actual del tamaño del texto
		increment=10;// el valor del incremento o decremento en el tamaño
		
		//accion sobre el texto
		if(accio=="reestablir"){
		obj.style.fontSize="100%"
		}
		if(accio=="augmentar"){			
		valor=actual+increment;		
		obj.style.fontSize=valor+"%"
		}
		if(accio=="disminuir"){
		valor=actual-increment;
		obj.style.fontSize=valor+"%"
		}
		
}


<!-- ANULACIÓ BOTÓ DRET DEL RATOLÍ -->

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;}

document.oncontextmenu=new Function("return false")
// --> 


<!-- OBRIR FINESTRES-->

function obreinfo(url){ 
	//var esquerra = (screen.width - 700) / 2;
  	//var dalt = (screen.height - 350) / 2;
    window.open("discos/"+url+".htm", 'mesinfo', 'width=700, height=350, scrollbars=yes, toolbar=no'); 
}
//left=' + esquerra + ',top=' + dalt + ',
<!-- TANCAR FINESTRA -->

function tancar(){
	window.top.close();
}

<!-- MOSTRA LA DATA ACTUAL -->

function data()
{
  		mesos = new Array (" de gener"," de febrer"," de mar&ccedil;","d'abril","de maig","de juny","de juliol","d\'agost","de setembre","d\'octubre","de novembre","de desembre");
	    data = new Date();
	    index = data.getMonth();
	    diasemana=new Array ("dilluns","dimarts","dimecres","dijous","divendres","dissabte","diumenge");
	    day = new Date();
	        indexday =  data.getDay();
	        if (indexday == 0) {
				indexday = 7;
			}
			anno = data.getYear();
			if ( anno < 1900) 
			{
				anno = 1900 + anno;
		    }
		document.write("<span class=\"data\">");	
     	document.write("avui &eacute;s" + ' ' + diasemana[indexday-1]+' ' + data.getDate()+ ' ' + mesos[index] + " del " + anno);
		document.write("</span>");
}

// AMPLIAR FOTOS

function foto(w,h,foto,img)
{
	w = parseInt(w)+20 ;
	var h = parseInt(h) +20;
	
	win = window.open("","ampliacio_foto","width="+w+",height="+h+",scrollbars=no");
	if (win.opener == null) {	
		win.opener = self; 
	}
	w = w - 20;
	h = h - 20;
	win.document.write("<html>");
	win.document.write("<head><title>grallers.cat</title></head>");	
	win.document.write("<body bgcolor=\"#ffffff\" leftmargin=\"10\" rightmargin=\"10\" topmargin=\"10\" bottommargin=\"10\" marginwidth=\"10\" marginheight=\"10\">");
	win.document.write("<table border=\"0\"  width=\""+w+"\""+"vspace=\"0\" hspace=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
	win.document.write("<tr>");
	win.document.write("<td>");
	win.document.write("<img src=\""+ img +"\" width=\""+w+"\" height=\""+h+"\" border=\"1\">");
	win.document.write("</td>");
	win.document.write("</tr>");
	win.document.write("</table>");
	win.document.write("</body>");
	win.document.write("</html>");
}

// Navegador

function Is() {
 var agent = navigator.userAgent.toLowerCase();
 this.major = parseInt(navigator.appVersion);
 this.minor = parseFloat(navigator.appVersion);
 this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
 this.ns2 = (this.ns && (this.major == 2));
 this.ns3 = (this.ns && (this.major == 3));
 this.ns4 = (this.ns && (this.major == 4));
 this.ns5 = (this.ns && (this.major > 4));
 this.ns6 = (this.ns && (agent.indexOf('netscape6')!=-1) );
 this.ns7 = (this.ns && (agent.indexOf('netscape/7')!=-1) );
 this.ns7pr = (this.ns && (agent.indexOf('netscape/7.0b1')!=-1) );
 this.ns71 = (this.ns && (agent.indexOf('netscape/7.1')!=-1) );
 this.ie = (agent.indexOf("msie") != -1);
 this.ie3 = (this.ie && (this.major == 2));
 this.ie4 = (this.ie && (this.major >= 4));
 this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") != -1));
 this.ie55 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5") != -1));
 this.ie6 = (this.ie && (agent.indexOf("msie 6.0")!=-1));
 this.op3 = (agent.indexOf("opera") != -1);
 this.pc  = (agent.indexOf("win") != -1);
 this.mac = (agent.indexOf("mac")!=-1); // Mac detect
 this.moz = ( this.ns && (agent.indexOf("netscape/") == -1) );
 if (this.moz) this.ns = 0;

}

var is = new Is();

	
if (is.ns4) 
	{
	document.write("<br>Pàgina optimitzada per navegadors superiors al Netscape 4.x<br>");
	}
	


