new function(){
	function showExample(input){
		input.value=input._exmpl;
		input.style.fontStyle = "italic";
		input.title=input._exmpl;
	};
	$(document).ready(function(){
		$("form").each(function(){
			$("input[@_exmpl]",this).each(function(){
				showExample(this);
				this.onclick = function(){
					this.style.fontStyle = "";
					if(this.value==this._exmpl){
						this.value="";
					}
				};
			});
			this.onsubmit = function(){
				var ok = true;
				$("input[@_ptrn]",this).each(function(){
					var rxChk = new RegExp(this._ptrn);
					if(!this.value.match(rxChk)){
						ok=false;
						if(this._exmpl){
							showExample(this);
						}
					}
				});
				if(!ok){
					alert("Please make sure you fill out all fields correctly.");
				}
				return ok;
			};
		});
	});

};