// BMJSC.JS    by Salvatore ROSTA,  www.byteman.it  byteman@quipo.it       
// rev. 08-04-2006        Tutti i diritti riservati (c)1993..2006     

var xMenu = 140;
var xMax = screen.width;
var xMain = xMax-xMenu; 
var xBk = '#000058'; 
var xBk2 = '#FFFFE8'; 
//var xPhp = '/bytemaNew/sezphp/';
//var xHtm = '/bytemaNew/';
var xPhp = 'http://www.byteman.altervista.org/';
var xHtm = 'http://www.byteman.it/';
//Questo file modificato deve essere salvato sia nella sezione HTM sia in quella PHP
// !!! Occorre inoltre modificare il file index.htm della sezione HTM !!!

mnui = new Array(23);	  		mnuu = new Array(23);			
mnui[0] = 'Glossario'; 			mnuu[0] = xHtm + 'glossindex.htm';   	
mnui[1] = 'Portale del Corso';		mnuu[1] = xHtm + 'portale.htm'; 		
mnui[2] = 'srosta.Files'; 		mnuu[2] ='http://www.webalice.it/srosta'; 		
mnui[3] = 'Mondo Linux'; 		mnuu[3] = 'http://linux.byteman.it/';		
mnui[4] = 'Asm Linux'; 			mnuu[4] = 'http://www.byteman.it/asmx2';		
mnui[5] = 'Particelle'; 		mnuu[5] = xHtm + 'parindex.htm'; 		
mnui[6] = 'Laboratorio'; 		mnuu[6] = xHtm + 'labor.htm'; 			
mnui[7] = 'La Chiave'; 			mnuu[7] = xHtm + 'grimald.htm'; 		
mnui[8] = 'Hardware'; 			mnuu[8] = xHtm + 'hard.htm'; 			
mnui[9] = 'Senza S.O.'; 		mnuu[9] = xHtm + 'solobios.htm'; 		
mnui[10]= 'Didattica';  		mnuu[10]= xHtm + 'dida.htm'; 			
mnui[11]= 'Internet';  			mnuu[11]= xHtm + 'web.htm'; 			
mnui[12]= 'Linguaggi'; 			mnuu[12]= xHtm + 'linguag.htm'; 		
mnui[13]= 'Ricreazione'; 		mnuu[13]= xHtm + 'ricreaz.htm'; 		
mnui[14]= 'Spazio Ospiti';      	mnuu[14]= xHtm + 'ospiti.htm'; 		
mnui[15]= 'Recensioni'; 		mnuu[15]= xHtm + 'recensmenu.htm'; 	
mnui[16]= 'Link Utili'; 		mnuu[16]= xHtm + 'weblinks.htm'; 		
mnui[17]= 'Cronologia'; 		mnuu[17]= xHtm + 'cronologia.htm'; 	
mnui[18]= 'Gadgets'; 			mnuu[18]= xHtm + 'gadgets.htm';		
mnui[19]= 'Segnalazioni'; 		mnuu[19]= xHtm + 'segnalaz.htm';		
mnui[20]= 'InfoNews'; 			mnuu[20]= xPhp + 'infonews.php3';		
mnui[21]= 'E-Mail'; 			mnuu[21]= 'MAILTO:byteman@quipo.it';	
mnui[22]= 'Home'; 			mnuu[22]= xHtm + 'index.php'; 		
mnui[23]= 'NewHome'; 			mnuu[23]='http://www.byteman.it/bm2'; 		


function menuy () {
    document.write("<table width=\"", xMenu, "\" border=0 cellpadding=0 cellspacing=0>");
  	for (i=0; i<24; i++) {document.write("<tr><td align=\"right\"><a href=\"", mnuu[i], "\" class=\"foot\">", mnui[i], "&nbsp;&nbsp;&nbsp;&nbsp;</a></td></tr>");}
	document.write("</table>");
	}


function T1 () {
	document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"7\" width=\"130\" align=\"right\"></td><td bgcolor=\"" + xBk + "\"></td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"8\" width=\"130\"></td><td bgcolor=\"" + xBk2 + "\"><img src=\"pics/arc11.gif\"</td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" width=\"130\" align=\"right\"><A HREF=" + xPhp + "\index.php><img src=\"pics/ebmbutton.gif\" WIDTH=88 HEIGHT=31 BORDER=0></A>&nbsp;&nbsp;</td><td bgcolor=\"" + xBk2 + "\" background=\"pics/fillx.gif\" align=\"center\">");
	}
	
	
