/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
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(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!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 _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[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;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
//-------------------------------------------------------------------------------------------------------------------------------------------------

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 flevDivPositionValue(sDiv, sProperty) { // v2.1, Marja Ribbers-de Vroed, FlevOOware
	this.opera = (window.opera); // Opera 5+
	this.ns4 = (document.layers); // Netscape 4.x
	this.ns6 = (document.getElementById && !document.all && !this.opera); // Netscape 6+
	this.ie = (document.all);  // Internet Explorer 4+
    var sValue = ""; docObj = eval("MM_findObj('" + sDiv + "')"); if (docObj == null) {return 0;}
	if ((sProperty == "left") || (sProperty == "top")) {
		if (!this.ns4) {docObj = docObj.style;} 
		sValue = eval("docObj." + sProperty);
		if ((this.ie) && (sValue == "")) { // IE (on PC) bug with nested layers
			if (sProperty == "top") { sValue = eval(sDiv + ".offsetTop"); } 
			else { sValue = eval(sDiv + ".offsetLeft"); } 
		};
	}
	else {
		if (this.opera) {
			docObj = docObj.style;
			if (sProperty == "height") { sValue = docObj.pixelHeight; } 
			else if (sProperty == "width") { sValue = docObj.pixelWidth; } 
		}
		else if (this.ns4) {sValue = eval("docObj.clip." + sProperty);} 
		else if (this.ns6) {sValue = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(sProperty); } 
	    else if (this.ie) { 
			if (sProperty == "width") { sValue = eval(sDiv + ".offsetWidth"); } 
			else if (sProperty == "height") { sValue = eval(sDiv + ".offsetHeight"); } 
		}
   	}
	sValue = (sValue == "") ? 0 : sValue; 
	if (isNaN(sValue)) { if (sValue.indexOf('px') > 0) { sValue = sValue.substring(0,sValue.indexOf('px')); } } 
	return parseInt(sValue); 
}

function flevPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
	var sD = arguments[0], oD = eval("MM_findObj('" + sD + "')"), iWW, iWH, iSX, iSY, iT = 10, sS = "";
	if (!document.layers) {oD = oD.style;}
	if (oD.tmpTimeout != null) {clearTimeout(oD.tmpTimeout);}
	var sXL = arguments[1], sXC = arguments[2], sXR = arguments[3], sYT = arguments[4], sYC = arguments[5], sYB = arguments[6];
	var iS = (arguments.length > 7) ? parseInt(arguments[7]) : 0, iPx = (arguments.length > 8) ? parseInt(arguments[8]) : 0;
	if (window.innerWidth) { // NS4, NS6 and Opera
		var oW = window; iWW = oW.innerWidth; iWH = oW.innerHeight; iSX = oW.pageXOffset; iSY = oW.pageYOffset; }
	else if (document.documentElement && document.documentElement.clientWidth) { // IE6 in standards compliant mode
		var oDE = document.documentElement; iWW = oDE.clientWidth; iWH = oDE.clientHeight; iSX = oDE.scrollLeft; iSY = oDE.scrollTop; }
	else if (document.body) { // IE4+
		var oDB = document.body; iWW = oDB.clientWidth; iWH = oDB.clientHeight; iSX = oDB.scrollLeft; iSY = oDB.scrollTop; }
	else {return;}
	var iCX = iNX = flevDivPositionValue(sD, 'left'), iCY = iNY = flevDivPositionValue(sD, 'top');
	if (sXL != "") {iNX = iSX + parseInt(sXL);} 
	else if (sXC != "") {iNX = Math.round(iSX + (iWW/2) - (flevDivPositionValue(sD, 'width')/2));}
	else if (sXR != "") {iNX = iSX + iWW - (flevDivPositionValue(sD, 'width') + parseInt(sXR));}
	if (sYT != "") {iNY = iSY + parseInt(sYT);}
	else if (sYC != "") {iNY = Math.round(iSY + (iWH/2) - (flevDivPositionValue(sD, 'height')/2));}
	else if (sYB != "") {iNY = iSY + (iWH - flevDivPositionValue(sD, 'height') - parseInt(sYB));}
	if ((iCX != iNX) || (iCY != iNY)) {
		if (iS > 0) {
			if (iPx > 0) { iT = iS;
				var iPxX = iPx, iPxY = iPx, iMX = Math.abs(iCX - iNX), iMY = Math.abs(iCY - iNY);
				// take care of diagonal movement
				if (iMX < iMY) {iPxY = (iMX != 0) ? ((iMY/iMX)*iPx) : iPx;}
				else {iPxX = (iMY != 0) ? ((iMX/iMY)*iPx) : iPx;}
				if (iPxX >= iMX) {iPxX = Math.min(Math.ceil(iPxX), iPx);}
				if (iPxY >= iMY) {iPxY = Math.min(Math.ceil(iPxY), iPx);}
				// temporary X/Y coordinates
				if ((iCX < iNX) && (iCX + iPxX < iNX)) {iNX = iCX + iPxX;}
				if ((iCX > iNX) && (iCX - iPxX > iNX)) {iNX = iCX - iPxX;}
				if ((iCY < iNY) && (iCY + iPxY < iNY)) {iNY = iCY + iPxY;}
				if ((iCY > iNY) && (iCY - iPxY > iNY)) {iNY = iCY - iPxY;} }
			else { 
				var iMX = ((iNX - iCX) / iS), iMY = ((iNY - iCY) / iS); 
				iMX = (iMX > 0) ? Math.ceil(iMX) : Math.floor(iMX); iNX = iCX + iMX; 
				iMY = (iMY > 0) ? Math.ceil(iMY) : Math.floor(iMY); iNY = iCY + iMY; } }
		if ((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1) && (!window.opera)) {sS="px";}
		if (iMX != 0) {eval("oD.left = '" + iNX + sS + "'");}
		if (iMY != 0) {eval("oD.top = '" + iNY + sS + "'");} }
	var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
	oD.tmpTimeout = setTimeout(sF,10);
}

function flevInitPersistentLayer() { // v3.3, Marja Ribbers-de Vroed, FlevOOware
	if (arguments.length < 8) {return;}
	var sD = arguments[0]; if (sD == "") {return;}
	var	oD = eval("MM_findObj('" + sD + "')"); if (!oD) {return;}
	var iCSS = parseInt(arguments[1]);
	var sXL = arguments[2], sXC = arguments[3], sXR = arguments[4], sYT = arguments[5], sYC = arguments[6], sYB = arguments[7];
	var iS = (arguments.length > 8) ? parseInt(arguments[8]) : 0, iPx = (arguments.length > 9) ? parseInt(arguments[9]) : 0;
	if (iCSS != 0) { if (!document.layers) {oD = oD.style;} sXL = parseInt(oD.left), sYT = parseInt(oD.top);}
	var sF = "flevPersistentLayer('" + sD + "','" + sXL + "','" + sXC + "','" + sXR + "','" + sYT + "','" + sYC + "','" + sYB + "'," + iS + "," + iPx + ")";
	eval(sF);
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
function loginval() 
{
//BEGIN EMAIL VALIDATION
em = document.getElementById('email').value

apos = em.indexOf("@")
dotpos = em.lastIndexOf(".")

if (em.length == 0)
	{
	alert("You forgot to enter your Email Address")
	document.getElementById('email').focus()
	return false
	}

if (em.length < 5)
	{
	alert("Email Address must be at least 5 characters long")
	document.getElementById('email').focus()
	return false
	}
if (apos < 1 || dotpos - apos < 2) 
	{
	alert("Invalid Email address.")
	document.getElementById('email').focus()
	return false
	}
//END EMAIL VALIDATION
//BEGIN PASSWORD VALIDATION
s = document.getElementById('pass').value

if (s.length == 0)
	{
	alert("Invalid Password")
	document.getElementById('pass').focus()
	return false
	}

if (s.length < 3)
	{
	alert("Password must be more than 3 characters")
	document.getElementById('pass').focus()
	return false
	}

for (pos = 0; pos  < s.length ; pos++)
	{
		position = s.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) contained in Password. No symbols, spaces, or special characters please.")
		document.getElementById('pass').focus()
		return false
		}
	}
//END PASSWORD VALIDATION
return true
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
function commval() 
{
com = document.getElementById('comments').value

if (com.length == 0)
	{
	alert("Please enter your message.")
	document.getElementById('comments').focus()
	return false
	}
return true
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
function memval() 
{
//BEGIN FIRST NAME
fn = document.getElementById('first').value

if (fn.length == 0)
	{
	alert("You forgot to enter your First Name")
	document.getElementById('first').focus()
	return false
	}

if (fn.length < 1)
	{
	alert("Your first name has to be longer than that")
	document.getElementById('first').focus()
	return false
	}
for (pos = 0; pos  < fn.length ; pos++)
	{
		position = fn.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z")))
		{
		alert ("Invalid character(s) in your First Name. No symbols, numbers, or special characters please.")
		document.getElementById('first').focus()
		return false
		}
	}
//END FIRST NAME
//BEGIN LAST NAME
ln = document.getElementById('last').value

if (ln.length == 0)
	{
	alert("You forgot to enter your Last Name")
	document.getElementById('last').focus()
	return false
	}

if (ln.length < 1)
	{
	alert("Your last name has to be longer than that")
	document.getElementById('last').last.focus()
	return false
	}
for (pos = 0; pos  < ln.length ; pos++)
	{
		position = ln.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "-")))
		{
		alert ("Invalid character(s) in your Last Name. No symbols, numbers, or special characters please. Hyphens and spaces are permitted.")
		document.getElementById('last').focus()
		return false
		}
	}
