if (location.href.indexOf("44.134") == -1 && location.href.indexOf("localhost") == -1 && location.href.indexOf("ampr.org") == -1) {internet="si" }else{ internet="no"}
if (internet == "si") {
	contatore="http://counter.volftp.mondadori.com/cgi-bin/nph-count?width=4&link=cqww2002"
}else{
	contatore="http://44.134.16.4/scripts/counter.exe?link=cqww2002&style=neat"
}
if (document.referrer.indexOf("/is0myn/") == -1) {root="/is0a/cqww2002/"}else{root="/is0myn/is0a/cqww2002/"}
var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;
var v4  = (ns4 || ie4)? true:false;

function w(cosa) {
	document.write(cosa)
}

function ApriFinestra(Url,Larghezza,Altezza,nomeFinestra,opzioni) {
	if (Larghezza == "") {
		Larghezza=screen.width
		Altezza=screen.height - 60
	}
	nomeFinestra=nomeFinestra||"Finestra"
	if (top.hWnd&&document.all){
		top.hWnd.close()	
	}
	top.hWnd= window.open(Url,nomeFinestra,"width="+Larghezza+",height="+Altezza+",left=0,top=0,screenX=0,screenY=0,"+opzioni);
}


// funzione generazione BOX per la HomePage

function boxOPEN(GifTitolo,Url_Target) {
	w("<table width=95% border=0 cellspacing=0 cellpadding=0 align=center class=boxCORNICE>")
	w(" <tr>")
	w("  <td>")
	w("   <table width=100% border=0 cellspacing=1 cellpadding=4>")
	w("    <tr>")
	if (Url_Target) {
		w("      <td width=2888 class=boxCORNICE><a href="+Url_Target+"><img src="+GifTitolo+" border=0></a></td>")
	}else{
		w("      <td width=2888 class=boxCORNICE><img src="+GifTitolo+"></td>")
	}	 
	w("    </tr>")
	w("    <tr>")
	w("     <td width=2888 bgcolor=FFFFFF>")
}

function boxCLOSE() {
	w("     </td>")
	w("    </tr>")
	w("   </table>")
	w("  </td>")
	w(" </tr>")
	w("</table>")
}



// funzione generazione BOX per la HomePage - con ombra

function boxombraOPEN(GifTitolo,Url_Target) {
	w("<table border=0 cellspacing=0 cellpadding=0 width=100%>")
	w(" <tr>")
	w("  <td width=8><img src="+root+"portale/img/box/corner_up_sn.gif width=8 height=29></td>")
	w("	<td background="+root+"portale/img/box/bkg_up.gif><img src="+GifTitolo+"></td>")
	if (Url_Target) {
		w("	<td align=right background="+root+"portale/img/box/bkg_up.gif><a href="+Url_Target+"><img src="+root+"portale/img/box/arrow_orange.gif width=24 height=29 border=0></a></td>")
	}else{
		w("	<td align=right background="+root+"portale/img/box/bkg_up.gif><img src="+root+"portale/img/box/arrow_orange.gif width=24 height=29></td>")
	}
	w("	<td width=12><img src="+root+"portale/img/box/corner_up_ds.gif width=12 height=29></td>")
	w(" </tr>")
	w(" <tr>")
	w("	<td background="+root+"portale/img/box/bkg_sn.gif width=8>&nbsp;</td>")
	w("	<td width=100% COLSPAN=2>")
}

function boxombraCLOSE() {
	w("	</td>")
	w("	<td background="+root+"portale/img/box/bkg_ds.gif width=12>&nbsp;</td>")
	w(" </tr>")
	w(" <tr>")
	w("	<td width=8><img src="+root+"portale/img/box/corner_down_sn.gif width=8 height=12></td>")
	w("	<td background="+root+"portale/img/box/bkg_down.gif COLSPAN=2><img src="+root+"common/img/vuoto.gif width=8 height=12></td>")
	w("	<td width=12><img src="+root+"portale/img/box/corner_down_ds.gif width=12 height=12></td>")
	w(" </tr>")
	w("</table>")
}	

function notizia(Img, Url,Data,Fonte, Testo) {
	w("<tr>")
	w("	<th><a href="+Url+"><img src="+Img+" border=0></a></th>")
	w("	<td class=intranewsORA>"+Data+"</td>")
	w("	<td class=intranewsFONTE>"+Fonte+"</td>")
	w("	<td class=intranewsTESTO>"+Testo+"</td>")
	w("</tr>")
}

