//new sniffer code from Flash9

AC_FL_RunContent = 0;
DetectFlashVer = 0;

// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 24;

function checkver() {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	if (!hasRightVersion) {
		location.replace("noflash.htm");
	}
}

function checkver_content() {
	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	if (!hasRightVersion) {
		location.replace("../noflash.htm");
	}
}

//generic shared functions and dreamweaver functions moved from individual pages

function message(){
alert('Coming Soon!');
}


var newWindow=null;
var newWindow1=null;
var newWindow2=null;
var newWindow3=null;

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen,'thewin','height=650,width=845, toolbar=no, scrollbars=yes, resizable=yes, left=25,top=25');
maintainFocus();
}

function maintainFocus() {
  if (newWindow != null && newWindow.open) newWindow.focus();
}

function openNewWindow1(URLtoOpen, windowName, windowFeatures) {
newWindow1=window.open(URLtoOpen,'thewin1','height=650,width=845, toolbar=no, scrollbars=yes, resizable=yes, left=20,top=20');
maintainFocus1();
}

function maintainFocus1() {
  if (newWindow1 != null && newWindow1.open) newWindow1.focus();
}

function openNewWindow2(URLtoOpen, windowName, windowFeatures) {
newWindow2=window.open(URLtoOpen,'thewin2','height=650,width=845, toolbar=no, scrollbars=yes, resizable=yes, left=15,top=15');
maintainFocus2();
}

function maintainFocus2() {
  if (newWindow2 != null && newWindow2.open) newWindow2.focus();
}

function openNewWindow3(URLtoOpen, windowName, windowFeatures) {
newWindow3=window.open(URLtoOpen,'thewin3','height=650,width=845, toolbar=no, scrollbars=yes, resizable=yes, left=10,top=10');
maintainFocus3();
}

function maintainFocus3() {
  if (newWindow3 != null && newWindow3.open) newWindow3.focus();
}

function goHome(){
	if(window.opener)
	window.close();
	else
	location='index.htm';
}

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 MM_swapImgRestore() { //v3.0
  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_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  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 toggleLayer(whichLayer) {
	if (document.getElementById)
	{
		// for standards compliance browsers
		var styleOnOff = document.getElementById(whichLayer).style;
			if (styleOnOff.display=="block") {
				return;
			}
		styleOnOff.display = styleOnOff.display? "":"block";
	}
	else if (document.all)
	{
		// for older IE
		var styleOnOff = document.all[whichLayer].style;
			if (styleOnOff.display=="block") {
				return;
			}
		styleOnOff.display = styleOnOff.display? "":"block";
	}
	else if (document.layers)
	{
		// for N4 but it ain't working the way I want it to. 
		//I think we should use an @import .css and have N4 just display all content without any css 
		var styleOnOff = document.layers[whichLayer].style;
			if (styleOnOff.display=="block") {
				return;
			}
		styleOnOff.display = styleOnOff.display? "":"block";
	}
	location.href="#feedback";
}

function goodToGo() {
	document.form1.answerbox.focus();
}

function goback() { 
	msg = "Are you sure you want to return to module homepage?";
	msg = msg + "\n\n";
	msg = msg + "Click OK to return to module homepage, or \n";
	msg = msg + "click Cancel to resume viewing at current location.\n";
	conf = confirm(msg);
	if (conf == true) { 
		parent.location.href = "index.htm"; 
		}
}
function goHome(){
	if(window.opener)
	window.close();
	else
	location='index.htm';
}

