<!--
var browserName = navigator.appName;

var browserProducerMicrosoft = browserName.indexOf("Microsoft") != -1;
var browserProducerNetscape = browserName.indexOf("Netscape") != -1;

var browserVersion = navigator.appVersion;

var ieVersion = 
	browserProducerMicrosoft ? 
	parseFloat(browserVersion.substring(browserVersion.indexOf("MSIE") + 4)) : 0;

var platform = navigator.platform;

var newWindow = null;

function openNewWindow(URLtoOpen, windowName, windowWidth, windowHeight, windowFeatures) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
	var winAttr = "width=" + aw + ",height=" + ah + ",left=" + 0 + ",top=" + 0 + "," + windowFeatures;
		
	newWindow=window.open(URLtoOpen, windowName, winAttr);
}

function closeNewWindow() {
	if (newWindow && newWindow.open && !newWindow.closed) {
		newWindow.close();
	}
}

// this code check against browser compatibility
	if (
		((platform.indexOf("MacPPC") != -1) && (browserProducerNetscape)) 
		|| 
		(
		(platform.indexOf("Win32") != -1) && 
		((browserProducerMicrosoft) && (ieVersion >= 5))
		)
		||
		(
		(platform.indexOf("Win32") != -1) && 
		((browserProducerNetscape))
		)
	) {
		// here if all ok
		//window.location.href=indexPage;
	}
	//else {
		// here if not ...
		
	// for MAC
		//if (platform.indexOf("MacPPC") != -1) {
			//window.location.href=unsupportedBrowserPage;
		//}
	// for Win 32 (Internet Explorer)
		else if ((platform.indexOf("Win32") != -1) && browserProducerMicrosoft) {
			window.location.href=upgradeBrowserPage;
		}
	// for Win 32 (Netscape Navigator)
		//else if ((platform.indexOf("Win32") != -1) && browserProducerNetscape) {
		//	window.location.href=indexPage;
		//}
	// for something else
		//else {
		//	window.location.href=unsupportedBrowserPage;
		//}
	//}



// this code control the index page function
var marcovecchiWindow = null;
var popupWindow = null;

function openWindow(location) {
	if (screen.availHeight < 500 || screen.availWidth < 750) {
		window.alert("Sorry, you need a minimum of 800x600 resolution to view this site");
	}
	else {
		if (marcovecchiWindow && !marcovecchiWindow.closed) {
			marcovecchiWindow.location.href = location;
		}
		else {
			var width = 450;
			var height = 450;
			var xPos =(screen.availWidth - width)/2;
			var yPos =(screen.availHeight - height)/2;
			var winAttr = 
				"width=" + width + ",height=" + height + 
				",left=" + xPos + ",top="  + yPos + 
				",resizable=false,status=1";
		
			window.moveTo(0, 0);
			window.resizeTo(screen.availWidth, screen.availHeight);
			//window.open("index.html","background","fullscreen,scrollbars=0");
			marcovecchiWindow = window.open(location,"marcovecchiMain",winAttr);
		}

		// close the pop up		
		setTimeout('javascript: closePopupWindow()', 100);
		
		// move focus on the target
		marcovecchiWindow.focus();
	}
}
/*
function openWindow(location) {
	if (screen.availHeight < 500 || screen.availWidth < 750) {
		window.alert("Sorry, you need a minimum of 800x600 resolution to view this site");
	}
	else {
		if (marcovecchiWindow && !marcovecchiWindow.closed) {
			marcovecchiWindow.location.href = docsDirectory + "/" + location;
		}
		else {
			var width = 750;
			var height = 500;
			var xPos = 
				(screen.availWidth - width - ((screen.availWidth > 800) ? 50 : 10));
			var yPos = 4*(screen.availHeight - height)/8;
			var winAttr = 
				"width=" + width + ",height=" + height + 
				",left=" + xPos + ",top="  + yPos + 
				",resizable=false,status=1";
		
			window.moveTo(0, 0);
			window.resizeTo(screen.availWidth, screen.availHeight);
			//window.open("index.html","background","fullscreen,scrollbars=0");
			marcovecchiWindow = window.open(docsDirectory + "/" + location,"marcovecchiMain",winAttr);
		}

		// close the pop up		
		setTimeout('javascript: closePopupWindow()', 100);
		
		// move focus on the target
		marcovecchiWindow.focus();
	}
}
*/

function openWindowAbsolutePath(location) {
	if (screen.availHeight < 500 || screen.availWidth < 750) {
		window.alert("Sorry, you need a minimum of 800x600 resolution to view this site");
	}
	else {
		if (marcovecchiWindow && !marcovecchiWindow.closed) {
			marcovecchiWindow.location.href = location;
		}
		else {
			var width = 750;
			var height = 500;
			var xPos = 
				(screen.availWidth - width - ((screen.availWidth > 800) ? 50 : 10));
			var yPos = 4*(screen.availHeight - height)/8;
			var winAttr = 
				"width=" + width + ",height=" + height + 
				",left=" + xPos + ",top="  + yPos + 
				",resizable=false,status=1";
		
			//window.open("index.html","background","fullscreen,scrollbars=0");
			marcovecchiWindow = window.open(location,"marcovecchiMain",winAttr);
		}

		// close the pop up		
		setTimeout('javascript: closePopupWindow()', 100);
		
		// move focus on the target
		marcovecchiWindow.focus();
	}
}

function openPopupWindow(location) {
	if (popupWindow && !popupWindow.closed) {
		popupWindow.location.href = location;
	}
	else {
		var width = 380;
		var height = 350;
		var xPos = (screen.availWidth - width -40);
		var yPos = (screen.availHeight - height -40);
		var winAttr = "width=" + width + ",height=" + height + ",left=" + xPos + ",top="  + yPos;
		popupWindow = window.open(location, "popupWindow", winAttr);
	}
	popupWindow.opener = parent;
	//marcovecchiWindow.focus();
}

function closePopupWindow() {
	if (popupWindow && popupWindow.open && !popupWindow.closed) {
		popupWindow.close();
	}
}

function openNewWindow2(URLtoOpen, windowName, windowWidth, windowHeight, windowFeatures) {
	var xPos = (screen.availWidth - windowWidth)/2;
	var yPos = (screen.availHeight - windowHeight)/2;
	var winAttr = 
		"width=" + windowWidth + ",height=" + windowHeight + 
		",left=" + xPos + ",top="  + yPos + 
		"," + windowFeatures;
		
	newWindow=window.open(URLtoOpen, windowName, winAttr);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}


var imgs = new Array();
function preloadImages() {
	for (i=0; i<imgsSrc.length; i++) {
		imgs[i] = new Image();
		imgs[i].src = imgsSrc[i];
	}
}

var cycle = 0;
function refreshImages() {
	for (i=0; i<document.images.length; i++) {
		document.images[i].src = document.images[i].src;
	}
	
	if (cycle < 3) {
		cycle++;
		setTimeout("refreshImages();", 5000);
	}
}

//-->