//END LAST NAME
//BEGIN STREET
st = document.getElementById('address1').value

if (st.length == 0)
	{
	alert("You forgot to enter your Street Address.")
	document.getElementById('address1').focus()
	return false
	}

if (st.length < 3)
	{
	alert("Street must be more than 1 character.")
	document.getElementById('address1').focus()
	return false
	}

for (pos = 0; pos  < st.length ; pos++)
	{
		position = st.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == ".") || (position == "_") || (position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) in Street Name. No symbols or special characters please.")
		document.getElementById('address1').focus()
		return false
		}
	}
//END STREET
//BEGIN CITY
sc = document.getElementById('city').value

if (sc.length == 0)
	{
	alert("You forgot to enter your City.")
	document.getElementById('city').focus()
	return false
	}

if (sc.length < 3)
	{
	alert("City must be more than 3 letters. No abbreviations please.")
	document.getElementById('city').focus()
	return false
	}

for (pos = 0; pos  < sc.length ; pos++)
	{
		position = sc.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "_")))
		{
		alert ("Invalid character(s) in City name. No symbols, numbers, or special characters please.")
		document.getElementById('city').focus()
		return false
		}
	}
//END CITY
//BEGIN COUNTRY
cnt = document.getElementById('country').value

if (cnt.length == 0)
	{
	alert("You forgot to enter your Country.")
	document.getElementById('country').focus()
	return false
	}

