var flaCheck = 8;

var flashInst = "si";
var flaVer = 0;
var maxCheck = flaCheck+16;
var minCheck = flaCheck-4;
MSDetect = "false";

if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		if (x.description)
		{
			y = x.description;
			flaVer = y.charAt(y.indexOf('.')-2) + y.charAt(y.indexOf('.')-1);

			if (isNaN(flaVer)) 
			{
			flaVer = y.charAt(y.indexOf('.')-1);
			}

			if (isNaN(flaVer)) 
			{
			flaVer = 0;
			}
		}
	}
	else
		flaVer = 0;


}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flaVer = flaCheck;
	else
		flaVer = 0;
}
else
	MSDetect = "true";



if (flaVer != 0 && flaVer < flaCheck)
{
flashInst = "no";
}


if (MSDetect == "true")
{

document.write('<scr' + 'ipt type="text/vbscr' + 'ipt"> \n');
document.write('on error resume next \n');
document.write('For i = minCheck to maxCheck \n');
document.write('If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then \n');
document.write('Else \n');
document.write('flaVer = i \n');
document.write('End If \n');
document.write('Next \n');
document.write('If flaVer < flaCheck Then \n');
document.write('flashInst = "no" \n');
document.write('End If \n');
document.write('</scr' + 'ipt> \n');

}





function cryptEmail() {
   var str1 = "maiAAAlto:";
   var str2 = "perinformazioni";
   var str3 = "vide";
   var str4 = "nn";
   var str5 = "com";
   location.href = str1.substr(0,3) + str1.substr(6,4) + str2.substr(3,4) + "@" + "da" + str3 + str4.substr(0,1) + "a" + str4 + "i." + str5;
}




function PopupPrev() {
var wPrev = 790;
var hPrev = screen.height - 40;
window.open("preventivo.php","","width=" + wPrev + ",height=" + hPrev + ",top=0,left=" + Math.floor((screen.width-wPrev-12)/2) + ",resizable=yes,menubar=no,toolbar=no,scrollbars=yes,locations=no,status=no");
}




function linkurl(url,ext) {
  window.open("http://www." + url + "." + ext,"");
}
