<!--
var preloadFlag = false,INT_TYPE = 0,FLOAT_TYPE = 1,DATE_TYPE  = 2,STR_TYPE = 3;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		//alert('change for '+changeImages.arguments[i]);
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function preloadImages() {
	if (document.images) {
		navhome_over = newImage("images/navhome-over.gif");
		navcompany_over = newImage("images/navcompany-over.gif");
		navshop_over = newImage("images/navshop-over.gif");
		navcustsrv_over = newImage("images/navcustsrv-over.gif");
		navcontus_over = newImage("images/navcontus-over.gif");
		proposals_over = newImage("images/proposals-over.gif");
		products_over = newImage("images/products-over.gif");
		design_over = newImage("images/design-over.gif");
		graphics_over = newImage("images/graphics-over.gif");
		man_over = newImage("images/man-over.gif");
		market_over = newImage("images/market-over.gif");
		services_over = newImage("images/services-over.gif");
		employment_over = newImage("images/employment-over.gif");
		preloadFlag = 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;
		
  }
	
	
	
	
	
}
// -->