if (cnt.length < 1)
	{
	alert("Country must be more than 1 character.")
	document.getElementById('country').focus()
	return false
	}

for (pos = 0; pos  < cnt.length ; pos++)
	{
		position = cnt.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "_")))
		{
		alert ("Invalid character(s) in Country name. No symbols or special characters please.")
		document.getElementById('country').focus()
		return false
		}
	}
//END COUNTRY
//BEGIN POSTAL CODE or ZIP
pz = document.getElementById('postzip').value

if (pz.length == 0)
	{
	alert("You forgot to enter your Zip or Postal code.")
	document.getElementById('postzip').focus()
	return false
	}

if (pz.length < 5)
	{
	alert("Zip code must be 5 numbers. Postal code must 6 alphanumeric characters.")
	document.getElementById('postzip').focus()
	return false
	}
if (pz.length > 7)
	{
	alert("Too many characters. Try Again. Remember no spaces.")
	document.getElementById('postzip').focus()
	return false
	}

for (pos = 0; pos  < pz.length ; pos++)
	{
		position = pz.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) in Postal or Zip code. No symbols or special characters please.")
		document.getElementById('postzip').focus()
		return false
		}
	}
//END POSTAL CODE or ZIP
//BEGIN EMAIL
e = document.getElementById('email').value

