<!--
function conf(a){
	
if (a==1){	
	$("#mailinglist").attr("checked",true);
	$("#mailinglistx").val('1'); 
}else{
	
	$("#mailinglist").attr("checked",false);
	$("#mailinglistx").val('0'); 
}
}
 var options = {
     success: function(responseText) {
         alert(responseText);
		 clearForm();
     }
 };
 function clearForm(){
	$("input,textarea,select").val('');
 	
}
$(function(){ 
$(".req").each(function() {
						//$(this).after('<span class="val">&nbsp;*</span>');
						});
		   
		   
		   var form=$("#contectForm")
 
		  $("#submit").attr("disabled",""); 
		$("#mailinglist").click(function(){
										 
										 if($(this).attr("checked")){
							tb_show('', '/validList.asp?keepThis=true&TB_iframe=true&height=150&width=300&modal=true');
										 }else{
											$("#mailinglistx").val('0'); 
										 }
										 })
	$(".formSubmit").css("cursor","pointer").click(function(){
				$(form).submit();
									});
	$(form).submit(
						function(){
						if (validateForm()){
							// $(this).ajaxSubmit(options);
							 	return true;
							}else{
							return false;
							}
						});
	$("#email").blur(
					   function(){
						     if ($(this).val()){
						  if (IsEmail($(this).val())){
								$("#mailError").fadeOut('fast');	  
						  }else{
			       			 $("#mailError").fadeIn('fast');
						  }  }}).keyup(function(){
							  if (IsEmail($(this).val())){
											$("#mailError").fadeOut('fast');
		}});
	 			 
	});
 
function IsEmail(email) {
            var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
            if (regex.test(email)) return true;
            else return false;
        } 
function validateForm(){
	msg='Please fill the following fields:\n';
	 rt=true; 
	$(".req").each(function() {
							
							  if (!$(this).val()||$(this).val()=="-1"||($(this).attr("name")=="email"&&!IsEmail($(this).val()) ) ){
								 rt=false; 
							    fName=$(this).attr("title");
							 
								msg+=fName;
								 
								if ($(this).attr("name")=="email"&&!IsEmail($(this).val()) &&$(this).val() )  msg+=' - Email is invalid';
								 
								msg+="\n";
							  }
					 })
	//if(!rt)	tb_show('', '/formError.asp?msg='+msg+'&keepThis=true&TB_iframe=true&height=220&width=300&modal=true');
	if(!rt) alert(msg);
	return rt;
}

   // -->