$(document).ready(function(){
	$.formValidator.initConfig({formid:"Vregform",onerror:function(msg){alert(msg)}});
	
	$("#company").formValidator({
		onshow:"Please fill in company name.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in company name."
	});
	
	$("#country").formValidator({
		onshow:"Please fill in your country.",
		onfocus:"Can not be empty.",
		oncorrect:" "
	}).inputValidator({
		min:1,
		onerror:"Please fill in your country."
	});

	$("#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."
	});
	
});
