	function isNull(obj, msg)
	{
		if(obj.value.replace(/^\s+|\s+$/g,"") == "")
		{
			alert(msg);
			obj.focus();
			return false;
		}
		else
		{
			return true;
		}
	}
	
	function IsValidFile(strVal, filetype)
	{
	
		var arrName = strVal.split("/");
		if(arrName.length < 1)
		{
			
			alert("Please Select Valid File...");
			return false;
		}
		else
		{
			var arrExt = arrName[arrName.length -1].split(".");
			
			if(arrExt.length < 2)
			{
				alert("Please Select Valid File...");
				return false;
			}
			else
			{
				var strExt = arrExt[arrExt.length -1].toLowerCase();
				
				if(filetype == "image")
				{
					
					if(strExt == "jpg" || strExt == "jpeg" || strExt == "png" || strExt == "gif")
					{
						return true;
					}
					else
					{
						alert("Please Select Valid Image...");
						return false;
					}
				}
				else if(filetype == "audio")
				{
					if(strExt == "mp3" || strExt == "wav" || strExt == "rm" || strExt == "wma")
					{
						return true;
					}
					else
					{
						alert("Please Select Valid Audio...");
						return false;
					}
				}
				else if(filetype == "video")
				{
					if(strExt == "dat" || strExt == "mpeg" || strExt == "mpg" || strExt == "avi" || strExt == "wmv")
					{
						return true;
					}
					else
					{
						alert("Please Select Valid Video...");
						return false;
					}
				}
			}
		}
	}
	
	function isdigit(keyCode)
	{		
		if(keyCode == 35)return true;
		if(keyCode == 36)return true;
		if(keyCode == 37)return true;
		if(keyCode == 39) return true; 
		if(keyCode == 46) return true; 
		if(keyCode == 109) return false; 
		if(keyCode == 110) return false; 
		if(keyCode == 189) return false; 
		if(keyCode == 9) return true; 
		if(keyCode == 8) return true;
		if(keyCode > 95 && keyCode < 106) return true; 
		if(keyCode < 48 || keyCode > 57) return false;	
	}
	function IsEmail(string, obj, msgstr)
	{
		if(string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
			return true;
		else
		{
			alert(msgstr);
			obj.focus();
			return false;
		}
	}
	function validateRequired(eleid,msgid)
	{
		if(document.getElementById(eleid).value.replace(/^\s+|\s+$/g,"") == "")
		{
			document.getElementById(msgid).innerHTML = "Required";
			return false;
		}
		else
		{
			document.getElementById(msgid).innerHTML = "";
			return true;
		}
	}
	function validRequired(eleid)
	{
		if(document.getElementById(eleid).value.replace(/^\s+|\s+$/g,"") == "")
		{
			alert ("Please! Make sure all fields are properly completed...\n\nValidation are marked in red color!");
			document.getElementById(eleid).focus();
			return false;
		}
		return true;
	}
	function IsNumeric(strString)
	{
		var strValidChars = "0123456789";
		var strChar;
		var blnResult = true;
		
		if (strString.length == 0) return true;
		
		//  test strString consists of valid characters listed above
		for (i = 0; i < strString.length && blnResult == true; i++)
		{
			strChar = strString.charAt(i);
			if (strValidChars.indexOf(strChar) == -1)
			{
				blnResult = false;
			}
		}
		return blnResult;
	}
	function isDelete(msg)
	{
		var tf;
		tf = confirm(msg);
		
		if(tf == true)
			return true;
		else
			return false;
	}
	function checkdate(sday,smon,syear,eday,emon,eyear)
	{
		if(parseInt(syear) <= parseInt(eyear))
		{ 
			if(parseInt(syear) < parseInt(eyear))
			{
				return true;
			}
			else
			{
				  if(parseInt(smon) <= parseInt(emon))
				  {
					  if(parseInt(smon) < parseInt(emon))
					  {
						  return true;
					  }
					  else
					  {
							if(parseInt(sday) <= parseInt(eday))
							{ 
							return true;
							}
					  }
				  }
			}
		 }
		return false;
	}
	
	
	