//setupMainSearch.js
//                    set dynamic properties for Internet Initial Claims  Self Application

function setupFields() {
	var o;
	
	document.frmMain.xvalidate = validateFields;
		
	with (document.frmMain) {

        if (typeof(drpCounty1) == "object") {
            o = drpCounty1;
			
			o.xoptional = true;
           	o.xmin = 1;
            o.xmax = 4;
            o.maxLength = 100;
            o.tabindex = 5;
			
			o.xvalidate = isListNum;
           	o.xerror = showError;
           	o.xerrmsg = "Invalid county selected (1st list box), please try again.";
			
// 			o.onfocus = showPopup;
			o.xpopup = "<div class=\"subheading\">County</div>\
						<div class=\"bodylarger\">Select a county that you wish to seek employment in.</div>";
            
        }
        
         if (typeof(drpCounty2) == "object") {
            o = drpCounty2;
			
			o.xoptional = true;
           	o.xmin = 1;
            o.xmax = 4;
            o.maxLength = 100;
            o.tabindex = 6;
			
			o.xvalidate = isListNum;
           	o.xerror = showError;
           	o.xerrmsg = "Invalid county selected (2nd list box), please try again.";
			
// 			o.onfocus = showPopup;
			o.xpopup = "<div class=\"subheading\">County</div>\
						<div class=\"bodylarger\">Select a county that you wish to seek employment in.</div>";
            
        }
        
         if (typeof(drpCounty3) == "object") {
            o = drpCounty3;
			
			o.xoptional = true;
           	o.xmin = 1;
            o.xmax = 4;
            o.maxLength = 100;
            o.tabindex = 7;
			
			o.xvalidate = isListNum;
           	o.xerror = showError;
           	o.xerrmsg = "Invalid county selected (3rd list box), please try again.";
			
// 			o.onfocus = showPopup;
			o.xpopup = "<div class=\"subheading\">County</div>\
						<div class=\"bodylarger\">Select a county that you wish to seek employment in.</div>";
            
        }
        
        if (typeof(txtZipCode) == "object") {
            o = txtZipCode;
			
			o.xoptional = true;
            o.xmin = 5;
            o.xmax = 5;
            o.maxLength = 5;
            o.tabindex = 8;
            
			o.xvalidate = isNumStr;
            o.xerror = showError;
            o.xerrmsg = "Zip Code when entered must be 5 numbers.";

// 			o.onfocus = showPopup;
			o.xpopup = "<div class=\"subheading\">Zip Code</div>\
						<div class=\"bodylarger\">Zip code is optional to identify the zip code where you would like to look for a job.</div>";

			o.onkeypress = editNumStr;
        }
        
		if (typeof(txtSelectedJobOrderNumber) == "object") {
            o = txtSelectedJobOrderNumber;
			
			o.xoptional = true;
            o.xmin = 9;
            o.xmax = 9;
            o.maxLength = 9;
            o.tabindex = 10;
            
			o.xvalidate = isString;
            o.xerror = showError;
            o.xerrmsg = "Job Order Number Invalid - please enter the Job Order number in the format of NC0000000.";

//			o.onfocus = showPopup;
			o.xpopup = "<div class=\"subheading\">Job Order Number</div>\
						<div class=\"bodylarger\">Enter the Job Order number.</div>";
						
			o.onkeypress = editMultiStr;				
		
        }


 	}
 	return;
}
