function MM_findObj(n, d) {
  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); return x;
}

function MM_swapImage() {
  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];}
}

function MM_swapImgRestore() {
  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 openPicture(path, w, h, title, close, dwnlMap){
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h-20) / 2;
  popWin = window.open("","popWin","top="+wint+",left="+winl+"scrollbars=1,width="+ w + ",height=" + (h+20));
  srcHTML = '<html>\n';
  srcHTML+= ' <head><title>'+title+'</title></head>\n';
  srcHTML+= ' <bod' + 'y bgcolor="#E8E8E8" leftmargin="0" topmargin="0" marginwidth="0" scroll="no">\n';
  srcHTML+= '  <table border=0 cellpadding=0 cellspacing=0 align=center height=100%>\n';
  srcHTML+= '   <tr><td align="center" valign=top colspan=2><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="350" height="250"><param name=movie value="'+ path +'"><param name=quality value=high><embed src="'+ path +'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="350" height="250"></embed></object></td></tr>\n';
  srcHTML+= '   <tr><td align="left" height=1 valign=bottom>&nbsp;<a href="included/pages/dovesiamo.php" style="color: #426B83; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; font-weight: bold; text-decoration: none;"><b>'+dwnlMap+'</b></a>&nbsp;</td><td align="right" height=1 valign=bottom><a href="javascript:window.close(self);" style="color: #426B83; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; font-weight: bold; text-decoration: none;"><b>'+close+'</b></a>&nbsp;</td></tr>\n';
  srcHTML+= '  </table>\n';
  srcHTML+= ' </body>\n';
  srcHTML+= '</html>';
  popWin.document.write(srcHTML);
}

function sign(file_confezione){
  window.open(file_confezione,'sign','scrollbars=no, top=100, left=100, width=450, height=400');
}

function changeBgColor(source){
  culoare_1 = source.style.color_1;
  culoare_2 = source.style.color_2;

  source.style.color_1 = culoare_2;
  source.style.color_2 = culoare_1;
  source.style.color_3 = culoare_1;

  source.style.backgroundColor = culoare_1;
}

function openWindow(){
	var popupwindow = window.open(arguments[0],arguments[1],arguments[2]);
}
