function openTerms()
{
	newwin = window.open("disclaimer.html","terms","width=505,height=400,scrollbars=yes");
}

function openPrivacy()
{
	newwin = window.open("privacy.html","terms","width=505,height=400,scrollbars=yes");
}

function openForm()
{
	newwin = window.open("email_form.html","terms","width=450,height=650,scrollbars=yes");
}

function openMap()
{
	newwin = window.open("map.html","map","width=448,height=615,scrollbars=no");
}

function navOver(imgName)
{
 var theImage = document.getElementById(imgName);
 if(theImage.src.indexOf("_off.gif") != -1)
 {
  theImage.src = theImage.src.replace("_off.gif","_on.gif");
 }
 else
 {
  theImage.src = theImage.src.replace("_on.gif","_off.gif");
 }
}


// Flash test
var isDOM = (document.getElementById) ? true : false;
var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var isNetscape = (!isOpera && (navigator.appName.indexOf("Netscape") != -1 && navigator.userAgent.indexOf("4.") != -1)) ? true : false;
var isMac = (navigator.userAgent.indexOf("Mac") != -1) ? true : false;

var bUsedHTML = ((isDOM || isIE || isNetscape) && !isMac) ? true : false
var iLatestFlashVersion = 7;
var iMinimumFlashVersion = 6;
var iFlashVersion = -1;

// Variable must be global for VBScript to work correctly.
var thisFlashVersion;
function flash_getIEVersion() {

	var thisMaxVersion = false;
	for(var currentVersion=iMinimumFlashVersion; currentVersion<=iLatestFlashVersion; currentVersion++) {
		document.write('<SCR'+'IPT LANGUAGE="VBScript">\n');
		document.write('on error resume next\n');
		document.write('thisFlashVersion = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+currentVersion+'")))\n');
		document.write('</SCR'+'IPT>\n');

		if(thisFlashVersion) {
			thisMaxVersion = currentVersion;
		}
	}
	return thisMaxVersion;
}

function flash_setVersion() {
	if (navigator.plugins.length > 0) {
		// Plugin detect, no VBScript support
		navigator.plugins.refresh(false);
		numPlugins = navigator.plugins.length;
		for(var i=0; i<numPlugins; i++)	{
			plugDesc = navigator.plugins[i].description;
			iFlashVersion = (plugDesc.indexOf("Flash") != -1) ? parseInt(plugDesc.charAt(parseInt(plugDesc.indexOf("Flash"))+6)) : 0;
			if(iFlashVersion > 0) {
				return;
			}
		}
	} else if(!isMac && (isIE || isOpera)) {
		// No plugin detect, VBScript support
		iFlashVersion = flash_getIEVersion();
	} else {
		// No plugin detect, no VBScript support
		iFlashVersion = iLatestFlashVersion;
	}
}

// Set Flash Version
flash_setVersion();

function printFlash(flashSRC, imageSRC, width, height, map)
{
	var pntStr;
	if(iFlashVersion >= iMinimumFlashVersion)
	{
		pntStr = "<object width=" + width + " height=" + height + " VIEWASTEXT>";
		pntStr += "<param name='movie' value='" + flashSRC + "'>";
		pntStr += "<param name='quality' value='high'>";
		pntStr += "<embed src='" + flashSRC + "' quality='high' ";
		pntStr += "type='application/x-shockwave-flash' width=" + width + " height=" + height + " wmode='transparent'>";
		pntStr += "</embed></object>";
	}
	else
	{
		pntStr = "<img usemap='#" + map + "' src='" + imageSRC + "' width=" + width + " height=" + height + " alt='' border=0>";
	}
	document.write(pntStr);
}


