// On live site - set an onload Event
if (vPrefix != "") {
	window.onload = init;
}
// When page has loaded
function init() {
  // if there is a Flash on the page 
  if (document.getElementById("Flash7") != null && document.getElementById("Flash7").innerHTML != "") {
	// IF cookie has been set THEN hide jpg and show flash ELSE set Timer (1)
	if (document.cookie.toLowerCase().indexOf('flash7') != -1) {
		document.getElementById("jpg").style.display="none"; 
		document.getElementById("Flash7").style.display="inline"; 
	}
	else {
		timeoutid=setTimeout('allow()',1000);
	}
  }
}
// Make flash 1x1 able to run javascript, set Timer (2)
function allow () {
	if (document.getElementById("f7")) {
		document.getElementById("f7").width = 1;
		document.getElementById("f7").height = 1;
	}
	document.getElementById("Flash7").style.display="inline"; 
	timeoutid=setTimeout('stopLoading()',2000);
}
// showFlash - invoked if the user has flash installed, sets a cookie, hides jpg, restores flash
function showFlash (text) {
  if (vPrefix != "") { //only on live site
//alert(text)
	expdt = new Date();
	expdt.setMonth(expdt.getMonth()+6);
	document.cookie = text + "; expires=" + expdt.toGMTString() +  "; path=/";
	document.getElementById("jpg").style.display="none"; 
	document.getElementById("f7").width = 318;
	document.getElementById("f7").height = 204;
 }
}
// stopLoading - after delay, if cookie has not been set then show jpg, hide flash
function stopLoading () {
	if (document.cookie.toLowerCase().indexOf('flash7') == -1) {
		document.getElementById("Flash7").style.display="none"
	}
}
