// JavaScript Document
<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

 function check_value(which_field,check_value)
    {
	formObj = document.getElementById("reg_form");
	if(formObj.elements[which_field].value==check_value){
	formObj.elements[which_field].value="";
   return;
	}
	}
function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}	
function passwordStrength(password) { var desc = new Array(); desc[0] = "Very Weak"; desc[1] = "Good Enough"; desc[2] = "Better"; desc[3] = "Medium"; desc[4] = "Strong"; desc[5] = "Strongest"; var score = 0; //if password bigger than 6 give 1 point
		 if (password.length > 3) score++;
		  //if password has both lower and uppercase characters give 1 point
		   if ( ( password.match(/[a-z]/) ) && ( password.match(/[A-Z]/)&&(password.length > 3) ) ) score++; 
		   //if password has at least one number give 1 point
		    if (password.match(/\d+/)&&(password.length > 3)) score++;
			//if password has at least one special caracther give 1 point 
			//if ( password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/) ) score++; 
			//if password bigger than 12 give another 1 point 
			if (password.length > 12) score++; document.getElementById("passwordDescription").innerHTML = desc[score]; document.getElementById("passwordStrength").className = "strength" + score; }	
     
//--><!]]>

