function stripHTML(){
var re= /<\S[^><]*>/g
for (i=0; i<arguments.length; i++)
	arguments[i].value=arguments[i].value.replace(re, "")
}


function validate_cepis_register(frm) {
	checkString(frm.firstname,"Firstname");
	checkString(frm.secondname,"Surname");
	checkString(frm.site_user_custom1,"Computer Society");
	checkEmail(frm.email,"Email",1);
	checkString(frm.username,"Username");
	checkString(frm.password,"Password");
	
if (frm.password.value.length <6){
		addError("Password must be minimum 6 characters");		
	}

	stripHTML(frm.firstname); 
	stripHTML(frm.secondname);   
	stripHTML(frm.site_user_custom1);
	stripHTML(frm.site_user_custom3);
	stripHTML(frm.email);
	stripHTML(frm.username);
	stripHTML(frm.password);	
	
	return checkError();
}
  
  