	// -------------------------------------------------------------------
	//																IsFormComplete
	// -------------------------------------------------------------------
		function IsFormComplete(FormName)
			{
			/*
	     if (document.forms[FormName].elements[1].value == '')
			 		{
						alert('Please enter a County name and click Show Fee again.');
						document.forms[FormName].elements[1].focus();
						return false;
					}
					
					*/
	     if (document.forms[FormName].elements[2].value == '')
			 		{
						alert('Please enter a CPT code and click Show Fee again.');
						document.forms[FormName].elements[2].focus();
						return false ;
					}
				var n= new String( document.forms[FormName].elements[2].value )

				// verify cpt code length is 5 chars
			//alert("made it");
			 if ( n.length < 5 ) 					
					{
						alert('Please enter a 5 character code and click Show Fee again.');
						document.forms[FormName].elements[2].focus();
						return false ;
					}				
	     if (document.forms[FormName].elements[4].value == '')
			 		{
						alert('Please enter a fee value for comparison and click Show Fee again.');
						document.forms[FormName].elements[4].focus();
						return false;
					}			
			return true;
			}

	// -------------------------------------------------------------------
	//																submitpage
	// -------------------------------------------------------------------
	function submitpage()
	{
		if ( IsFormComplete("FeeSched")==false )
			{
				return false;
				//document.forms[0].submit();
			}
		else
			return true;
	}

	// -------------------------------------------------------------------
	//																isempty
	// -------------------------------------------------------------------

	function isEmpty( COMP2 )
	{ 
		cField = new Object;
		cField = COMP2
		if (cField.value == "" ) 
		{
			alert("Please enter a CPT code.");
			cField.focus();
		}
	}

	// -------------------------------------------------------------------
	//																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 fee for comparison");
						curObj.focus();
						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[2].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


	}
	// -------------------------------------------------------------------
	//																End JavaScript
	// -------------------------------------------------------------------
