<!--
function isRIF(rifval) {
var USStateCodes = "AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY|MW"
var rifno = rifval;
firstTwo = (rifno.substring(0,2)).toUpperCase();
threeToSix = (rifno.substring(2,5)).toUpperCase();
//lastOne = (rifno.substring(5,6)).toUpperCase();
//firstOne = (rifno.substring(0,1)).toUpperCase();
//twoToFour = (rifno.substring(1,4)).toUpperCase();
//lastTwo = (rifno.substring(4,6)).toUpperCase();
//alert(rifno.length);

if (rifno.length == 6)
{		if (USStateCodes.indexOf(firstTwo) != -1 && isInteger(threeToSix))
			{
		//		alert('This is a valid Contract Number\nof pattern AZ740C or MW001W');
				return true;
			}
		//else if((isLetter(firstOne) || firstOne == '*' || lastOne == "#" || lastOne == "$") && isInteger(twoToFour) && USStateCodes.indexOf(lastTwo) != -1)
			//{
		//		alert('This is a valid Contract Number\nof pattern A032NH');
				//return true;
			//}
		else
			{
		//		alert('This is NOT a valid Contract Number');
				return false;
			}
		//alert(firstTwo+"-"+threeToFive+"-"+lastOne+"\n"+firstOne+"-"+twoToFour+"-"+lastTwo);
	}
else
{return false;}
}

function isLetter (c)
{   
   return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) )
}

function isDigit (c)
{   
   return ((c >= "0") && (c <= "9"))
}

function isInteger (s)

{   var i;

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if (!isDigit(c)) return false;
    }

    // All characters are numbers.
    return true;
}

function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
   return true;

// decimal point jump
/*else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }*/
else
   return false;
}

//-->