apos = e.indexOf("@")
dotpos = e.lastIndexOf(".")

if (e.length == 0)
	{
	alert("You forgot to enter your Email Address.")
	document.getElementById('email').focus()
	return false
	}
if (e.length < 5)
	{
	alert("Email Address must be at least 5 characters long")
	document.getElementById('email').focus()
	return false
	}
if (apos < 1 || dotpos - apos < 2) 
	{
	alert("That's an nvalid Email address.")
	document.getElementById('email').focus()
	return false
	}
//END EMAIL
//BEGIN AREA
are = document.getElementById('area1').value

if (are.length == 0)
	{
	alert("You forgot to enter your Home Phone Number's Area Code.")
	document.getElementById('area1').focus()
	return false
	}
for (pos = 0; pos  < are.length ; pos++)
	{
		position = are.charAt(pos)

		if (!((position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) in Area Code. No symbols, spaces or special characters please.")
		document.getElementById('area1').focus()
		return false
		}
	}
//END AREA
//BEGIN PHONE
ph = document.getElementById('phone1').value

if (ph.length == 0)
	{
	alert("You forgot to enter your Home Phone Number.")
	document.getElementById('phone1').focus()
	return false
	}

if (ph.length < 7)
	{
	alert("7 numbers please.")
	document.getElementById('phone1').focus()
	return false
	}
for (pos = 0; pos  < ph.length ; pos++)
	{
		position = ph.charAt(pos)

		if (!((position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) in Home Phone Number. No symbols, spaces or special characters please.")
		document.getElementById('phone1').focus()
		return false
		}
	}
//END PHONE
return true
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
function guestval() 
{
//BEGIN FIRST NAME
fn = document.getElementById('first').value

if (fn.length == 0)
	{
	alert("You forgot to enter your First Name")
	document.getElementById('first').focus()
	return false
	}

if (fn.length < 1)
	{
	alert("Your first name has to be longer than that")
	document.getElementById('first').focus()
	return false
	}
for (pos = 0; pos  < fn.length ; pos++)
	{
		position = fn.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z")))
		{
		alert ("Invalid character(s) in your First Name. No symbols, numbers, or special characters please.")
		document.getElementById('first').focus()
		return false
		}
	}
//END FIRST NAME
//BEGIN LAST NAME
ln = document.getElementById('last').value

if (ln.length == 0)
	{
	alert("You forgot to enter your Last Name")
	document.getElementById('last').focus()
	return false
	}

if (ln.length < 1)
	{
	alert("Your last name has to be longer than that")
	document.getElementById('last').last.focus()
	return false
	}
for (pos = 0; pos  < ln.length ; pos++)
	{
		position = ln.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "-")))
		{
		alert ("Invalid character(s) in your Last Name. No symbols, numbers, or special characters please. Hyphens and spaces are permitted.")
		document.getElementById('last').focus()
		return false
		}
	}
//END LAST NAME
//BEGIN STREET
st = document.getElementById('address1').value

if (st.length == 0)
	{
	alert("You forgot to enter your Street Address.")
	document.getElementById('address1').focus()
	return false
	}

if (st.length < 3)
	{
	alert("Street must be more than 1 character.")
	document.getElementById('address1').focus()
	return false
	}
//END STREET
//BEGIN CITY
sc = document.getElementById('city').value

if (sc.length == 0)
	{
	alert("You forgot to enter your City.")
	document.getElementById('city').focus()
	return false
	}

if (sc.length < 3)
	{
	alert("City must be more than 3 letters. No abbreviations please.")
	document.getElementById('city').focus()
	return false
	}

for (pos = 0; pos  < sc.length ; pos++)
	{
		position = sc.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "_")))
		{
		alert ("Invalid character(s) in City name. No symbols, numbers, or special characters please.")
		document.getElementById('city').focus()
		return false
		}
	}
//END CITY
//BEGIN COUNTRY
cnt = document.getElementById('country').value

if (cnt.length == 0)
	{
	alert("You forgot to enter your Country.")
	document.getElementById('country').focus()
	return false
	}

if (cnt.length < 1)
	{
	alert("Country must be more than 1 character.")
	document.getElementById('country').focus()
	return false
	}

