/*
son of suckerfish menu script from:
http://www.htmldog.com/articles/suckerfish/dropdowns/
 */
 
dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")

monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")

now = new Date

/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.createElement || !document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX");
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			for (var i=3; axo!=null; i++) {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
				PlayerVersion = new deconcept.PlayerVersion([i,0,0]);
			}
		}catch(e){}
		if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection
		// this only does the minor rev lookup if the user's major version 
		// is not 6 or we are checking for a specific minor or revision number
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) {
			try{
				PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
			}catch(e){}
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param){
		var q = document.location.search || document.location.hash;
		if(q){
			var startIndex = q.indexOf(param +"=");
			var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
			if (q.length > 1 && startIndex > -1) {
				return q.substring(q.indexOf("=", startIndex)+1, endIndex);
			}
		}
		return "";
	}
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;

/*	
	Validations.js v 2.1 - Custom Validation Script	
	Author:  Nitin Menon
	Email: 	 nitin@bigbuzz.com
	Date:	 10/9/2006 4:08 PM  	
	
	Validates Following:
	 - Empty Input Fields
	 - Check boxes 
	 - Radio buttons
	 - Email Format
	 - Date Format
	 - Zipcode Format (US/CA)
	 - Phone Number Format
	 - Social Security
	 - IP Address
	 - URL Format
	 - String Format
	 - Number Format
	 - Money Format
	 - Compares two strings
	 - Alpha Characters
	 - Alphanumeric Characters
	 - XSS Malicious Code
	 - Username Taken Verification (SPRY must be installed)
	 - Age Verification
*/

// CSS Style for the required text
var RequiredTextStyle = "color:red;padding-left:5px;font-family:arial;vertical-align:top;font-size:12px;";

function _$() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string') element = document.getElementById(element);
		if (arguments.length == 1) return element;
		elements.push(element);
	}
	return elements;
}

function trim(strValue){
	var objRegExp = /^(\s*)$/;
	if(objRegExp.test(strValue)){
	   strValue = strValue.replace(objRegExp, '');
	   if(strValue.length == 0) return strValue;
	};
	objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
	if(objRegExp.test(strValue)) strValue = strValue.replace(objRegExp, '$2');
	return strValue;
};