function T2 () {
	document.write("</td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"8\" width=\"130\"></td><td bgcolor=\"" + xBk2 + "\"><img src=\"pics/arc12.gif\" </td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"8\" width=\"130\" align=\"right\"></td><td bgcolor=\"" + xBk + "\"></td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"8\" width=\"130\"></td><td bgcolor=\"" + xBk2 + "\"><img src=\"pics/arc11.gif\"</td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"300\" width=\"130\" valign=\"top\">");
	menuy();
	document.write("</td><td bgcolor=\"" + xBk2 + "\" background=\"pics/fillx.gif\">");
	document.write("<table border=\"0\" cellpadding=\"10\"><tr><td>");
	}	
	
function T3 () {
	document.write("</td></tr></table></td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"8\" width=\"130\"></td><td bgcolor=\"" + xBk2 + "\"><img src=\"pics/arc12.gif\" </td></tr>");
	document.write("<tr><td bgcolor=\"" + xBk + "\" height=\"40\" width=\"130\"></td><td bgcolor=\"" + xBk + "\" class=\"xc\" align=\"center\"><img src=\"pics/eyes-only.gif\"> Copyright © 1993-2006 - Edizioni ByteMan - All Rights Reserved</td></tr></table>");
	}
	
	
function tdMax () {   
  var xMax = screen.width-140;  
  document.write("<td width=", xMax, " valign=\"top\" align=\"left\">"); }
	
function winMeteoPrev () {     
	var newWindow = window.open("http://www.meteo.fr/temps/europe/modele/carteeumod.jpg",'met1popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,HEIGHT=360,WIDTH=460')}

function winMeteoSat () {     
	var newWindow = window.open("http://www.meteo.fr/temps/europe/satellite/sateuj_00.jpg",'met2popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,HEIGHT=360,WIDTH=460')}

function winEtna () {     
	var newWindow = window.open("http://www.ct.ingv.it/UfMoni/Vulcano.asp?Vulcano=Env&Refresh=10",'etnapopup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,HEIGHT=450,WIDTH=400')}

// ex indirizzo etna: http://195.103.209.221/visiva/etna.jpg
//http://web.poseidon.nti.it/Sorvis/pics/Etna/Etna.jpg
//http://web.poseidon.nti.it/Sorvis/vulcano.asp?Vulcano=Etna&Refresh=30

function WriteSiti() {
	document.write("<div align=\"justify\" class=\"x1\"><B>Edizioni ByteMan non &egrave; collegata ai siti recensiti e non &egrave; responsabile del loro contenuto</B>. Facciamo tutto il possibile per mantenere i collegamenti aggiornati, ma gradiremmo molto essere informati di eventuali link interrotti in modo da potervi offrire un servizio migliore. <A href=\"mailto:byteman@quipo.it\"><IMG src=\"pics/mailto.gif\" alt=\"mailto\" width=\"14\" height=\"10\" border=\"0\" align=\"bottom\"></A> <B>Grazie!</B><BR></div>");
}


function WriteTitle(image,title) {
  if (title.length==0) {
	document.write("<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=\"CENTER\">", "<TR><TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=100%>", "<IMG SRC=\"", image, "\"  ALIGN=\"MIDDLE\"></TD></TR></TABLE><BR>");
  }
  else { 
  		if (image.length==0) {
	document.write("<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=\"CENTER\">", "<TR><TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=100%>", "<SPAN class=\"x3\">", title, "</SPAN></TD></TR></TABLE><BR>");
  				}
  		else {  
	document.write("<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 ALIGN=\"CENTER\">", "<TR><TD ALIGN=\"CENTER\" VALIGN=\"MIDDLE\" WIDTH=30%>", "<IMG SRC=\"", image, "\"  ALIGN=\"MIDDLE\"></TD>", "<TD ALIGN=\"LEFT\" VALIGN=\"MIDDLE\" WIDTH=50%>", "<SPAN class=\"x3\">", title, "</SPAN></TD></TR></TABLE><BR>");
		}
	 }
}


function WriteAnchor(anchor,title) {
	document.write("<HR><A name=", anchor, "></A><BR><SPAN class=\"z2\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ", title, "<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </SPAN>"); 
}