for (pos = 0; pos  < cnt.length ; pos++)
	{
		position = cnt.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position == " ") || (position == "_")))
		{
		alert ("Invalid character(s) in Country name. No symbols or special characters please.")
		document.getElementById('country').focus()
		return false
		}
	}
//END COUNTRY
//BEGIN POSTAL CODE or ZIP
pz = document.getElementById('postzip').value

if (pz.length == 0)
	{
	alert("You forgot to enter your Zip or Postal code.")
	document.getElementById('postzip').focus()
	return false
	}

if (pz.length < 5)
	{
	alert("Zip code must be 5 numbers. Postal code must 6 alphanumeric characters.")
	document.getElementById('postzip').focus()
	return false
	}
if (pz.length > 7)
	{
	alert("Too many characters. Try Again. Remember no spaces.")
	document.getElementById('postzip').focus()
	return false
	}

for (pos = 0; pos  < pz.length ; pos++)
	{
		position = pz.charAt(pos)

		if (!((position >= "A" && position <= "Z") || (position >= "a" && position <= "z") || (position >= "0" && position <= "9")))
		{
		alert ("Invalid character(s) in Postal or Zip code. No symbols, spaces or special characters please.")
		document.getElementById('postzip').focus()
		return false
		}
	}
//END POSTAL CODE or ZIP
//BEGIN EMAIL
e = document.getElementById('email').value

apos = e.indexOf("@")
dotpos = e.lastIndexOf(".")

if (e.length == 0)
	{
	alert("You forgot to enter your Email Address.")
	document.getElementById('email').focus()
	return false
	}
if (e.length < 5)
	{
	alert("Email Address must be at least 5 characters long")
	document.getElementById('email').focus()
	return false
	}
if (apos < 1 || dotpos - apos < 2) 
	{
	alert("That's an nvalid Email address.")
	document.getElementById('email').focus()
	return false
	}
//END EMAIL
return true
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
 function clearMe(formfield){
  if (formfield.defaultValue==formfield.value)
   formfield.value = ""
 }
//--------------------------------------------------------------------------------------------------------------------------------------------------------
function lostpassval() 
{
//BEGIN EMAIL
e = document.getElementById('email').value

apos = e.indexOf("@")
dotpos = e.lastIndexOf(".")

if (e.length == 0)
	{
	alert("You forgot to enter your Email Address.")
	document.getElementById('email').focus()
	return false
	}
if (e.length < 5)
	{
	alert("Email Address must be at least 5 characters long")
	document.getElementById('email').focus()
	return false
	}
if (apos < 1 || dotpos - apos < 2) 
	{
	alert("That's an nvalid Email address.")
	document.getElementById('email').focus()
	return false
	}
//END EMAIL
return true
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
var isSelected = false;

function copySelection(workArea){

workArea.workText = document.selection.createRange();
isSelected = true;
}

function wrapInTags(workArea,isTag){

if (isSelected)
{
workArea.workText.text = "["+isTag+"]"+workArea.workText.text+"[/"+isTag+"]";
if (workArea.workText.text==''){isSelected=false;workArea.focus()}
}
}

function validate(workArea){

if (workArea.value == ""){alert('The text area is empty');return false}
nBrackets = workArea.value.match(/\[/g);
if (nBrackets != null && nBrackets.length >=1){return true}
alert('Format some text');
return false;
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Cyanide_7 |  */
var isNN = (navigator.appName.indexOf("Netscape")!=-1);

function autoTab(input,len, e) {
  var keyCode = (isNN) ? e.which : e.keyCode; 
  var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
  if(input.value.length >= len && !containsElement(filter,keyCode)) {
    input.value = input.value.slice(0, len);
    input.form[(getIndex(input)+1) % input.form.length].focus();
  }

  function containsElement(arr, ele) {
    var found = false, index = 0;
    while(!found && index < arr.length)
    if(arr[index] == ele)
    found = true;
    else
    index++;
    return found;
  }

  function getIndex(input) {
    var index = -1, i = 0, found = false;
    while (i < input.form.length && index == -1)
    if (input.form[i] == input)index = i;
    else i++;
    return index;
  }
  return true;
}
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------------------------------
