// JavaScript Document

function check_number(t)
	{
		
	var val=t.value;
	var id=t.id;
	var i;
	var stringLen;
	var updatedValue;
	 
	for(i=0;i<val.length;i++)
		{
		  if(isNaN(val.charAt(i)))
		  {
				stringLen=val.length;
				updatedValue=val.substr(0,stringLen-1);
				val=updatedValue;
				document.getElementById(id).value=updatedValue;
		  }	
		}	
	}
	
function clear_search_box(t)
	{
	var val	=t.value
	var id	=t.id;
	if(document.getElementById(id).value==val)
	document.getElementById(id).value="";
	}
	
function paste_content_in_search_box(t)
	{
	var val	=t.value
	var id	=t.id;
	if(document.getElementById(id).value=="")
	document.getElementById(id).value="search";
	}
	
function check_email(t,display_div_id)
	{
	var str=t.value;
	var filter=/^.+@.+\..{2,3}$/
	 if (filter.test(str))
    	return true;
	 else 
		 {
		 document.getElementById(t.id).value="";
		 document.getElementById(display_div_id).innerHTML="<font color=red>Please Enter A Valid Email Address!</font>";
		 document.getElementById(t).focus();	
		 return false;
		}
	}
	
function confirm_email(firstEmailFld,otherEmailFld,display_div_id)
	{
		
		if(firstEmailFld==document.getElementById(otherEmailFld.id).value)
		{
			document.getElementById(display_div_id).innerHTML="";
			return true;
		}
	 else 
		 {
		 document.getElementById(display_div_id).innerHTML="<font color=red>Please Varify your Email Address By Entering the Same!</font>";
		 document.getElementById(otherEmailFld).focus();	
		 return false;
		}
	}	
	
function confirm_box()
{
	var res=confirm("Are You Sure To Delete");
	if(res){
	return true;
	}else{
	return false;
	}
}	


	