function WriteGoIndex(title) {
	document.write("<BR><BR><A href=", title, "><IMG border=\"0\" src=\"pics/rubin_.gif\"", "height=\"08\" width=\"16\"><SPAN class=\"y1\">Indice</SPAN></A><BR>");
}

function MkIndexElem(anchor,title) {
	var  nn=new Array(2);
	if (anchor == "-") 
		{	document.write("<TD ALIGN=\"LEFT\" WIDTH=\"33%\"> </TD>");
		}
	else
		{	if (title.substring(0,2) == "i-")
				{ 	image="pics/rubin_i.gif"; 
					stp="yi1"; 
					nn = title.split("-");
				}
			else 
				{ 	image="pics/rubin_.gif"
					stp="y1";
					nn[1]=title;
				}
			document.write("<TD ALIGN=\"LEFT\" WIDTH=\"33%\"><A HREF=\"", anchor, "\"><IMG SRC=\"", image, "\" HEIGHT=\"08\" WIDTH=\"16\" BORDER=\"0\"><SPAN class=\"", stp, "\">", nn[1], "</SPAN></A></TD>");


		}
}

function WriteIndexElem(anchor1,title1,anchor2,title2,anchor3,title3) {
	document.write("<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=\"100%\"><TR><TD width=\"15\"> </TD>");
	MkIndexElem(anchor1,title1);  
	MkIndexElem(anchor2,title2);  
	MkIndexElem(anchor3,title3);  
	document.write("</TR></TABLE>");
}

function WriteSiti2(prepath) {
	image="pics/mailto.gif";
	document.write("<SPAN class=\"x1\"><B>Edizioni ByteMan non &egrave; collegata ai siti recensiti e non &egrave; responsabile del loro contenuto</B>. Facciamo tutto il possibile per mantenere i collegamenti aggiornati, ma gradiremmo molto essere informati di eventuali link interrotti in modo da potervi offrire un servizio migliore. <A href=\"mailto:byteman@quipo.it\"><IMG src=\"", prepath+image, "\" alt=\"mailto\" width=\"14\" height=\"10\" border=\"0\" align=\"bottom\"></A> <B>Grazie!</B><BR>");
}

function WriteGoIndex2(prepath,title) {
	image="pics/rubin_.gif";
	document.write("<BR><BR><A href=", title, " target=\"due\"><IMG border=\"0\" src=\"", prepath+image, "\" height=\"08\" width=\"16\"><SPAN class=\"y1\">Indice</SPAN></A><BR>");
}

function MkIndexElem2(prepath,anchor,title) {
	var  nn=new Array(2);
	if (anchor == "-") 
		{	document.write("<TD ALIGN=\"LEFT\" WIDTH=\"25%\"> </TD>");
		}
	else
		{	if (title.substring(0,2) == "i-")
				{ 	image="pics/rubin_i.gif"; 
					stp="yi1"; 
					nn = title.split("-");
				}
			else 
				{ 	image="pics/rubin_.gif"
					stp="y1";
					nn[1]=title;
				}
			document.write("<TD ALIGN=\"LEFT\" WIDTH=\"25%\"><A HREF=\"", anchor, "\"><IMG SRC=\"", prepath+image, "\" HEIGHT=\"08\" WIDTH=\"16\" BORDER=\"0\"><SPAN class=\"", stp, "\">", nn[1], "</SPAN></A></TD>");


		}
}


function WriteIndexElem2(prepath,anchor1,title1,anchor2,title2,anchor3,title3) {
	document.write("<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=\"100%\"><TR>");
	MkIndexElem2(prepath,anchor1,title1);  
	MkIndexElem2(prepath,anchor2,title2);  
	MkIndexElem2(prepath,anchor3,title3);  
	document.write("</TR></TABLE>");
}

function GetDay(intDay) {
	var DayArray = new Array("Domenica", "Lunedi'", "Martedi'", "Mercoledi'", "Giovedi'", "Venerdi'", "Sabato")
	return DayArray[intDay]
}

function GetMonth(intMonth) {
	var MonthArray = new Array("gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic") 
	return MonthArray[intMonth]                  
}

function getDateStrWithDOW() {
	var today = new Date()
	todayStr = today.getDate() + "-" + GetMonth(today.getMonth()) + "-"
	NS4=(document.layers) ? true:false;
	IE4=(document.all) ? true:false;
	ver4 = (NS4 || IE4) ? true : false;
	if (ver4) {
		todayStr += today.getFullYear();
		}
	else
		todayStr += today.getYear();
	return todayStr
}