/*
	This function can be used filter inputs before submitting the form,
	However this function is not used within the Validate() this can be 
	used with 'on' events 
*/
function filter(id,type){
	switch(type){
		case "string":
			var field = _$(id);
			var newVal = field.value.replace(/\d/g,"");
			field.value = newVal;
		break;
		case "number":
			var field = _$(id);
			var newVal = field.value.replace(/[a-zA-Z!@#$%^&*\s?'._~`:;<=>{}()|+-]/g,"");
			field.value = newVal;
		break;
		case "money":
			var field = _$(id);
			var newVal = field.value.replace(/[a-zA-Z!@#$%^&*\s?'_~`:;<=>{}()|+-]/g,"");
			field.value = newVal;
		break;
		case "special":
			var field = _$(id);
			var newVal = field.value.replace(/[!@#$%^&*\s?'._~`:;<=>{}()|+]/g,"");
			field.value = newVal;
		break;
	};	
};

/*
	This function is used to clear all required span tags 
*/
function eraseAllReqSpanTags(){
	var span = document.getElementsByTagName("span"); 
	var re_elmName = new RegExp("_req");
	for (var i = 0; i < span.length; i++) { 
		spID = span[i].getAttribute("id"); 
		if (re_elmName.test(spID)) span[i].innerHTML="";
	};	
};

function validate(params){
	// Default Params
	if(!params.type) params.type = "";
	if(!params.required) params.required = "yes";
	if(!params.alerts) params.alerts = null;
	if(!params.minlength) params.minlength = null;

	/* 
		Firefox throws an exception error when focus() is called;
		To avoid this error, you have to turn off autocomplete
	*/
	var inputElements = document.getElementsByTagName("input");
	for (i=0; inputElements[i]; i++){
		inputElements[i].setAttribute("autocomplete","off");
	}
	
	// If field is a radio or checkbox get the name of the field not the id
	if(params.type.toLowerCase() == "radio" || params.type.toLowerCase() == "checkbox"){
		if(!params.name){ // Must pass in field name
			alert("ERROR: You must specify a Field name in your calling function. Please check your code."); 
			return false;
		}		
		var fieldname = document.getElementsByName(params.name);
		if(!fieldname){
			alert("ERROR: An input field with the Name= " + params.name + " does not exist. Please make sure that all input fields are labeled with the correct name. Please check your code."); 
			return false;
		}
		var FieldId = fieldname[0];
	}else{
		if(!params.id && !params.name){ // Must pass in field id
			alert("ERROR: You must specify a Field ID in your calling function. Please check your code."); 
			return false;
		}
		
		if(params.id){
			 var FieldId = _$(params.id);
		}else if(params.name){
			 var FieldId = document.getElementsByName(params.name)[0];
		}
		
		if(!FieldId){
			alert("ERROR: An input field with the ID= " + params.id + " does not exist. Please make sure that all input fields are labeled with the correct ID and that it matches the field Name. Please check your code."); 
			return false;
		}
	}

	if(params.type != "xsscode"){ //Malicious Code Check
		if(!validate(
			{ 
				id        : params.id,
				name      : params.name,
				type 	  : "xsscode",
				required  : params.required,
				minlength : params.minlength,
				alerts    : params.alerts,
				id2       : params.id2,
				urlpath   : params.urlpath,
				minage    : params.minage 
			}
		  )
		){ 
			return false;
		}
	}
	
	if(!params.alerts){ // If alerts is not defined, it will use alert message instead of spans
		var newSpan = _$(params.id + "_req");
		if( newSpan == null ){ 
			newSpan = document.createElement("span"); 
			newSpan.setAttribute('id',params.id + '_req'); 
			newSpan.style.cssText = RequiredTextStyle;  // IE
			newSpan.setAttribute('style',RequiredTextStyle); // FireFox 
		};
		var parent = FieldId.parentNode; 
		parent.insertBefore(newSpan,FieldId.nextSibling); 
		eraseAllReqSpanTags();
	}else{
		var required_message = params.alerts;	
	}
	
	if(!trim(FieldId.value).length && params.required != "no"){
		if(!params.alerts){
			newSpan.innerHTML = "Required";	
		}else{
			alert(required_message);
		}
		
		if(params.type.toLowerCase() != "hidden"){ // Hidden Fields Do Not Allow Focus In Internet Explorer
			FieldId.focus();
		}
		return false;
	}else if(trim(FieldId.value).length){ 
		if(params.minlength && trim(FieldId.value).length < params.minlength){
			if(!params.alerts){
				newSpan.innerHTML = "Must Have Atleast " + params.minlength + " Characters";
			}else{
				alert(params.id + " Must Have Atleast " + params.minlength + " Characters");	
			}
			FieldId.focus();
			return false;
		};
		switch(params.type.toLowerCase()){
			
			// Validate Check boxes and Radio buttons	
			case "checkbox": case "radio":
				var checked = -1;
				for (i=0; i < fieldname.length; i++){
					if(fieldname[i].checked) checked = i;
				};
				if(checked == -1){
					if(!params.alerts){
						newSpan.innerHTML = "Required";
					}else{
						alert(required_message);	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
				  	return true;
				};
			break;
			
			// Validate Email Addresses ( e.g: username@domain.com )
			case "email":
				if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid E-mail";
					}else{
						alert("Please Enter a Valid E-mail.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
				  	return true;
				};
			break;
			
			// Validate Date ( e.g: mm/dd/yyyy )
			case "date":
				if(!(/^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Date Format: [ mm/dd/yyyy ]";
					}else{
						alert("Please Enter Date Format: [ mm/dd/yyyy ].");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
				  	return true;
				};
			break;
			
			// Validate US & Canadian Zipcodes
			case "zipcode":
				var USZip = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
				var CAZip = /^((\d{5}-\d{4})|(\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\d[A-Za-z]\s?\d[A-Za-z]\d))$/;

				if(!(USZip.test(FieldId.value)) && !(CAZip.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid Zipcode";
					}else{
						alert("Please Enter a Valid Zipcode.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate Phone Number
			case "phone":
				if(!(/(\d{3})\D*(\d{3})\D*(\d{4})\D*(\d*)$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid Phone Number";
					}else{
						alert("Please Enter a Valid Phone Number With Area Code.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate Social Security
			case "social":
				var USSS = /^\d{3}\-?\d{2}\-?\d{4}$/;
				var CASS = /^\d{9}$/;
				
				if(!(USSS.test(FieldId.value)) && !(CASS.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid Social Security";
					}else{
						alert("Please Enter a Valid Social Security.");	
					}	
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate IP Address
			case "ip":
				if(!(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid IP Address";
					}else{
						alert("Please Enter a Valid IP Address.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate URL (Could be better...)
			case "url":
				var strURL1 = "^(https?://)?(([0-9a-z_!~*'().&=+$%-]+: )?[0-9a-z_!~*'().&=+$%-]+@)?";
				var strURL2 = "(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!~*'()-]+\.)*([0-9a-z][0-9a-z-]";
				var strURL3 = "{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!~*'().;?:@&=+$,%#-]+)+/?)$";
				var re = new RegExp(strURL1+strURL2+strURL3);
				if(!(re.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Enter Valid URL";
					}else{
						alert("Please Enter a Valid URL.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate String Format
			case "string":
				if((/[\d]/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Invalid! Only Letters Allowed";
					}else{
						alert("Invalid! Only Letters Allowed.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate Number Format
			case "number":
				if((/\D/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Invalid! Only Numbers Allowed";
					}else{
						alert("Invalid! Only Numbers Allowed.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}return true;
				};
			break;
			
			// Validate Money Format
			case "money":
				if((/[$]/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Please Remove The $";
					}else{
						alert("Please Remove The $.");	
					}
					FieldId.focus();
					return false;
				}else if((/[a-zA-Z!@#%^&*\s?'_~`:;<=>{}()|+-]/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Invalid! Only Numbers Allowed";
					}else{
						alert("Invalid! Only Numbers Allowed..");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Compare two string
			case "compare":
				if(!params.id2){ alert("ERROR: You must specify a second Field ID in your calling function if your type is 'compare'."); return false;}
				var FieldId_2 = _$(params.id2);
				if(FieldId.value != FieldId_2.value){
					if(!params.alerts){
						newSpan.innerHTML = "Confirmation Mismatch";
					}else{
						alert("Confirmation Entry Does Not Match.");	
					}
					FieldId.focus();
					return false;		
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate Alpha Characters ONLY
			case "alpha":
				if(!(/^[a-zA-Z]+$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Invalid! Only Alpha Characters Allowed";
					}else{
						alert("Invalid! Only Alpha Characters Allowed.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate Alphanumeric character ONLY
			case "alphanumeric":
				if(!(/^[a-zA-Z0-9]+$/.test(FieldId.value))){
					if(!params.alerts){
						newSpan.innerHTML = "Invalid! Only Alpha Numeric Characters Allowed";
					}else{
						alert("Invalid! Only Alpha Numeric Characters Allowed.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Validate XSS Malicious Code
			case "xsscode":
				var strRegex = "(-- )|(' )|(script)|(<)|(>)|(%3c)|(%3e)|(select)|(update)|(insert)|(delete)|(drop)|(grant)|(revoke)|(union)|(&lt;)|(&gt;)";
				var re = new RegExp(strRegex);
				var str = FieldId.value.toLowerCase();
				if(str.match(re)){
					if(!params.alerts){
						newSpan.innerHTML = "XSS (malicious) code detected!";
					}else{
						alert("XSS (malicious) code detected!");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Check if user name is available (SPRY FRAMEWORK REQUIRED) 
			case "un_availablity":
				if(!params.urlpath){ 
					alert("Please pass in a url path to the file that Spry will read. Url Path should be the 7th parameter passed into this function."); 
					return false; 
				}
				try{
					// This Validation can only be done if the Spry Files are being referenced
					request = Spry.Utils.loadURL("GET", params.urlpath + encodeURIComponent(FieldId.value), false);
					var result = request.xhRequest.responseText;
 				}catch(err){
				   alert("There was an error using Spry. Please make sure that the Spry files are set up correctly.");
				   return false;
				}				
				
   				if(result==0){
					if(!params.alerts){
						newSpan.innerHTML = "Username Taken";
					}else{
						alert("Username Taken.");	
					}
					FieldId.focus();
					return false;
				}else{
					if(!params.alerts){
						newSpan.innerHTML = "";
					}
					return true;
				};
			break;
			
			// Age Verification
			case "checkage":
				if(!params.minage) params.minage = 13; // Default Age

				var Today = new Date();
				Today.setHours(0,0,0,0); 
				// Must pass in date in mm/dd/yyyy format
				if(!validate({id:params.id,type:"date",required:"yes"})) return false;
				// Format field to be exactly in mm/dd/yyyy format
				FieldId.value = FieldId.value.replace(/^(\d{1}\/)/,"0$1").replace(/(\d{2}\/)(\d{1}\/)/,"$10$2");
				// Get Date using '/' as a delimiter  
				var splitDate = FieldId.value.split("/");
				// Creates Date from the value passed in an parsed [mm/dd/yyyy]
				var bDay = new Date(splitDate[2]+"/"+splitDate[0]+"/"+splitDate[1]);
				var age = Today.getFullYear() - bDay.getFullYear();
				var currYrbDay = new Date(Today.getFullYear(), bDay.getMonth(), bDay.getDate());
				if (currYrbDay > Today && age > 0) age--;
				
				if(age <  params.minage){
					alert("Sorry. You Are Not Old Enough To Continue.");	
					return false;
				}else{
					return true;
				};
			break;
			
			default: // Default Passed all validations
				if(!params.alerts){
					newSpan.innerHTML = "";
				}
				return true;
			break;
		};
	}else{
		if(!params.alerts){
			newSpan.innerHTML = "";
		}
		return true;
	};
};

        if (document.images) {
            adobequestion_on = new Image(); 
            adobequestion_on.src ="images/adobequestion_on.gif";
            clients_on = new Image(); 
            clients_on.src ="images/clients_on.gif";
            brokers_on = new Image(); 
            brokers_on.src ="images/brokers_on.gif";
            visitortour_on = new Image(); 
            visitortour_on.src ="images/visitortour_on.gif";
            register_on = new Image(); 
            register_on.src ="images/register_on.gif";
            disabilityinsurance_on = new Image(); 
            disabilityinsurance_on.src ="images/disabilityinsurance_on.gif";
            lifeinsurance_on = new Image(); 
            lifeinsurance_on.src ="images/lifeinsurance_on.gif";
            employeehome_on = new Image(); 
            employeehome_on.src ="images/bullet_on.gif";
            policyedit_on = new Image(); 
            policyedit_on.src ="images/policyedit_on.gif";
            policyadd_on = new Image(); 
            policyadd_on.src ="images/policyadd_on.gif";
            proposaledit_on = new Image(); 
            proposaledit_on.src ="images/proposaledit_on.gif";
            proposaladd_on = new Image(); 
            proposaladd_on.src ="images/proposaladd_on.gif";
            agentedit_on = new Image(); 
            agentedit_on.src ="images/agentedit_on.gif";
            agentadd_on = new Image(); 
            agentadd_on.src ="images/agentadd_on.gif";
            agentsort_on = new Image(); 
            agentsort_on.src ="images/bullet_on.gif";
            policysort_on = new Image(); 
            policysort_on.src ="images/bullet_on.gif";
            downloadsadmin_on = new Image(); 
            downloadsadmin_on.src ="images/downloadsadmin_on.gif";
            sitemetrics_on = new Image(); 
            sitemetrics_on.src ="images/sitemetrics_on.gif";
            agentmail_on = new Image(); 
            agentmail_on.src ="images/agentmail_on.gif";
            registrationsort_on = new Image(); 
            registrationsort_on.src ="images/registrationsort_on.gif";
            faq_on = new Image(); 
            faq_on.src ="images/bullet_on.gif";
            welcome_on = new Image(); 
            welcome_on.src ="images/bullet_on.gif";
            register_on = new Image(); 
            register_on.src ="images/bullet_on.gif";
            brokerlogin_on = new Image(); 
            brokerlogin_on.src ="images/bullet_on.gif";
            whatsnew_on = new Image(); 
            whatsnew_on.src ="images/bullet_on.gif";
            contactus_on = new Image(); 
            contactus_on.src ="images/bullet_on.gif";
            contactusheader_on = new Image(); 
            contactusheader_on.src ="images/contactusheader_on.gif";
            employeemail_on = new Image(); 
            employeemail_on.src ="images/bullet_on.gif";
            checkcases_on = new Image(); 
            checkcases_on.src ="images/checkcases_on.gif";
            diquoterequest_on = new Image(); 
            diquoterequest_on.src ="images/bullet_on.gif";
            dipolicyservice_on = new Image(); 
            dipolicyservice_on.src ="images/bullet_on.gif";
            diuwrequirements_on = new Image(); 
            diuwrequirements_on.src ="images/bullet_on.gif";
            dimedical_on = new Image(); 
            dimedical_on.src ="images/bullet_on.gif";
            diproductlist_on = new Image(); 
            diproductlist_on.src ="images/bullet_on.gif";
            dicompetition_on = new Image(); 
            dicompetition_on.src ="images/bullet_on.gif";
            diforms_on = new Image(); 
            diforms_on.src ="images/bullet_on.gif";
            diapps_on = new Image(); 
            diapps_on.src ="images/bullet_on.gif";
            lifequoterequest_on = new Image(); 
            lifequoterequest_on.src ="images/bullet_on.gif";
            lifepolicyservice_on = new Image(); 
            lifepolicyservice_on.src ="images/bullet_on.gif";
            lifeuwrequirements_on = new Image(); 
            lifeuwrequirements_on.src ="images/bullet_on.gif";
            lifemedical_on = new Image(); 
            lifemedical_on.src ="images/bullet_on.gif";
            lifeproductlist_on = new Image(); 
            lifeproductlist_on.src ="images/bullet_on.gif";
            lifeforms_on = new Image(); 
            lifeforms_on.src ="images/bullet_on.gif";
            lifeapps_on = new Image(); 
            lifeapps_on.src ="images/bullet_on.gif";
            ltcforms_on = new Image(); 
            ltcforms_on.src ="images/bullet_on.gif";
            downloads_on = new Image(); 
            downloads_on.src ="images/bullet_on.gif";
            downloadsadmin_on = new Image(); 
            downloadsadmin_on.src ="images/bullet_on.gif";
            directions_on = new Image(); 
            directions_on.src ="images/bullet_on.gif";
            meetings_on = new Image(); 
            meetings_on.src ="images/bullet_on.gif";
            occguide_on = new Image(); 
            occguide_on.src ="images/bullet_on.gif";
            statusapproved_on = new Image(); 
            statusapproved_on.src ="images/statusapproved_on.gif";
            statusissued_on = new Image(); 
            statusissued_on.src ="images/statusissued_on.gif";
            requirementsnotsent_on = new Image(); 
            requirementsnotsent_on.src ="images/requirementsnotsent_on.gif";
            requirementsoverdue_on = new Image(); 
            requirementsoverdue_on.src ="images/requirementsoverdue_on.gif";
            diquoterequesta_on = new Image(); 
            diquoterequesta_on.src ="images/diquoterequesta_on.gif";
            diquoterequestb_on = new Image(); 
            diquoterequestb_on.src ="images/diquoterequestb_on.gif";
            diquoterequestc_on = new Image(); 
            diquoterequestc_on.src ="images/diquoterequestc_on.gif";
            diquoterequestd_on = new Image(); 
            diquoterequestd_on.src ="images/diquoterequestd_on.gif";
			diquoterequeste_on = new Image();
			diquoterequeste_on.src ="images/diquoterequeste_on.gif";
			diquoterequestf_on = new Image();
			diquoterequestf_on.src ="images/diquoterequestf_on.gif";
			diquoterequestg_on = new Image();
			diquoterequestg_on.src ="images/diquoterequestg_on.gif";
            lifequoterequesta_on = new Image(); 
            lifequoterequesta_on.src ="images/lifequoterequesta_on.gif";
            lifequoterequestb_on = new Image(); 
            lifequoterequestb_on.src ="images/lifequoterequestb_on.gif";
            contactusfront_on = new Image(); 
            contactusfront_on.src ="images/contactusfront_on.gif";
            diquotefront_on = new Image(); 
            diquotefront_on.src ="images/diquotefront_on.gif";
            lifequotefront_on = new Image(); 
            lifequotefront_on.src ="images/lifequotefront_on.gif";
            newsletterfront_on = new Image(); 
            newsletterfront_on.src ="images/newsletterfront_on.gif";
            registerfront_on = new Image(); 
            registerfront_on.src ="images/registerfront_on.gif";
            guidedtourfront_on = new Image(); 
            guidedtourfront_on.src ="images/guidedtourfront_on.gif";
            upcomingmeetingsfront_on = new Image(); 
            upcomingmeetingsfront_on.src ="images/upcomingmeetingsfront_on.gif";
            clients_on = new Image(); 
            clients_on.src ="images/clients_on.gif";
            brokers_on = new Image(); 
            brokers_on.src ="images/brokers_on.gif";
            ourhistory_on = new Image(); 
            ourhistory_on.src ="images/bullet_on.gif";
            ourapproach_on = new Image(); 
            ourapproach_on.src ="images/bullet_on.gif";
            ourportfolio_on = new Image(); 
            ourportfolio_on.src ="images/bullet_on.gif";
            ourstructure_on = new Image(); 
            ourstructure_on.src ="images/bullet_on.gif";
            ourteam_on = new Image(); 
            ourteam_on.src ="images/bullet_on.gif";
            ourphilosophy_on = new Image(); 
            ourphilosophy_on.src ="images/bullet_on.gif";
            ourfuture_on = new Image(); 
            ourfuture_on.src ="images/bullet_on.gif";
            ourcontacts_on = new Image(); 
            ourcontacts_on.src ="images/bullet_on.gif";
			careerfinancialrep_on = new Image(); 
            careerfinancialrep_on.src ="images/bullet_on.gif";
			careerforesthills_on = new Image(); 
            careerforesthills_on.src ="images/bullet_on.gif";
			careercompensation_on = new Image(); 
            careercompensation_on.src ="images/bullet_on.gif";
			careermarket_on = new Image(); 
            careermarket_on.src ="images/bullet_on.gif";
			careerenriching_on = new Image(); 
            careerenriching_on.src ="images/bullet_on.gif";
			careereducation_on = new Image(); 
            careereducation_on.src ="images/bullet_on.gif";
			careeropportunities_on = new Image(); 
            careeropportunities_on.src ="images/bullet_on.gif";
			careerelite_on = new Image(); 
            careerelite_on.src ="images/bullet_on.gif";
			careerkeys_on = new Image(); 
            careerkeys_on.src ="images/bullet_on.gif";
			careersteps_on = new Image(); 
            careersteps_on.src ="images/bullet_on.gif";
			sitefeedback_on = new Image(); 
            sitefeedback_on.src ="images/sitefeedback_on.gif";
            sendusmail_on = new Image(); 
            sendusmail_on.src ="images/sendusmail_on.gif";
            registrationedit_on = new Image(); 
            registrationedit_on.src ="images/registrationedit_on.gif";
            contactusheader_on = new Image(); 
            contactusheader_on.src ="images/contactusheader_on.gif";
            diquoteheader_on = new Image(); 
            diquoteheader_on.src ="images/diquoteheader_on.gif";
            lifequoteheader_on = new Image(); 
            lifequoteheader_on.src ="images/lifequoteheader_on.gif";
            appsformsheader_on = new Image(); 
            appsformsheader_on.src ="images/appsformsheader_on.gif";
            checkcasesheader_on = new Image(); 
            checkcasesheader_on.src ="images/checkcasesheader_on.gif";
            registerheader_on = new Image(); 
            registerheader_on.src ="images/registerheader_on.gif";
            policyeditbase_on = new Image(); 
            policyeditbase_on.src ="images/policyeditbase_on.gif";
            policyeditreq_on = new Image(); 
            policyeditreq_on.src ="images/policyeditreq_on.gif";
            policyeditagent_on = new Image(); 
            policyeditagent_on.src ="images/policyeditagent_on.gif";
            autoforwarding_on = new Image(); 
            autoforwarding_on.src ="images/autoforwarding_on.gif";
            massmailissued_on = new Image(); 
            massmailissued_on.src ="images/massmailissued_on.gif";
            massmailpending_on = new Image(); 
            massmailpending_on.src ="images/massmailpending_on.gif";
            proposalsoverdue_on = new Image(); 
            proposalsoverdue_on.src ="images/proposalsoverdue_on.gif";
            sitemetrics_on = new Image(); 
            sitemetrics_on.src ="images/sitemetrics_on.gif";
            contactlist_on = new Image(); 
            contactlist_on.src ="images/contactlist_on.gif";

		
            adobequestion_off = new Image(); 
            adobequestion_off.src ="images/adobequestion_off.gif";
            clients_off = new Image(); 
            clients_off.src ="images/clients_off.gif";
            brokers_off = new Image(); 
            brokers_off.src ="images/brokers_off.gif";
            visitortour_off = new Image(); 
            visitortour_off.src ="images/visitortour_off.gif";
            register_off = new Image(); 
            register_off.src ="images/register_off.gif";
            disabilityinsurance_off = new Image(); 
            disabilityinsurance_off.src ="images/disabilityinsurance_off.gif";
            lifeinsurance_off = new Image(); 
            lifeinsurance_off.src ="images/lifeinsurance_off.gif";
            employeehome_off = new Image(); 
            employeehome_off.src ="images/bullet_off.gif";
            agenthome_off = new Image(); 
            agenthome_off.src ="images/bullet_off.gif";
			policyedit_off = new Image(); 
            policyedit_off.src ="images/policyedit_off.gif";
            policyadd_off = new Image(); 
            policyadd_off.src ="images/policyadd_off.gif";
            proposaledit_off = new Image(); 
            proposaledit_off.src ="images/proposaledit_off.gif";
            proposaladd_off = new Image(); 
            proposaladd_off.src ="images/proposaladd_off.gif";
            agentedit_off = new Image(); 
            agentedit_off.src ="images/agentedit_off.gif";
            agentadd_off = new Image(); 
            agentadd_off.src ="images/agentadd_off.gif";
            agentsort_off = new Image(); 
            agentsort_off.src ="images/bullet_off.gif";
            policysort_off = new Image(); 
            policysort_off.src ="images/bullet_off.gif";
            downloadsadmin_off = new Image(); 
            downloadsadmin_off.src ="images/downloadsadmin_off.gif";
            sitemetrics_off = new Image(); 
            sitemetrics_off.src ="images/sitemetrics_off.gif";
            agentmail_off = new Image(); 
            agentmail_off.src ="images/agentmail_off.gif";
            registrationsort_off = new Image(); 
            registrationsort_off.src ="images/registrationsort_off.gif";
            faq_off = new Image(); 
            faq_off.src ="images/bullet_off.gif";
            welcome_off = new Image(); 
            welcome_off.src ="images/bullet_off.gif";
            register_off = new Image(); 
            register_off.src ="images/bullet_off.gif";
            brokerlogin_off = new Image(); 
            brokerlogin_off.src ="images/bullet_off.gif";
            whatsnew_off = new Image(); 
            whatsnew_off.src ="images/bullet_off.gif";
            contactus_off = new Image(); 
            contactus_off.src ="images/bullet_off.gif";
            contactusheader_off = new Image(); 
            contactusheader_off.src ="images/contactusheader_off.gif";
            employeemail_off = new Image(); 
            employeemail_off.src ="images/bullet_off.gif";
            checkcases_off = new Image(); 
            checkcases_off.src ="images/checkcases_off.gif";
            diquoterequest_off = new Image(); 
            diquoterequest_off.src ="images/bullet_off.gif";
            dipolicyservice_off = new Image(); 
            dipolicyservice_off.src ="images/bullet_off.gif";
            diuwrequirements_off = new Image(); 
            diuwrequirements_off.src ="images/bullet_off.gif";
            dimedical_off = new Image(); 
            dimedical_off.src ="images/bullet_off.gif";
            diproductlist_off = new Image(); 
            diproductlist_off.src ="images/bullet_off.gif";
            dicompetition_off = new Image(); 
            dicompetition_off.src ="images/bullet_off.gif";
            diforms_off = new Image(); 
            diforms_off.src ="images/bullet_off.gif";
            diapps_off = new Image(); 
            diapps_off.src ="images/bullet_off.gif";
            lifequoterequest_off = new Image(); 
            lifequoterequest_off.src ="images/bullet_off.gif";
            lifepolicyservice_off = new Image(); 
            lifepolicyservice_off.src ="images/bullet_off.gif";
            lifeuwrequirements_off = new Image(); 
            lifeuwrequirements_off.src ="images/bullet_off.gif";
            lifemedical_off = new Image(); 
            lifemedical_off.src ="images/bullet_off.gif";
            lifeproductlist_off = new Image(); 
            lifeproductlist_off.src ="images/bullet_off.gif";
            lifeforms_off = new Image(); 
            lifeforms_off.src ="images/bullet_off.gif";
            lifeapps_off = new Image(); 
            lifeapps_off.src ="images/bullet_off.gif";
            ltcforms_off = new Image(); 
            ltcforms_off.src ="images/bullet_off.gif";
            downloads_off = new Image(); 
            downloads_off.src ="images/bullet_off.gif";
            downloadsadmin_off = new Image(); 
            downloadsadmin_off.src ="images/bullet_off.gif";
            directions_off = new Image(); 
            directions_off.src ="images/bullet_off.gif";
            meetings_off = new Image(); 
            meetings_off.src ="images/bullet_off.gif";
            occguide_off = new Image(); 
            occguide_off.src ="images/bullet_off.gif";
            statusapproved_off = new Image(); 
            statusapproved_off.src ="images/statusapproved_off.gif";
            statusissued_off = new Image(); 
            statusissued_off.src ="images/statusissued_off.gif";
            requirementsnotsent_off = new Image(); 
            requirementsnotsent_off.src ="images/requirementsnotsent_off.gif";
            requirementsoverdue_off = new Image(); 
            requirementsoverdue_off.src ="images/requirementsoverdue_off.gif";
            diquoterequesta_off = new Image(); 
            diquoterequesta_off.src ="images/diquoterequesta_off.gif";
            diquoterequestb_off = new Image(); 
            diquoterequestb_off.src ="images/diquoterequestb_off.gif";
            diquoterequestc_off = new Image(); 
            diquoterequestc_off.src ="images/diquoterequestc_off.gif";
            diquoterequestd_off = new Image(); 
            diquoterequestd_off.src ="images/diquoterequestd_off.gif";
			diquoterequeste_off = new Image();
			diquoterequeste_off.src ="images/diquoterequeste_off.gif";
			diquoterequestf_off = new Image();
			diquoterequestf_off.src ="images/diquoterequestf_off.gif";
			diquoterequestg_off = new Image();
			diquoterequestg_off.src ="images/diquoterequestg_off.gif";
            lifequoterequesta_off = new Image(); 
            lifequoterequesta_off.src ="images/lifequoterequesta_off.gif";
            lifequoterequestb_off = new Image(); 
            lifequoterequestb_off.src ="images/lifequoterequestb_off.gif";
            contactusfront_off = new Image(); 
            contactusfront_off.src ="images/contactusfront_off.gif";
            diquotefront_off = new Image(); 
            diquotefront_off.src ="images/diquotefront_off.gif";
            lifequotefront_off = new Image(); 
            lifequotefront_off.src ="images/lifequotefront_off.gif";
            newsletterfront_off = new Image(); 
            newsletterfront_off.src ="images/newsletterfront_off.gif";
            registerfront_off = new Image(); 
            registerfront_off.src ="images/registerfront_off.gif";
            guidedtourfront_off = new Image(); 
            guidedtourfront_off.src ="images/guidedtourfront_off.gif";
            upcomingmeetingsfront_off = new Image(); 
            upcomingmeetingsfront_off.src ="images/upcomingmeetingsfront_off.gif";
            clients_off = new Image(); 
            clients_off.src ="images/clients_off.gif";
            brokers_off = new Image(); 
            brokers_off.src ="images/brokers_off.gif";
            ourhistory_off = new Image(); 
            ourhistory_off.src ="images/bullet_off.gif";
            ourapproach_off = new Image(); 
            ourapproach_off.src ="images/bullet_off.gif";
            ourportfolio_off = new Image(); 
            ourportfolio_off.src ="images/bullet_off.gif";
            ourstructure_off = new Image(); 
            ourstructure_off.src ="images/bullet_off.gif";
            ourteam_off = new Image(); 
            ourteam_off.src ="images/bullet_off.gif";
            ourphilosophy_off = new Image(); 
            ourphilosophy_off.src ="images/bullet_off.gif";
            ourfuture_off = new Image(); 
            ourfuture_off.src ="images/bullet_off.gif";
            ourcontacts_off = new Image(); 
            ourcontacts_off.src ="images/bullet_off.gif";
			careerfinancialrep_off = new Image(); 
            careerfinancialrep_off.src ="images/bullet_off.gif";
			careerforesthills_off = new Image(); 
            careerforesthills_off.src ="images/bullet_off.gif";
			careercompensation_off = new Image(); 
            careercompensation_off.src ="images/bullet_off.gif";
			careermarket_off = new Image(); 
            careermarket_off.src ="images/bullet_off.gif";
			careerenriching_off = new Image(); 
            careerenriching_off.src ="images/bullet_off.gif";
			careereducation_off = new Image(); 
            careereducation_off.src ="images/bullet_off.gif";
			careeropportunities_off = new Image(); 
            careeropportunities_off.src ="images/bullet_off.gif";
			careerelite_off = new Image(); 
            careerelite_off.src ="images/bullet_off.gif";
			careerkeys_off = new Image(); 
            careerkeys_off.src ="images/bullet_off.gif";
			careersteps_off = new Image(); 
            careersteps_off.src ="images/bullet_off.gif";
			sitefeedback_off = new Image(); 
            sitefeedback_off.src ="images/sitefeedback_off.gif";
            sendusmail_off = new Image(); 
            sendusmail_off.src ="images/sendusmail_off.gif";
            registrationedit_off = new Image(); 
            registrationedit_off.src ="images/registrationedit_off.gif";
            contactusheader_off = new Image(); 
            contactusheader_off.src ="images/contactusheader_off.gif";
            diquoteheader_off = new Image(); 
            diquoteheader_off.src ="images/diquoteheader_off.gif";
            lifequoteheader_off = new Image(); 
            lifequoteheader_off.src ="images/lifequoteheader_off.gif";
            appsformsheader_off = new Image(); 
            appsformsheader_off.src ="images/appsformsheader_off.gif";
            checkcasesheader_off = new Image(); 
            checkcasesheader_off.src ="images/checkcasesheader_off.gif";
            registerheader_off = new Image(); 
            registerheader_off.src ="images/registerheader_off.gif";
            policyeditbase_off = new Image(); 
            policyeditbase_off.src ="images/policyeditbase_off.gif";
            policyeditreq_off = new Image(); 
            policyeditreq_off.src ="images/policyeditreq_off.gif";
            policyeditagent_off = new Image(); 
            policyeditagent_off.src ="images/policyeditagent_off.gif";
            autoforwarding_off = new Image(); 
            autoforwarding_off.src ="images/autoforwarding_off.gif";
            massmailissued_off = new Image(); 
            massmailissued_off.src ="images/massmailissued_off.gif";
            massmailpending_off = new Image(); 
            massmailpending_off.src ="images/massmailpending_off.gif";
            proposalsoverdue_off = new Image(); 
            proposalsoverdue_off.src ="images/proposalsoverdue_off.gif";
            sitemetrics_off = new Image(); 
            sitemetrics_off.src ="images/sitemetrics_off.gif";
            contactlist_off = new Image(); 
            contactlist_off.src ="images/contactlist_off.gif";
			
        }

// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_on.src");

        }
}

// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_off.src");

        }
}

// -->

<!-- 
<!-- http://www.shiningstar.net -->
<!-- Begin
function checkNumeric(objName,minval, maxval,comma,period,hyphen)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen) == false)
	{
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function chkNumeric(objName,minval,maxval,comma,period,hyphen)
{
// only allow 0-9 be entered, plus any values passed
// (can be in any order, and don't have to be comma, period, or hyphen)
// if all numbers allow commas, periods, hyphens or whatever,
// just hard code it here and take out the passed parameters
var checkOK = "0123456789." + comma + period + hyphen;
var checkStr = objName;
var allValid = true;
var decPoints = 0;
var allNum = "";

for (i = 0;  i < checkStr.value.length;  i++)
{
ch = checkStr.value.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{	
alertsay = "Please enter only these values \""
alertsay = alertsay + checkOK + "\" in the Sort field."
alert(alertsay);
return (false);
}

// set the minimum and maximum
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal >= minval && prsVal <= maxval))
{
alertsay = "Please enter a value greater than or "
alertsay = alertsay + "equal to \"" + minval + "\" and less than or "
alertsay = alertsay + "equal to \"" + maxval + "\" in the \"" + checkStr.name + "\" field."
alert(alertsay);
return (false);
}
}
//  End -->

<!--
dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date
// -->

<!--

function description_window(url) {
        if(navigator.userAgent.indexOf("MSIE") == -1) {
      newwindow = window.open(url,'description','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=450');
      newwindow.focus();
    } else {
      window.open(url,'description','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=450,height=450');
    }
}

function openCar() {
window.open('http://guardian-vms.com/vmWebPages/fhfg_recruit.asp?recID=88126&VMID=408','newWin','toolbar=no,scrollbars=no,width=1010,height=700')
}

function openLBS() {
window.open('http://www.livingbalancesheet.net/client/ForestHills_web/Clients_webHi.htm','newWin','toolbar=no,scrollbars=no,width=1010,height=640')
}

function openLBS2() {
window.open('http://www.livingbalancesheet.net/client/ForestHills_Web/Business_webHi.htm','newWin','toolbar=no,scrollbars=no,width=1010,height=640')
}

function openFHF() {
window.open('http://www.fhfg.com/FHFvideo.cfm','newWin','toolbar=no,scrollbars=no,width=365,height=350')
}

function openFHF2() {
window.open('http://www.fhfg.com/FHFvideo2.cfm','newWin','toolbar=no,scrollbars=no,width=530,height=450')
}
