	// -------------------------------------------------------------------
	//							IsFormComplete
	// -------------------------------------------------------------------
		function IsFormComplete(FormName)			{
    		var argvalue = new Object;
    		argvalue =  document.forms[FormName].elements[1].value;
    		argvalue.toString();
    
       if (argvalue.length != 5) {
						document.forms[FormName].elements[1].focus();
						alert('Please enter a 5-digit zipcode and click Next again.');
						return false;		   
		   }
	     if (document.forms[FormName].elements[1].value == '')
			 		{
						alert('Please enter a zipcode and click Next again.');
						document.forms[FormName].elements[1].focus();
						return false;
					}

      if ( !checkcounty(document.forms[0].ZIPCODE)) {
						document.forms[FormName].elements[1].focus();
						return false;
		  }		  
				// verify cpt code length is 5 chars

			return true;
			}
	// -------------------------------------------------------------------
	//							submit_form_udata
	// -------------------------------------------------------------------
	function submit_form_udata()
	{		
			var popurl="wait.html";
			 // winpops=window.open(popurl,"","width=300,height=200,")

	 		 document.forms[0].submit();
	 		 return true;
	}
			
	// -------------------------------------------------------------------
	//							submitpage
	// -------------------------------------------------------------------
	function submitpage()
	{

		if ( IsFormComplete("feemain")==false )
			{
				return false;				
			}
		else
			{
			document.forms[0].submit();
			return true;
			}
	
	return true;
	}

	// -------------------------------------------------------------------
	//							isempty
	// -------------------------------------------------------------------

	function isEmpty( COMP2 )
	{ 
		cField = new Object;
		cField = COMP2
		if (cField.value == "" ) 
		{
			alert("Please enter a CPT code.");
			cField.focus();
		}
	}
	// -------------------------------------------------------------------
	//							checkqty
	// -------------------------------------------------------------------
	function checkqty(curObj) 
	{
	 	if ( isNum(curObj) == true )			 
			 	{
				  x = parseInt(curObj.value);
				  if (( x >= 1 ) && ( x <= 500 ))
				  	 { 
					   curObj.value = parseInt(curObj.value);		  		  	 
				  	   return true;
					 }
					else
					{	
						alert("Please enter a value between 1 and 500.");
						curObj.value = 25.
						curObj.select();
						curObj.focus();
					 	return false;
					 }				 
				}
		else
				return false;	
	}	
	// -------------------------------------------------------------------
	//							checkcounty
	// -------------------------------------------------------------------
	function checkcounty(curObj) 
	{ 	  
		if (curObj.value == "" ) {
			alert("Please enter the 5-digit zipcode where your practice.");
			curObj.focus();
			return false;
		}
		if (isNum(curObj)) {
		   
		}
		
		return true;
	}

	// -------------------------------------------------------------------
	//							isNum
	// -------------------------------------------------------------------
	function isNum(curObj) 
	{
		var argvalue = new Object;
		argvalue = curObj.value;
		argvalue.toString();

		if (argvalue.length == 0)
			{ curObj.value=0;
				return false;
			}	
		decimalcount = 0
	
		for (var n = 0; n < argvalue.length; n++)
		{
			if (argvalue.substring(n, n+1) < "0" || argvalue.substring(n, n+1) > "9" )		{
    			if (argvalue.substring(n, n+1) == "." && ++decimalcount < 2 ) 
    					{ }
    					else
    					{	
    						alert("Please enter a valid number.");
    						curObj.select();
    						curObj.focus();
    						curObj.value=0;
    						return false;
    						}
    			}
		   }
		return true;
	}

	// -------------------------------------------------------------------
	//																setState
	// -------------------------------------------------------------------
	function setState()
	{
		var loc = window.location.href;
		var nlen = loc.length;
		var st;

		var place = loc.search("&stabv=");
		document.forms[0].elements[0].focus();
		if ( place > 0 )
		{	
			st = loc.substring( place+7, place+9);
			oplen = document.forms[0].elements[0].length;

			for ( var n=0; n<oplen; n++ )
				{
					v=document.forms[0].elements[0].options[n].text;
					if (  v == st )
						{
							var found=n;
							document.forms[0].elements[0].options[n].selected=true;
						}
				}
		}
	}
	// -------------------------------------------------------------------
	//																setModifier
	// -------------------------------------------------------------------
	function setModifier()
	{
		var loc = window.location.href;
		var nlen = loc.length;
		var st;

		var place = loc.search("&modifier=");
		if ( place > 0 )
		{	
			st = loc.substring( place+10, place+12);
			if ( st == "BL")
					document.forms[0].elements[3].options[0].selected=true;
			if ( st == "26" )
					document.forms[0].elements[3].options[1].selected=true;
			if ( st == "53" )
					document.forms[0].elements[3].options[2].selected=true;
			if ( st == "TC" )
					document.forms[0].elements[3].options[3].selected=true;
			if ( st == "NF" )
				{
					document.forms[0].elements[3].options[0].selected=true;
					alert("The Modifier was not found for this CPT Code.  Blank was used.");
				}

		}
	}

	//-------------------------------------------------------------------
	//																chkCPT
	//-------------------------------------------------------------------
	function chkCPT()
	{
		var loc = window.location.href;
		var	cp;
		var place = loc.search("&cptcode=");
		if ( place > 0 )
		{	
			cp = loc.substring( place+9, place+14);
			if ( cp == "INVAL" )
				{
					alert("The CPTCode was not found.  Please enter another code.");
					document.forms[0].elements[2].select();
					document.forms[0].elements[2].focus();
				}	
		}
	}
	// -------------------------------------------------------------------
	//																pagload
	// -------------------------------------------------------------------

	function pageload()
	{
		setState();			// 	focus on state selection box
		//setModifier();	//	update modifier code with user selected choice
		//chkCPT();				// 	verify cptcode wasn't invalid
	}


    function changeme(X,Y)
    		{
    			 X.className='feelistmlon';
    			 //Z = eval( 'L' + Y );
    			 //Z.className="navlefto"; 
    		}
    
    	function changemeback(X,Y)
    		{		
      			 X.className='feelistmloff';
    			 //Z = eval( 'L' + Y );
    			 //Z.className="navleft";
    		}
    
    	function navgo(theURL)
     	{    			    			
        	//top.location.href= theURL;
    		window.location.href(theURL);    		
      	}
    

	
	// -------------------------------------------------------------------
	//																End JavaScript
	// -------------------------------------------------------------------

