
		<!-- 

	function onLoad()
    {
	 		var Form = document.getElementById('Login');
			Form.email.value = getCookie("email");    
    }
    
    function getCookie(name)
    {
    	var cname = name + "=";               
    	var dc = document.cookie;             
	if (dc.length > 0) 
	{              
    		begin = dc.indexOf(cname);       
    		if (begin != -1) 
        {           
    			begin += cname.length;       
    			end = dc.indexOf(";", begin);

    			if (end == -1) end = dc.length;
    				return unescape(dc.substring(begin, end));
    		} 
    	}
    	return "";
    }

    function setCookie(name, value) 
    {
    	var now = new Date();
    	var then = new Date(now.getTime() + 31536000000);
    	document.cookie = name + "=" + escape(value) 
			                       + "; expires=" + then.toGMTString()
			                       + "; domain=student.Oligapx.com; path=/data/";  
			                     
								 
    }

		function validateForm()
    {
    	return validateEmail() && validatePwd();
    }
    
    function validateEmail()
    {
	 		var Form = document.getElementById('Login');
			if (Form.email.value.indexOf("@") == -1 || Form.email.value.indexOf(".") == -1)
      {
      	alert("Sorry, invalid e-mail address");
        return false;      
      }
      else {
		    setCookie(Form.email.name, Form.email.value);
        return true;      
      }
    }
    
    function validatePwd() 
    {
	 		var Form = document.getElementById('Login');
    	// check in database, for now anything is ok
			if (Form.password.value.length >= 1) {
	      return true;
      }
      else {
      	alert("Sorry, invalid password");
        return false;
      }
    }

    //  -->

