$(document).ready(function(){
	$.formValidator.initConfig({formid:"regform",onerror:function(msg){alert(msg)}});
	$("#name").formValidator({
		onshow:"Please fill in your name.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in your name."
	});
	$("#title").formValidator({
		onshow:"Please fill in title.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in title."
	});
	$("#company").formValidator({
		onshow:"Please fill in company name.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in company name."
	});
	$("#postcode").formValidator({
		onshow:"Please fill in postcode.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in postcode."
	});
	$("#tel").formValidator({
		onshow:"Please fill in telephone.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:6,
		onerror:"Please fill in telephone."
	});
	$("#fax").formValidator({
		onshow:"Please fill in fax.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:6,
		onerror:"Please fill in fax."
	});
	$("#email").formValidator({
		onshow:"Please fill in Email.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:6,
		max:100,
		onerror:"Your Email length of the error."
	}).regexValidator({
		regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
		onerror:"Your Email format is not correct."
	});
	$("#address").formValidator({
		onshow:"Please fill in address.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:5,
		max:200,
		onerror:"Please fill in detail address."
	});
	
	$("#product").formValidator({
		onshow:"Please fill in product.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		max:200,
		onerror:"Please fill in Exhibits's name."
	});
});
