

// S U C K E R F I S H //

sfHover = function() {

	var sfEls = document.getElementById("navcontainer").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"), "");
		}
	}

	var sfEls2 = document.getElementById("top").getElementsByTagName("LI");
	for (var i=0; i<sfEls2.length; i++) {
		sfEls2[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls2[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}

}
if (window.attachEvent) window.attachEvent("onload", sfHover);


// for the general layout login form
function onsubmitform()
{
    // check to verify there was a username submitted
    if(document.quick_login.username.value=='')
    {
        alert('Please enter a username');
        document.quick_login.username.focus();
        return false
    }
    // check to verify there was a password submitted
    if(document.quick_login.password.value=='')
    {
        alert('Please enter a password');
        document.quick_login.password.focus();
        return false
    }

    // If the first checkbox was selected, go to the employers area    
    if(document.quick_login.operation[0].checked == true)
    {
      document.quick_login.action ="employersarea.php";
    }
    // If the second checkbox was selected, go to the job seekers area    
    else if(document.quick_login.operation[1].checked == true)
    {
      document.quick_login.action ="jobseekersarea.php";
    }
    
    // There is proberably no need for this ...
    // but let's keep to a good coding standard eh?
    return true;
    
}

/* 
    PLEASE NOTE: 
    I would like to add that the code below is absolutly nothing to do with me
    I have copied and pasted code from the old site (it's chinmay code beware)
    
    However: I have ammended some of the code to make it look better
    
*/

	function confirm_delete()
	{
    	var message = "Do you really want to delete this account?";
    	var return_value = confirm(message);
    
    	if (return_value == true)
    	{
          return true;
      }
    	else
    	{
    	   return false;
    	}
	}
