function view_flash(lo,w,h,t){
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+w+'" height="'+h+'">');
	document.write ('<param name="movie" value="'+lo+'">');
	document.write ('<param name="quality" value="high">');
	if (t == 'true'){
		document.write ('<param name="wmode" value="transparent">');
	}
	document.write ('<embed src="'+lo+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed>');
	document.write ('</object>');
}

function SelectThis(){
        if (document.Global.Site.options[document.Global.Site.selectedIndex].value != "none"){ 
        location = document.Global.Site.options[document.Global.Site.selectedIndex].value}        
}


var usragent=navigator.userAgent.toLowerCase();
var is_mac  = (usragent.indexOf("mac") != -1);
var is_win  = (usragent.indexOf("win") != -1);
var is_ie   = (usragent.indexOf("msie") != -1); 
var is_nav  = ((usragent.indexOf('mozilla')!=-1) && (usragent.indexOf('spoofer')==-1) 
            && (usragent.indexOf('compatible') == -1) && (usragent.indexOf('opera')==-1) 
            && (usragent.indexOf('webtv')==-1));
var PrintWindow;


function Rollover(theImage, theSrc)
{
var objStr,obj;
	if(document.images)
	{
		if (typeof(theImage) == 'string') 
		{
			objStr = 'document.' + theImage;
			obj = eval(objStr);
			obj.src = theSrc;
		} 
		else if ((typeof(theImage) == 'object') && theImage && theImage.src) 
		{
			theImage.src = theSrc;
		}
	}
}


function popUpWin(url, newTool, newLocation, newStatus, newMenubar, newResizable, newScrollbars, newWidth, newHeight, newLeft, newTop) 
	{
		if (is_ie ||  is_nav) 
		{
			if (PrintWindow != null && !PrintWindow.closed) 
			{
                        oldWin = PrintWindow;
                        oldWin.name = "oldWin";
                        oldWin.close();
            }
		}
		PrintWindow=window.open(url,"newWin","toolbar=" + newTool + ",location=" + newLocation + ",status=" + newStatus + ",menubar=" + newMenubar + ",resizable=" + newResizable + ",scrollbars=" + newScrollbars + ",width=" + newWidth + ",height=" + newHeight + ",left=" + newLeft + ",top=" + newTop);
		if (PrintWindow.opener == null)
		{
        	PrintWindow.opener = popupWin;
        }
		PrintWindow.opener.name = "origWin";
        PrintWindow.focus();
	}


function closeWin()
	{
		this.close();
		PrintWindow = null;
	}


function Aggiungi(url) 
	{
		if (is_ie ||  is_nav) 
		{
			if (PrintWindow != null && !PrintWindow.closed) 
			{
                        oldWin = PrintWindow;
                        oldWin.name = "oldWin";
                        oldWin.close();
            }
		}

		PrintWindow=window.open(url,"newWin","toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=300,height=200,left=80,top=20");
		if (PrintWindow.opener == null)
		{
        	PrintWindow.opener = popupWin;
        }
		PrintWindow.opener.name = "origWin";
        PrintWindow.focus();
	}

function BLU_jumpMenu(targ,selObj,restore)
	{ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}

function BLU_jumpMenuRef(targ,mPage,selObj,restore)
	{ //v3.0
		eval(targ+".location='"+mPage+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}

function BLU_jumpMenuId(targ,selObj,restore)
	{ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].id+"'");
		if (restore) selObj.selectedIndex=0;
	}

function BLU_jumpRadio(targ,locazione)
	{ //v3.0
		eval(targ+".location='"+locazione+"'");
	}

function BLU_Language(Id_Language)
	{ 
		this.history.go;
	}

function	DataCorrente()
	{
		var str=Date();
		var tempo= new Array()
		tempo=str.split(" ");
		var data1 = tempo[0];
		switch (tempo[0]){
		
			case "Mon":
				data1="Luned&igrave;"
				break;
			case "Tue":
				data1="Marted&igrave;"
				break;
			case "Wed":
				data1="Mercoled&igrave;"
				break;
			case "Thu":
				data1="Gioved&igrave;"
				break;
			case "Fri":
				data1="Venerd&igrave;"
				break;
			case "Sat":
				data1="Sabato"
				break;
			case "Sun":
				data1="Domenica"
				break;
			}


		if (parseInt(tempo[2])<10)
			data1+="&nbsp;"+tempo[2].charAt(1)+"&nbsp;"
		else
			data1+="&nbsp;"+tempo[2]+"&nbsp;"

			switch (tempo[1])
			 {
			 	case "Jan":
						data1+="Gennaio"
						break;
				case "Feb":
						data1+="Febbraio"
						break;
				case "Mar":
						data1+="Marzo"
						break;
				case "Apr":
						data1+="Aprile"
						break;
				case "May":
						data1+="Maggio"
						break;
				case "Jun":
						data1+="Giugno"
						break;
				case "Jul":
						data1+="Luglio"
						break;
				case "Aug":
						data1+="Agosto"
						break;
				case "Sep":
						data1+="Settembre"
						break;
				case "Oct":
						data1+="Ottobre"
						break;
				case "Nov":
						data1+="Novembre"
						break;
				case "Dec":
						data1+="Dicembre"
						break;
				}

	data1+="&nbsp;"+tempo[4]+"&nbsp;"
	return data1;
	}

function	DataCorrente_En()
	{
		var str=Date();
		var tempo= new Array()
		tempo=str.split(" ");
		var dataoggi = tempo[0];
		var datafinale;
		var giorno;
		var mese;
		var anno = tempo[4];
		
		switch (tempo[0]){
		
			case "Mon":
				giorno="Monday"
				break;
			case "Tue":
				giorno="Tuesday"
				break;
			case "Wed":
				giorno="Wednesday"
				break;
			case "Thu":
				giorno="Thursday"
				break;
			case "Fri":
				giorno="Friday"
				break;
			case "Sat":
				giorno="Saturday"
				giorno;
			case "Sun":
				giorno="Sunday"
				break;
			}


		if (parseInt(tempo[2])<10)
			dataoggi=+tempo[2].charAt(1)
		else
			dataoggi=+tempo[2]
			mese=tempo[1]

	datafinale=giorno+"&nbsp;"+mese+"&nbsp;"+dataoggi+",&nbsp;"+anno+"&nbsp;"
	return datafinale;
	}

function Blu_FindObj(n, d) { //v4.0
  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=Blu_FindObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function Blu_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=Blu_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=Blu_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' inserire un indirizzo email valido.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' inserire valori numerici.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' inserire un numero compreso fra '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' obbligatorio.\n'; }
  } if (errors) alert('Si sono verificati i seguenti errori :\n'+errors);
  document.Blu_returnValue = (errors == '');
}

function Logoff(){
	window.open('logoff.asp',target='_blank');
	window.history.go(0);
}