var ns6=document.getElementById&&!document.all
var ie=document.all

var dayarray=new Array("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato")
var montharray=new Array("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre")








var openInNewWin = true;
var banners = new Array();
banners[0] = new Banner("#", "EuroSmaltimenti", "images/01tops.jpg");
banners[1] = new Banner("#", "EuroSmaltimenti", "images/02tops.jpg");
banners[2] = new Banner("#", "EuroSmaltimenti", "images/03tops.jpg");
banners[3] = new Banner("#", "EuroSmaltimenti", "images/04tops.jpg");
banners[4] = new Banner("#", "EuroSmaltimenti", "images/05tops.jpg");
banners[5] = new Banner("#", "EuroSmaltimenti", "images/06tops.jpg");
banners[6] = new Banner("#", "EuroSmaltimenti", "images/07tops.jpg");
banners[7] = new Banner("#", "EuroSmaltimenti", "images/08tops.jpg");
banners[8] = new Banner("#", "EuroSmaltimenti", "images/09tops.jpg");
banners[9] = new Banner("#", "EuroSmaltimenti", "images/10tops.jpg");
banners[10] = new Banner("#", "EuroSmaltimenti", "images/11tops.jpg");




function Banner(url, description, image) {
	this.url = url;
	this.description = description;
	this.image = image;
	return this;
}


function DisplayTop() {
var bNum = Math.round(Math.random() * (banners.length -1));


if (banners[bNum].image != "") {

	document.write("<a href=\"" + banners[bNum].url + "\"");
	
	if (openInNewWin) {
		document.write(" target=\"_blank\"");
	}
	document.write(">");
	document.write("<img src=\"" + banners[bNum].image + "\" border=\"0\" alt=\"" + banners[bNum].description + "\">");
	document.write("</a>"); 
	
}

}





















function zoomimg(picture, title, description)
{
	immagine = new Image;
	immagine.src = picture;
	Altezza=65;
	
	if (description!='') Altezza=120;
	
	
	html = '<HTML>\n<HEAD>\n<TITLE>'+title+'</TITLE>\n</HEAD>\n<BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0>\n<CENTER><IMG SRC="'+picture+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+'+ Altezza +')"><br><br><FONT face="Tahoma" size="1"><B>'+description+'</B></FONT><br></CENTER>\n</BODY>\n</HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menubar=0,scrollbars=0,resizable=0,status=0,copyhistory= 0');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
};

function changeto(e,highlightcolor){
source=ie? event.srcElement : e.target
if (source.tagName=="TR"||source.tagName=="TABLE")
return
while(source.tagName!="TD"&&source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
source.style.backgroundColor=highlightcolor
}

function contains_ns6(master, slave) {
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore"))
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}





function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+","+daym+" "+montharray[month]+" "+year+", ore "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
//else
//document.write(cdate)
}
if (!document.all)
getthedate()
function goforit(){
if (document.all)
setInterval("getthedate()",1000)
}


function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

function Titolo(Stringa){
	parent.titolo.document.close;
	parent.titolo.document.open();
	parent.titolo.document.write ('<table border=0 cellpadding=0 style="border-collapse: collapse" width=100% height=44 background="images/sfondotitolo.gif">');
	parent.titolo.document.write ('<tr>');
	parent.titolo.document.write ('<td height=44 valign=bottom>');
	parent.titolo.document.write ('<p align=right><font face=Tahoma color="#FFFFFF" size=5>'+Stringa+'&nbsp;&nbsp;&nbsp; </font></td>');
	parent.titolo.document.write ('</tr>');
	parent.titolo.document.write ('</table>');
	}


function FrameToIndex(PaginaIniziale){

if (PaginaIniziale.lenght==0) {
	PaginaIniziale='index.htm'}
	
if(self.name==top.name){
		location.href=PaginaIniziale
	}
}




function Downloadabile(Parametro)
{
var dwl=Parametro.indexOf('download/');

	if (dwl > 0)
	
	   document.write("<a "+Parametro+"><img src='images/download.gif' border=0 align=middle></a>")
		}









function RicostruisciFrameSet(){


// Javascript creato da Francesco Rombecchi @ 2005
// ===============================================
// Serve per creare il frameset nelle pagine HTML con link diretto
// Per far funzionare questo script nelle linee utilizzare il valore #LOCAZIONE# per indicare il posto dove sostituire l'URL


var Linee = new Array ()


Linee[0] = '<frameset framespacing="0" border="0" frameborder="0" rows="125,*,37">'
Linee[1] = '<frame name="superiore" scrolling="no" noresize target="sommario" src="top.htm" marginwidth="0" marginheight="0">'
Linee[2] = '<frameset cols="203,*,12">'
Linee[3] = '<frame name="sommario" target="principale" src="menucategorie.htm" scrolling="no" marginwidth="0" marginheight="0">'
Linee[4] = '<frame name="principale" scrolling="auto" marginwidth="0" marginheight="0" noresize target="_self" src="#LOCAZIONE#">'
Linee[5] = '<frame name="principale1" src="dx.htm" scrolling="no" target="_self">'
Linee[6] = '</frameset>'
Linee[7] = '<frame name="inferiore" scrolling="no" noresize target="sommario" src="lingue.htm" marginwidth="0" marginheight="0">'
Linee[8] = '<noframes><body></body></noframes></frameset>'

// aggiungere qui le linee che servono aumentando progressivamente il numero


var LunghezzaVettore = Linee.length;
var Locazione = document.location.href
 
// controllo che nella query string della location esista già il punto interrogativo
if (Locazione.indexOf('?') > -1) {
  Locazione = Locazione + '&framed=yes'
  }
else
  {
  Locazione = Locazione + '?framed=yes'
  }


if (self.name==top.name)
{
 for (var i=0; i<LunghezzaVettore; i++)
   {
     var Convertita = Linee[i];
     
     // Viene sostituito il valore di #LOCAZIONE# con quello di destinazione     
     if (Convertita.indexOf('#') > -1) {
       Convertita = Convertita.replace("#LOCAZIONE#", Locazione);
     }         

     document.write(Convertita);
   }
}
}























<!--
// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use

var popbackground="#FFFFFF" //specify backcolor or background image for pop window
var windowtitle="Zoom"  //pop window title

function detectexist(obj){
return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}

getpos()
var winattributes='width='+popwidth+',height='+popheight+',resizable=no,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
//getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
//jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitle+'</title><body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" '+bodyattribute+'><img src="'+imgpath+'" style="margin-bottom: 0.5em"><br>'+textdescription+'</body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

