
String.prototype.Trim  = function(){return this.replace(/(^\s*)|(\s*$)/g, "");}

function isnum(String) 
{ 
	var Letters = "1234567890"; 
	var i; 
	var c; 
	for( i = 0; i < String.length; i ++ ) 
	{ 
		c = String.charAt( i ); 
		if (Letters.indexOf( c ) ==-1) 
		{ 
			return false; 
		} 
	}
	return true;
}

function isemail(str)
{
	if(/[0-9a-zA-Z_\-\.]+@[a-zA-Z0-9\-]+\.([a-zA-Z0-9\-]+\.?)+/.test(str)==false)
	{
		return false;
	}
	return true;
}


function chkall(input1,input2)
{
    var objForm = document.forms[input1];
    var objLen = objForm.length;
    for (var iCount = 0; iCount < objLen; iCount++)
    {
        if (input2.checked == true)
        {
            if (objForm.elements[iCount].type == "checkbox")
            {
                objForm.elements[iCount].checked = true;
            }
        }
        else
        {
            if (objForm.elements[iCount].type == "checkbox")
            {
                objForm.elements[iCount].checked = false;
            }
        }
    }
}