// JavaScript Document

/*** Begin Flash Detection & Insert Utility ***/
// Detect Client Browser type
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;

/*************************************************************************/
if(isIE && isWin) {
	document.write("<" + "SCR" + "IPT LANGUAGE=VBScript> \n");
    document.write("  Function VBGetSwfVer(i) \n");
    document.write("    on error resume next \n");
    document.write("    Dim swControl, swVersion \n");
    document.write("    swVersion = 0 \n");
    document.write("    set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i)) \n");
    document.write("    if (IsObject(swControl)) then \n");
    document.write("      swVersion = swControl.GetVariable(\"$version\") \n");
	document.write("      break  \n");
    document.write("    end if \n");
    document.write("    VBGetSwfVer = swVersion \n");
    document.write("End Function \n");
	document.write("// -->  \n");
	document.write("<" + "/SCR" + "IPT> \n");
}
/************************************************************************/


/*function insertFlashObject(mUrl,mWidth,mHeight,mMenu,mWMode) {
	var flashString = "";
	
	flashString += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"" + mWidth + "\" height=\"" + mHeight + "\">";
	flashString += "<param name=\"movie\" value=\"" + mUrl + "\" />";
	flashString += "<param name=\"quality\" value=\"high\" />";
	flashString += "<param name=\"menu\" value=\"" + mMenu + "\" />";
	flashString += "<param name=\"wmode\" value=\"" + mWMode + "\" />";
	flashString += "<embed src=\"" + mUrl + "\" quality=\"high\" menu=\"" + mMenu + "\" wmode=\"" + mWMode + "\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + mWidth + "\"  height=\"" + mHeight + "\"></embed>";
	flashString += "</object>";
	
	document.write(flashString);
}*/

/*** Show/Hide Toggle ***/

function toggle(element) {
	if (document.getElementById(element).style.display == "none") {
		document.getElementById(element).style.display = "";
	} else {
		document.getElementById(element).style.display = "none";
	}
}


/**** Form Validation ****/
function validateEmail( strValue) {
	var objRegExp  = /^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/i;
	return objRegExp.test(strValue);
}

function validateAlpha( strValue ) {
	var objRegExp  = /(^[a-zA-Z',.\-\ ]+$)/;
	return objRegExp.test(strValue);
}

function validateAlphaNum( strValue ) {
	var objRegExp  = /(^[a-zA-Z0-9'_,&.#\-\ ]+$)/;
	return objRegExp.test(strValue);
}