<!--

function validateListForm(theForm)
{

	var strMsg = "";

  if (theForm.name.value == "")
  {
    strMsg = "The \"Name\" field.\n";
    //theForm.contact_name.focus();
    //return (false);
  }

  //if (theForm.username.value.length > 10)
  //{
  //  alert("Please enter at most 10 characters in the \"User Name\" field.");
  //  theForm.username.focus();
  //  return (false);
  //}

    
  if (theForm.address.value == "")
  {
    strMsg += "The \"Address\" field.\n";
    //theForm.address.focus();
    //return (false);
  }
  
  if (theForm.city.value == "")
  {
    strMsg += "The \"City\" field.\n";
    //theForm.city.focus();
    //return (false);
  }
  
  if (theForm.state.value == "")
  {
    strMsg += "The \"State\" field.\n";
    //theForm.state.focus();
    //return (false);
  }
  
  if (theForm.zip.value == "")
  {
    strMsg += "The \"Zip\" field.\n";
    //theForm.zip.focus();
    //return (false);
  }
  
  if (theForm.phone.value == "")
  {
    strMsg += "The \"Phone\" field.\n";
    //theForm.phone.focus();
    //return (false);
  }
  else{
		if (theForm.phone.value.length < 12)
		{
		  strMsg += "A valid phone number including area code.\n";
		  //theForm.phone.focus();
		  //return (false);
		}
	}
	
	if (strMsg != ""){
		strMsg = "Please enter values in these required fields.\n\n" + strMsg 
		alert(strMsg);
		theForm.name.focus();
		return (false);
	}

  
  return (true);
}
//=========================================================
 
 function trim_string(strValue) {
     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 FormData(){
	var AllData;	
	this.max = -1;
	//Properties
	this.value = function(index){
		return this.AllData[index][0];
	}
	this.name = function(index){
		return this.AllData[index][1];
	}
	this.minimum = function(index){
		return this.AllData[index][2];
	}
	this.maximum = function(index){
		return this.AllData[index][3];
	}
	this.datatype = function(index){
		return this.AllData[index][4];
	}		
	this.count = function(){
		return this.max;
	}
	// Methods
	this.add = function(strval,strname,intmin,intmax,type){
		this.max++
		var index = this.max;
		if (index == 0){
			this.AllData = new Array();
		}
		this.AllData[index] = new Array(trim_string(strval + ""),strname,intmin,intmax,type);
		return this.AllData[index][1];
	}
	this.validate = function(index){
		var varvalue = this.AllData[index][0];
		var name = this.AllData[index][1];
		var min = this.AllData[index][2]; 
		var max = this.AllData[index][3];		
		var type = this.AllData[index][4];
		var strRet = "";	
		// now test for data type
		if (max > 0){
			if (min  > 0){
				if (varvalue.length < min || varvalue.length > max){
					strRet = "The "+name+" information is invalid because the "+name+" must be ";
					strRet += "between "+min+" and "+max+" characters or numbers long.\n";
				}
			}
			else{
				if (varvalue.length > max){
					strRet = "The "+name+" information is invalid because the "+name+" must be ";
					strRet += "less than "+max+" characters or numbers long.\n";
				}
			}
		}
		// now test for data type
	
		switch (type){
		   case INT_TYPE:
				//test for integer data type
				if (isNan(parseInt(varvalue))) {
				  strRet += "The "+name+" information is invalid because the "+name+" must be a number.\n";
				}
				else{
					varvalue = parseInt(varvalue);
				}
				break;
		   case FLOAT_TYPE:
				//test for float data type
				if (isNan(parseFloat(varvalue))) {
				  strRet += "The "+name+" information is invalid because the "+name+" must be a number.\n";
				}
				else{
					varvalue = parseFloat(varvalue);
				}
				break;
		   case DATE_TYPE:
				//test for date data type
				// for now do nothing
		}
		this.AllData[index][0] = varvalue;
		
		return strRet;
		
  }
	
}

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 P7_VScroller(el,dr,ty,oy,spd) { //v1.7 by PVII
 var g,gg,fr,sp,pa='',slw=true,m=false,h,ly;ty=parseInt(ty);
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;}else{return;}
 if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1)&& !window.opera){pa="px";}
 if(navigator.userAgent.indexOf("NT")>-1 || navigator.userAgent.indexOf("Windows 2000")>-1){slw=false;}
 if(spd=="Slow"){sp=(slw)?2:1;fr=(slw)?40:30;}else if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10;
 }else{sp=(slw)?8:4;fr=(slw)?40:10;}if(spd=="Warp"){sp=5000;}var yy=parseInt(gg.top);if(isNaN(yy)){
 if(g.currentStyle){yy=parseInt(g.currentStyle.top);}else if(document.defaultView&&document.defaultView.getComputedStyle){
 yy=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}else{yy=0;}}
 if(document.all || document.getElementById){h=parseInt(g.offsetHeight);
 if(!h){h=parseInt(g.style.pixelHeight);}
 }else if(document.layers){h=parseInt(g.clip.height);}ly=ty+parseInt(oy)-h;
 if(dr=="Down"){if(yy>ly){m=true;yy-=sp;if(yy<ly){yy=ly;}}}
 if(dr=="Up"){if(yy<ty){m=true;yy+=sp;if(yy>ty){yy=ty;}}}
 if(dr=="Reset"){gg.top=ty+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if(m){gg.top=yy+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=true;
  eval("g.p7Magic=setTimeout(\"P7_VScroller('"+el+"','"+dr+"',"+ty+","+oy+",'"+spd+"')\","+fr+")");
 }else{g.toMove=false;}
}
// -->