var days=new Array('Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Disabte')
var months=new Array('Gener','Febrer','Març','Abril','Maig','Juny','Juliol','Agost','Setembre','Octubre','Novembre','Desembre')
function cinit(){
if (peXt!=""){
if (peXt!="op")
settimes();
if (peXt=="nn")
popmcreate();
}
}

function settimes(){
if (navigator.userAgent.indexOf('IRIX') != -1)
  var OpSys = "Irix";
else
 if ((navigator.userAgent.indexOf('Win') != -1) &&(navigator.userAgent.indexOf('95') != -1))
 var OpSys = "Windows 95";
 else
if ((navigator.userAgent.indexOf('Win') != -1) &&  (navigator.userAgent.indexOf('98') != -1))
 var OpSys = "Windows 98"; 
 else
if (navigator.userAgent.indexOf('Win') != -1 &&  (navigator.userAgent.indexOf('5.1') != -1))
   var OpSys = "Windows XP";
 else
if (navigator.userAgent.indexOf('Win') != -1 &&  (navigator.userAgent.indexOf('NT') != -1))
   var OpSys = "Windows NT";
 else
if(navigator.userAgent.indexOf('Mac') != -1)
  var OpSys = (navigator.userAgent.indexOf('Mac OS X') == -1) ? "Macintosh" : "Mac OS X";
 else 
   var OpSys = "Other";
bversion=navigator.appVersion.split("[");
if (peXt=="op"){
bversion=navigator.appVersion.split("(");
bversion[1]="Opera "+bversion[0];
}
info=navigator.appVersion.split(";");
if(peXt=="mo"){
if (navigator.userAgent.indexOf('Safari')){
safbrws = navigator.userAgent.split("Safari/");
info[1]= "Safari "+safbrws[1]
}
else{
nnbrws = navigator.userAgent.split(";");
if (nnbrws[4])
if (nnbrws[4].match("Netscape")){
nnbrws = nnbrws[4].split("Netscape");
info[1]= "Netscape"+nnbrws[1];
}
else{
nnbrws = nnbrws[4].split(")");
info[1]= "Mozilla"+nnbrws[0];
}
}
}
if (peXt=="op")
spc='&nbsp;&nbsp;<IMG SRC="imatges/sep.gif" WIDTH="2" HEIGHT="16" BORDER="0" ALIGN="ABSBOTTOM" style="position:relative;top:3px">&nbsp;&nbsp;'
else
spc='&nbsp;&nbsp;<IMG SRC="imatges/sep.gif" WIDTH="2" HEIGHT="16" BORDER="0" ALIGN="ABSBOTTOM">&nbsp;&nbsp;'
var time= new Date();
day=days[time.getDay()];
nday=time.getDate();
month=months[time.getMonth()];
year= eval(time.getYear());
if (year<1900)
year=1900+eval(year);
if (peXt=="mo" || peXt=="op")
tim1 = document.getElementById("tim1");
if (peXt=="nn")
tim1 = document.layers['ntim1'];
if (peXt=="ie" || peXt=="mo")
tim1.innerHTML='<IMG SRC="imatges/blank.gif" WIDTH="1" HEIGHT="1" BORDER="0" ALIGN="ABSBOTTOM" VSPACE="10"><IMG SRC="imatges/sep.gif" WIDTH="2" HEIGHT="16" BORDER="0" ALIGN="ABSBOTTOM">&nbsp;&nbsp;'+day+", "+nday+" "+month+" "+year+spc;
//tim1.innerHTML='<IMG SRC="imatges/blank.gif" WIDTH="1" HEIGHT="1" BORDER="0" ALIGN="ABSBOTTOM" VSPACE="10"><IMG SRC="imatges/sep.gif" WIDTH="2" HEIGHT="16" BORDER="0" ALIGN="ABSBOTTOM">&nbsp;&nbsp;'+day+", "+nday+" "+month+" "+year+spc+'SO : '+OpSys+spc+'Navegador : '+info[1]+spc+'Profunditat Color :  '+screen.colorDepth+' bit'+spc;
else{
if (peXt=="nn")
tim1.document.write(spc+'<Span class="time">'+day+', '+nday+' '+month+' '+year+spc+'</Span>')
//tim1.document.write(spc+'<Span class="time">'+day+', '+nday+' '+month+' '+year+spc+'OS : '+OpSys+spc+'Navegador : '+navigator.appName+' '+bversion[0]+spc+'Color Depth : '+screen.pixelDepth+' bit</Span>'+spc)
else
tim1.document.write('<Span class="time" style="position:relative;top:2px">'+spc+day+', '+nday+' '+month+' '+year+spc+'</Span>')
//tim1.document.write('<Span class="time" style="position:relative;top:2px">'+spc+day+', '+nday+' '+month+' '+year+spc+'OS : '+OpSys+spc+'Browser : '+navigator.appName+' '+bversion[0]+spc+'Color Depth : '+screen.pixelDepth+' bit'+spc+'</Span>')
tim1.document.close();
}
}

function tauler(){
polwin=window.open('tauler.html','polwin','Top=100,Left=150,Status=0,resizable=0,width=220,height=350')
}
function itecnica(){
polwin=window.open('itecnica.html','polwin','Top=100,Left=150,Status=0,resizable=0,width=220,height=350')
}
function i_legal(){
polwin=window.open('i_legal.html','polwin','Top=100,Left=150,Status=0,resizable=0,width=420,height=470')
}
function finestra_s (URL){ 
   window.open(URL,'finestra1','Top=100,Left=150,Status=0,resizable=0,width=300,height=470')
}
function finestra_f (URL){ 
   window.open(URL,'finestra1','Top=100,Left=150,Status=0,resizable=0,width=850,height=770')
}