function pigcatFCValidate_register(fc){
nameForm=fc; 


// checks if name has been filled

if(fc['name'].value==''){
alert('You need to supply your name');
fc.firstname.focus();
flashing(fc.name, 'name',0,10,0);
return false;
}



// checks if email is valid email address
var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT|biz|BIZ|info|INFO|name|NAME)$";
var re = new RegExp(regu);
if (fc['email'].value.search(re) == -1) {
alert('You need to use a valid email address');
fc.email.focus();
flashing(fc.name, 'email',0,10,0);
return false;
}


// checks if verify has been filled

if(fc['verify'].value==''){
alert('Please enter the verification shown in the image');
fc.verify.focus();
flashing(fc.name, 'verify',0,10,0);
return false;
}

//Custom JS 

 submitOnce(register);


}


 //Flash Focus Function (author: Sylvestre Ledru)

	 	 tpsFlashing=100;
		 function setColorError(nameForm,name,colorError)
		 {
		 	setColorBG(nameForm, name, colorError)
		 }
		 
		 function setColorBG(nameForm, name, color)
		 {
		 	form=getForm(nameForm);
		 	eval(form+'.'+name+'.style.background="'+color+'"')
		 }
		 
		 function flashing(nameForm,name,c,nbre,indexC)
		 {
		 	form=getForm(nameForm);
		 	eval(form+'.'+name+'.style.background=('+c+')?"'+colorFlashing2+'":"'+colorFlashing+'"');
		 	c=1-c
		 	indexC++
		 
		 	if(indexC>nbre)
		 	{
		 		if(keepColor) setColorError(nameForm,name,colorFlashing2)
		 		return
		 	}
		 	setTimeout("flashing('"+nameForm+"', '"+name+"',"+c+","+nbre+","+indexC+")",tpsFlashing)
		 }
		 
		 function getForm(nameForm) {
		 	var ns4=(document.layers)? true:false;
		 	var ns6=(document.getElementById)? true:false;
		 	var ie4=(document.all)? true:false;
		 	if (ns4) {
		 		
		 		return 'document.layers['+nameForm+']';
		 	}
		 	if (ie4) {
		 		return 'document.'+nameForm;
		 	}
		 	//	alert(nameForm);
		 	return 'document.getElementById("'+nameForm+'")';
		 
		 }
		 
		 keepColor=1;
		 colorFlashing="#FFFFFF"
		 colorFlashing2="#DC0C11"

		 
 //Submit Once Function (author: Joey)

		 function submitOnce(theform) {
		 if (document.all || document.getElementById) {
			for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];
			if (tempobj.type.toLowerCase() == 'submit' || tempobj.type.toLowerCase() == 'reset')
				tempobj.disabled = true;
			}
			setTimeout('alert("Submitting,Please keep waiting")', 1500);
			return true;
			}
			else {
			alert('Submitting,Please keep waiting');
			return false;
			  }
		}