function coda() {
	w("<table border=0 cellspacing=0 cellpadding=0 width=763>")
	if (internet == "si") {
		w("	<tr><td align=center><span class=codamenu>&#149;&nbsp;&nbsp;&nbsp;<a href='mailto:is0a@is0grb.ods.org' class=codamenu>WRITE US&nbsp;&nbsp;&nbsp;</a>&#149;</span></td></tr>")
	}else{
		w("	<tr><td align=center><span class=codamenu>&#149;&nbsp;&nbsp;&nbsp;<a href='mailto:is0a@is0grb.0s.it.ampr.org' class=codamenu>WRITE US&nbsp;&nbsp;&nbsp;</a>&#149;</span></td></tr>")
	}
	w("	<tr><td><img src='portale/img/bottom_bg_table.gif' width=764></td></tr>")
	w("</table>")
}

function testata(banner) {
	w("<table border=0 cellspacing=0 cellpadding=0 width=763>")
	w("	<tr>")
	if (banner) {
		w("		<td background="+root+"common/img/logo.gif height=57 valign=top>")
	}else{
		w("		<td background="+root+"common/img/logo2.gif height=57 valign=top>")
	}
	w("			<table border=0 cellspacing=0 cellpadding=0>")
	w("				<tr>")
	if (banner) {
		w("					<td width=421 height=90 valign=bottom><span class=testataETICHETTA>&nbsp;&nbsp;&nbsp;&nbsp;CQWW-SSB 2002</span></td>")
	}else{
		w("					<td width=421 height=57 valign=bottom><span class=testataETICHETTA>&nbsp;</span></td>")
	}
	w("					<th background="+root+"common/img/vuoto.gif valign=top>")
	if (banner) {
		w("						<span class=testataETICHETTA> <A HREF='http://www.cqis0.it' onClick='doIt();return false' onMouseover='dispIt();return true;'><IMG SRC='../..//img/banner/01.gif' HEIGHT=60 WIDTH=468 NAME='sponsor' BORDER=0></span>")
	}else{
		w("						<span class=testataETICHETTA> &nbsp;<br><br>CQWW-SSB 2002</span>")
	}		
	w("					</th>")
	w("				</tr>")
	w("			</table>")
	w("		</td>")
	w("	</tr>")
	w("</table>")

}

function testata2(conta) {
	w("<table width=100% border=0 cellspacing=0 cellpadding=0>")
	w(" <tr>")
	w("  <td>")
	w("	<table border=0 width=100% cellspacing=0 cellpadding=3 class=testata2SFONDOSX>")
	w("		<tr>")
	if (conta) {
		w("			<td class=testata2TESTOSX><a href=index.htm><img src="+root+"portale/img/i.gif border=0 align=absmiddle hspace=5>In&nbsp;Italiano</a><img src="+root+"common/img/vuoto.gif width=190 height=1>October 26/27 2002<br><img src="+root+"common/img/vuoto.gif width=606 height=1></td>")	
		w("			<th class=testata2SFONDODX width=140 valign=middle><span class=testata2TESTODX><img src="+contatore+" align=absmiddle>&nbsp;&nbsp;Visitors</span></th>")
	}else{
		w("			<th class=testata2TESTOSX>October 26/27 2002<br><img src="+root+"common/img/vuoto.gif width=606 height=1></th>")	
		w("			<th class=testata2SFONDODX width=140 valign=middle><span class=testata2TESTODX>&nbsp;&nbsp;</span></th>")
	}
	w("		</tr>")
	w("	</table>")
	w("  </td>")
	w("  <td><img src="+root+"common/img/vuoto.gif width=5 height=1></td>")
	w(" </tr>")
	w("</table>")
}


function webtv() {
	boxOPEN("portale/img/titolibox/webcam.gif","")
	w("<table border=0 cellspacing=0 cellpadding=0 align=center width=100%>")
	w("	<tr align=center><td class=webtvSFONDO colspan=3><img src=portale/img/icon/ico_tv.gif border=0 vspace=5></td></tr>")
	w("	<tr align=center><td class=webtvSFONDO colspan=3><div align=center class=webtvTESTO><b><span class=webtvTESTO>Direct image</span></b><br>from ISØA Team station during operation<br><br></div></td></tr>")
	w("	<tr align=center><td class=webtvSFONDO valign=top><div align=center class=webtvTESTO><a href=javascript:ApriFinestra('webcam/index.htm',600,360,'webcam','scrollbars=no,buttons=no')><b><span class=webtvTESTOlink>Image</span></b><br><span class=webtvTESTOsmall>update every 15&nbsp;seconds</span></a></div></td><td class=webtvSFONDO>&nbsp;</td><td class=webtvSFONDO valign=top><div align=center class=webtvTESTO><a href=javascript:ApriFinestra('webcam/index_stream.htm',600,360,'webcam','scrollbars=no,buttons=no')><b><span class=webtvTESTOlink>Video</span></b><br><span class=webtvTESTOsmall>real time</span></a></div></td></tr>")
	w("</table>")
	boxCLOSE()
	w("<hr noshade size=1>")	
}


