

$(function(){
		   
         MGtab("#tabprice","span","ul","on","k");

});

//tab

function MGtab(Divid,t,c,className,tag){

         var tabt=$(Divid+" "+t);

         var tabc=$(Divid+" "+c);
		 
         tabt.css("cursor","pointer");

         tabc.hide();

         tabc.eq(0).show();

         tabt.click(function(){

                   tabt.removeClass(className);

                   $(this).addClass(className);

                   var tagc=$(this).attr("id");

                   tabc.hide();

                   $("#"+tagc+tag).show();

         });

}
function check_input()
{
	if (document.getElementById("realname").value=="")
	{
		document.getElementById("realname").focus();
		alert('Your full name can not be empty,Please check again!'); return false;
	}
	if (document.getElementById("email").value=="")
	{
		document.getElementById("email").focus();
		alert('Your Email can not be empty,Please check again!'); return false;
	 
	}else {
		var pattern1 = /^(([\u4E00-\u9FA5]|[\uFE30-\uFEFF]|[\d]|[a-zA-Z]|[\_\-\.])+[\@])(((([\d]|[a-zA-Z]|[\_\-]|[\[\]\{\}\>\<])+[\.])+)([\d]|[a-zA-Z\_\-])+)$/;
	   str=document.getElementById("email").value
       if(!str.match(pattern1) ){
	     alert("Email error!");
		 document.getElementById("email").focus();
         return false;
	   }
	}
	if(document.getElementById("Aquestion").value==""||document.getElementById("Aquestion").value=="Question: Got a question? Ask us here. We will reply within 24 hours.")
	{
		 document.getElementById("Aquestion").value = "";
		 alert("Please write your questions! Thank you!");
		 document.getElementById("Aquestion").focus();
		 return false;
	} 

return true;
}


