function check_special_chars(vlue,chars)
{
		var iChars=chars;
		if(chars==null)
		{
			var iChars = "-_!@#$%^&*()+=-[]\\\';,./{}|\":<>?~`";
		}
		for (var i = 0; i < vlue.length; i++)
		{
			if (iChars.indexOf(vlue.charAt(i)) != -1)
			{
				return false;
			}
		}
		return true;
}
function test_form1(form1)
{
	var err=0;
	var msg="";
	
	if(isblank(form1.fname) || !check_special_chars(form1.fname.value,null))
	{
		msg=msg+"<li class='description'>Enter your firstname without any special character.</li>";
		err=err+1;
	}
	if(isblank(form1.lname) || !check_special_chars(form1.lname.value,null))
	{
		msg=msg+"<li class='description'>Enter your lastname without any special character.</li>";
		err=err+1;
	}
	if(isblank(form1.address) || !check_special_chars(form1.address.value,"!@$%^&*()+=[]\\\';{}|\":<>?~`"))
	{
		msg=msg+"<li class='description'>Enter your address correctly. Allowed special characters are hash(#), hyphen(-), underscore(_), dot(.), slash(/) and comma(,).</li>";
		err=err+1;
	}
	if(isblank(form1.city) || !check_special_chars(form1.city.value,"!@$%^&*()+=[]\\\';./{}|\":<>?~`"))
	{
		msg=msg+"<li class='description'>Enter your city correctly. Allowed special characters are hash(#), hyphen(-), underscore(_) and comma(,).</li>";
		err=err+1;
	}
	if(form1.statename.options[form1.statename.selectedIndex].value=="-1")
	{
		msg=msg+"<li class='description'>Select your state name.</li>";
		err=err+1;
	}
	if(isblank(form1.zipcode) || form1.zipcode.value.length!=5 || isNaN(form1.zipcode.value))
	{
		msg=msg+"<li class='description'>Enter your numeric 5 digit zipcode.</li>";
		err=err+1;
	}
	if(isblank(form1.phone) || form1.phone.value.length<10 || isNaN(form1.phone.value))
	{
		msg=msg+"<li class='description'>Enter your authentic numeric contact no.</li>";
		err=err+1;
	}
	/*if(form1.country.options[form1.country.selectedIndex].value=="-1")
	{
		msg=msg+"<li class='description'>Please select your country</li>";
		err=err+1;
	}
	*/
	if(!isEmail(form1.email))
	{
		msg=msg+"<li class='description'>Enter your valid Email.</li>";
		err=err+1;
	}
	
	if(err>0)
	{
		msg="<span class='close_btn' onclick='hide_notify();'>close</span><h1 class='heading_title'>Please correct following errors...</h1><ol class='numeric'>"+msg+"</l>";
		show_notify(msg);
		$('html,body').animate({scrollTop:5}, 1000);
		return false;
	}
	else
	{
		hide_notify();
		return true;
	}
}
function show_notify(msg)
{
	$("#notify_div").html(msg);
	//$("#overlay_div").css("display","block");
	$("#notify_div").slideDown(250);
}
function hide_notify()
{
	$("#overlay_div").css("display","none");
	$("#notify_div").slideUp(300);
	$("#notify_div").html("");
}
