function show_signup (email) {
	var filter=/^.+@.+\..{2,3}$/;
	
	if ( email == "" || email == "Enter email address..." ) {		
			alert ("Enter your email first!");
	}
	else {
		if (filter.test(email)){
			var box = document.getElementById("signup_box");
					
			html  = "<form name='ss' method='post' action=''><table width='100%'>";
			html += "<tr>";
			html += "	<td align='right' style='color:#fff'><label>First Name:&nbsp;</label></td>";
			html += "	<td><input name='firstname' type='text' class='sigup_text' id='name'></td>";
			html += "	<td align='right'><a onclick='hide_signup()' style='cursor:pointer;'>[x]</a></td>";
			html += "</tr>";
			html += "<tr>";
			html += "	<td align='right' style='padding-top: 8px;color:#fff'><label>Last Name:&nbsp;</label></td>";
			html += "	<td style='padding-top: 8px;'><input name='lastname' type='text' class='sigup_text' id='lastname'></td>";
			html += "	<td align='right'>&nbsp;</td>";
			html += "</tr>";
			html += "<tr>";
			html += "	<td align='right' style='padding-top: 8px;color:#fff'><label>Postcode:&nbsp;</label></td>";
			html += "	<td style='padding-top: 8px;'><input name='postcode' type='text' class='sigup_text' id='postcode'></td>";
			html += "	<td></td>";
			html += "</tr>";
			html += "<tr>";
			html += "	<td colspan='3' style='padding-left:63px;padding-top: 8px;'><input class='button' name='submit_signup' value='Sign Up' type='submit' onclick='check()'>";
			html += "	<input name='email' type='hidden' value='" + email + "'></td>";
			html += "</tr>";
			html += "</table></form>";
			
			box.innerHTML = html;
			box.style.display = "block";
		}
		else 
			alert ("Enter correct email address!");
	}
}

function hide_signup () {
	document.getElementById("signup_box").style.display = "none";
}

function check(){
	var d = document;
	var email = d.getElementById("email").value;
	var name = d.getElementById("name").value;
	var lastname = d.getElementById("lastname").value;
	var postcode = d.getElementById("postcode").value;
	
	var msg = "";
	var filter=/^.+@.+\..{2,3}$/;
	
	if (email != "") {
		if (filter.test(email)) {
			if (name == ""){
				alert("Please, enter your First name");
				return false;
			}
			
			if (lastname == ""){
				alert("Please, enter your Last name");
				return false;
			}
			
			if (postcode == "") {
				alert("Please, enter you postcode");
				return false;
			}
			
			signup_form.submit();
		}
		else {
			alert("Please input a valid email address!");			
			return false;
		}		
	}
	else {
		alert ("Please, enter your email first!");
		return false;
	}
}
