// JavaScript Document
function isNumberOnly(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8 && unicode!=9)
	{ //if the key isn't the backspace key (which we should allow)
		 //disable key press
		//if (unicode==45)
		//	return true;
		if (unicode<48||unicode>57) //if not a number
			return false
	}
}


function isNumberOnlywithDot(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8 && unicode!=9)
	{ //if the key isn't the backspace key (which we should allow)
		 //disable key press
		if (unicode==46)
			return true;
		if (unicode<48||unicode>57) //if not a number
			return false
	}
}
function isNumberOnlyWithDash(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	if (unicode!=8 && unicode!=9)
	{ //if the key isn't the backspace key (which we should allow)
		 //disable key press
		if (unicode==45)
			return true;
		if(unicode==196)
			return true;
		if(unicode==32)
			return true;
		if (unicode<48||unicode>57) //if not a number
			return false;
	}
}
function isCharOnly(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	//if (unicode!=8 && unicode!=9)
	//{ //if the key isn't the backspace key (which we should allow)
		 //disable key press
		if (unicode==45)
			return true;
		if (unicode>48 && unicode<57) //if not a number
			return false
	//}
}
function isCharOnlywithSpace(e)
{
	var unicode=e.charCode? e.charCode : e.keyCode
	//if (unicode!=8 && unicode!=9)
	//{ //if the key isn't the backspace key (which we should allow)
		 //disable key press
		if (unicode==45)
			return true;
		if (unicode>48 && unicode<57) //if not a number
			return false
	//}
}
function chkEmail(email){
		//ex908_a.a89@yahoo.co.in || ex908_a.a89@yahoo.com
		//exact match is not completed for first example
//		emailptrn=/^[a-zA-Z0-9][\w\.]*@{1}[\w]+\.{1}[\w]+/;
		emailptrn=/^([a-zA-Z0-9_.-])+(\.[a-zA-Z0-9])*@([a-zA-Z0-9_.-])+(\.[a-zA-Z0-9]+)+$/;
		//[\w]+
		if(emailptrn.test(email)){
			//alert(emailptrn.test(email));//{
			return false;
		}else{
			return true;
		}
}
/*function isBlank(element)
{
	if(element.value.length==0)
	{
		return false;	
	}
	else
		return true;
	
	
}*/
function comapre_dates(m11,d11,m22,d22)
{
	var m1=parseInt(m11);
	var d1=parseFloat(d11);
	var m2 =parseInt(m22);
	var d2=parseFloat(d22);
	
	if(m1 > m2)
	{
		//alert("From month should less than To month");
		return false;
	}
	else if(m1 == m2)
	{
		if(d1 > d2)
		{
			//alert("From day should less than To day");
			return false;
		}

	}
	return true;
}