<!--//
function checkEmail(myField) {
        if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myField)){
        return (true)
        }
return (false)
}

/*	RTrim - Trims whitespace from right of a string*/

function RTrim(str)
{	
        var whitespace = new String(" \t\n\r");	
        var s = new String(str);	
        if (whitespace.indexOf(s.charAt(s.length-1)) != -1) 	
            {		
                var i = s.length - 1;   // Get length of string		
                while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)		
                i--;		
                s = s.substring(0, i+1);	
            }	
        return s;
}

function hasChecked(collection)  {    var elm, k=0;    while(elm=collection[k++])      if(elm.checked)       return true;     return false;  }


// ------------------------------------------------------------------
// isDate ( date_string, format_string )
// Returns true if date string matches format of format string and
// is a valid date. Else returns false.
// It is recommended that you trim whitespace around the value before
// passing it to this function, as whitespace is NOT ignored!
// ------------------------------------------------------------------
function checkEmail(myField) {
        if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myField)){
        return (true)
        }
return (false)
}

// GET_RADIO_VALUE( radiogrp )
// Takes the radio group object
// Returns the value of the checked radio button in a group
function Get_Radio_Value( radiogrp ){
	var count;	// Loop counter
	// Loop through each radio button in group
	for( count = 0; count < radiogrp.length; count++ ){
		// If the button is checked return the value of the checked button
		if( radiogrp[count].checked == true ){
			return radiogrp[count].value;
		}
	}
	// If none of the radio buttons are checked return false
	return false;
}
// END OF FUNCTION

     
//-->