function Es() {
    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      ==    3));
    this.ns3   = (this.ns && (this.major      ==    3));
    this.ns4b  = (this.ns && (this.major      ==    4) &&
                 (this.minor                  <= 4.03));
    this.ns4   = (this.ns && (this.major      >=    4));
    this.ns6    = (this.ns && (this.major     >=    5));
    this.ie    = (agent.indexOf("msie")       !=   -1);
    this.ie3   = (this.ie && (this.major      <     4));
    this.ie4   = (this.ie && (this.major      ==    4) &&
                 (agent.indexOf("msie 4")     ==   -1));
    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));
}

var es = new Es();

function mostrar_imp() {
	if (window.print) {
		document.write('<A HREF="javascript:Imprimir();"><IMG SRC="/avui/diari/docs/img/comu/print.gif" ALT="[Imprimir article]" ALIGN="BOTTOM" WIDTH="75" HEIGHT="20" BORDER="0"></A>');
	}
}

function Imprimir(){  
  	 window.print() ;  
}

function EnviaArticle(ruta) {
	var finestra = "http://db.avui.com/avui/diari/docs/noticiaxmail/mail.php?ruta=" + ruta;
	if (es.ns4 && !es.ns6)
		open(finestra, "_blank", "toolbar=no,menubar=no,statusbar=no,top=1,left=1,height=265,width=390,resizable=no");		
	else
		open(finestra, "_blank", "toolbar=no,menubar=no,statusbar=no,top=1,left=1,height=240,width=390,resizable=no");		
}

function ojd(seccio,descrip) {
	var IVW="http://avui.ojdinteractiva.com/cgi-bin/ivw/CP/"+ seccio +";"+ descrip;	
	document.write("<IMG SRC=\""+ IVW +"?r="+escape(document.referrer)+"\" WIDTH=\"1\" HEIGHT=\"1\">");
}

function article_dalt() {
	dalt();
}

function article_baix() {
	baix();
}