function guestbook() {
	boxOPEN("portale/img/titolibox/guestbooke.gif","")
	w("<table border=0 cellspacing=0 cellpadding=0 align=center width=100%>")
	
	if (internet == "si") {
	  w("	<tr align=center><td class=webtvSFONDO><a href=javascript:ApriFinestra('http://pub27.bravenet.com/guestbook/show.php?usernum=2313239128&cpv=1',780,500,'guestbook','scrollbars=yes,buttons=no')><img src=portale/img/icon/guestbook.gif border=0 vspace=5 Alt='Sign our guestbook'></a></td></tr>")
	  w("	<tr align=center><td class=webtvSFONDO><div align=center class=webtvTESTO><a href=javascript:ApriFinestra('http://pub27.bravenet.com/guestbook/show.php?usernum=2313239128&cpv=1',780,500,'guestbook','scrollbars=yes,buttons=no')><b><span class=webtvTESTOlink>Sign</span></b></a><br>our guestbook<br><br></div></td></tr>")	  
	}else{
	  w("	<tr align=center><td class=webtvSFONDO><a href=javascript:ApriFinestra('http://44.134.16.4/is0a/cqww2002/guestbook/index.asp',780,500,'guestbook','scrollbars=yes,buttons=no')><img src=portale/img/icon/guestbook.gif border=0 vspace=5 Alt='Sign our guestbook'></a></td></tr>")
	  w("	<tr align=center><td class=webtvSFONDO><div align=center class=webtvTESTO><a href=javascript:ApriFinestra('http://44.134.16.4/is0a/cqww2002/guestbook/index.asp',780,500,'guestbook','scrollbars=yes,buttons=no')><b><span class=webtvTESTOlink>Sign</span></b></a><br>our guestbook<br><br></div></td></tr>")
	}
	w("</table>")
	boxCLOSE()
	w("<hr noshade size=1>")	
}

function menu(ImgTitolo,Class,UrlTitolo,Url1,Txt1,Url2,Txt2,Url3,Txt3,Url4,Txt4,Url5,Txt5,Url6,Txt6,Url7,Txt7,Url8,Txt8,Url9,Txt9,Url10,Txt10,Url11,Txt11,Url12,Txt12) {
	boxOPEN(ImgTitolo,UrlTitolo)
	w("<table width=100% border=0 cellspacing=1 cellpadding=0 align=center height=100%>")
	if (Url1) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url1+" class=menuTESTO>"+Txt1+"</a></td></tr>")}
	if (Url2) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url2+" class=menuTESTO>"+Txt2+"</a></td></tr>")}
	if (Url3) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url3+" class=menuTESTO>"+Txt3+"</a></td></tr>")}
	if (Url4) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url4+" class=menuTESTO>"+Txt4+"</a></td></tr>")}
	if (Url5) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url5+" class=menuTESTO>"+Txt5+"</a></td></tr>")}
	if (Url6) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url6+" class=menuTESTO>"+Txt6+"</a></td></tr>")}
	if (Url7) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url7+" class=menuTESTO>"+Txt7+"</a></td></tr>")}
	if (Url8) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url8+" class=menuTESTO>"+Txt8+"</a></td></tr>")}
	if (Url9) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url9+" class=menuTESTO>"+Txt9+"</a></td></tr>")}
	if (Url10) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url10+" class=menuTESTO>"+Txt10+"</a></td></tr>")}
	if (Url11) {w("<tr class="+Class+"SFONDOscuro><td><a href="+Url11+" class=menuTESTO>"+Txt11+"</a></td></tr>")}
	if (Url12) {w("<tr class="+Class+"SFONDOchiaro><td><a href="+Url12+" class=menuTESTO>"+Txt12+"</a></td></tr>")}
	w("</table>")
	boxCLOSE()
	w("<hr noshade size=1>")	
}

function software(Txt,Url) {
	w("<tr><td><hr size=1 align=center width=175 noshade></td><td bgcolor=000064> </td></tr>")
	w("<tr><td><span class=boxombraTESTO>"+Txt+"</td><td bgcolor=000064><a href="+Url+"><img src=portale/img/box/arrow_blu.gif border=0 hspace=2></a></td></tr>")
}

function pagine(numpagine, attuale) {
	w("<br><p align=center><font size=2><font face='Verdana, Arial, Helvetica, Sans-Serif'><b>Page:</b>&nbsp;&nbsp;")
	for (i=1;i<numpagine+1;i++) {
		if (i==attuale) {
			w("<b>"+i+"</b>&nbsp;")
		}else{
			if (i==1) {
				w("<a href=indexe.htm>"+i+"</a>&nbsp;")	
			}else{
				w("<a href=pag"+(i-1)+"e.htm>"+i+"</a>&nbsp;")
			}
		}
	}
	w("<br></font></p>")
}