<!--
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_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_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 frmSubmit()
{	
	
	if (!validation.nonBlank(document.TheForm.Email, "Email"))
		return false;
	if (!validation.validEmail(document.TheForm.Email, "Email"))
		return false;
		
}

//-->

<!--

// This set of function are general includes for validation
// They are designed in pairs the validation and the event function
// the event function will call the validation with the event src

function display_name(item) {
	var strDisplay = item.getAttribute("DisplayName");
	if (strDisplay==null || strDisplay=="")
		strDisplay="Field";
	return strDisplay;
}

function default_value(item) {
	var strDefault = item.defaultValue;
	if (strDefault==null || strDefault=="")
		strDefault="";
	return strDefault;
}

function trim_string() {
	var ichar, icount;
	var strValue = this;
	ichar = strValue.length - 1;
	icount = -1;
	while (strValue.charAt(ichar)==' ' && ichar > icount)
		--ichar;
	if (ichar!=(strValue.length-1))
		strValue = strValue.slice(0,ichar+1);
	ichar = 0;
	icount = strValue.length - 1;
	while (strValue.charAt(ichar)==' ' && ichar < icount)
		++ichar;
	if (ichar!=0)
		strValue = strValue.slice(ichar,strValue.length);
	return strValue;
}

function date_toSimpleForm() {
	var toSimpleForm = new String;
	toSimpleForm = this.toLocaleString();
	toSimpleForm = toSimpleForm.substring(0,toSimpleForm.indexOf(' '));
	return toSimpleForm;
}


function vs_non_blank(item, itemName) {
	var strErrorMsg = "Please complete the " + itemName + " field.";
	item.value=item.value.Trim();
	if (item.value.length==0) {
		item.focus();
		alert(strErrorMsg);
		return false;
	}
	return true;
}

function vs_valid_email(item, itemName) {
	var strErrorMsg = "Please enter a valid address in the " + itemName + " field.";
	item.value=item.value.Trim();
	if (!(/^[\w\.]+@[\w-\.]+$/.test(item.value))) {
		item.focus();
		alert(strErrorMsg);
		return false;
	}
	return true;
}

// build the validation object
function validation_setup() {
	this.nonBlank = vs_non_blank;
	this.validEmail = vs_valid_email;
	return this;
}

// Extend the string object to include a trim function
String.prototype.Trim = trim_string;
// Extend the date object to include a simple form string conversion
Date.prototype.toSimpleForm = date_toSimpleForm;

// Construct the validation object
var validation = new Object;
validation = validation_setup();

//-->

<!--
var msgString = "Enter Email";
function ClearField(field) {
	if (field.value == msgString) { field.value = ""; }
}
function ResetField(field) {
	if (field.value == "") { field.value = msgString; }
}
// -->


