function getCookie(){
try
{
	var cookieValue = document.cookie.split(";")[0]
	if (cookieValue!="") 
		{
		//now split the cookie values and fill the correct fields
		var cookieArguments = cookieValue.split("#")
		var DefaultName = cookieArguments[0]
		var Uname = cookieArguments[1].split("=")[1]
		var Pword = cookieArguments[2].split("=")[1]
		document.forms[0].email_address.value = Uname
		document.forms[0].password.value = Pword
		}
	//alert function used for debugging
	//	alert("Username : "  + Uname + "\nPassword : "  + Pword )	
}
catch(er)
{			
	window.status = er
}
}

function setCookie(){
//general variables to set the expirydate
  var today = new Date();
  var expiry = new Date(today.getTime() + 2 * 365 * 24 * 60 * 60 * 1000); // plus 2 years
		//First get the values from the form and store these in the name field
		var Uname = document.forms[0].email_address.value
		var Pword = document.forms[0].password.value
		var DefaultName = "Europarts"
		var cookieName = "Europarts#Uname=" + Uname + "#Pword=" + Pword;
		document.cookie=name + "=" + cookieName + "; expires=" + expiry.toGMTString();
		window.status = "Storing cookie data..." 
}

function deleteCookie()
//removes the cookie
{
		var cookieName = "Europarts#Uname=#Pword=";
        document.cookie=name + "=" + cookieName;
}

function test()
{
	alert(' hallo' )
}