function isdecimal(string)
 {
    //if (!string) return false;
    var Chars = "0123456789";

    for (var i = 0; i < string.length; i++) 
	{
       if (Chars.indexOf(string.charAt(i)) == -1)
	   {
          return false;
		 }
    }
    return true;
}

function isNumber(string)
 {
    //if (!string) return false;
    var Chars = "0123456789.";

    for (var i = 0; i < string.length; i++) 
	{
       if (Chars.indexOf(string.charAt(i)) == -1)
	   {
          return false;
		 }
    }
    return true;
}

function checkemail(em)
 {
	if(em == '' || em.indexOf('@',0) == -1) return(true);
	if(em.length < 4 || em.indexOf('.',0) == -1) return(true);
	n=em.indexOf('.')
	if(em.length <= n+1) return(true);
}

function checkdel() 
{ 
	if(confirm ("Are your sure to delete?"))
	{
		return true;
	}
	else
	{
		return false;
	}
}

 function disableForm(theform) 
	{
		if (document.all || document.getElementById) 
		{
			for (i = 0; i < theform.length; i++) 
			{
				var tempobj = theform.elements[i];
				if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset")
				tempobj.disabled = true;
			}
			return true;
		}
		else 
		{
			return false;
		}
	}

	function ToggleMenu(itemID)
	{
		itmID = eval(itemID);

		if (itmID.style.display == 'none') 
		{
			/* show sub menu */
			itmID.style.display = 'block';
		} 
		else 
		{
			/* hide sub menu */
			itmID.style.display = 'none';
		}
	}
