		$(document).ready(function() {
			
			$("#loginBut").click(function() {
				$.ajax({
					type: "POST",
					dataType: "xml",
					url: "/ajaxprocessing/Login.asp",
					data: "sEmail="+encodeURIComponent($("#firstname2").val())+"&sPassword="+encodeURIComponent($("#firstname3").val()),
					success: function(xml){
						$("response>sData>datanode", xml).each(function(){
							switch($("value", this).text())
							{
								case "a":
									document.location = sNSSL + "/Casino/Default.asp";
									break;
								case "b":
									document.location = sNSSL + "/Players/MonsterView/Default.asp";
									break;
								case "c":
								case "e":
									document.location = sNSSL + "/m23Basket/CustomerAdmin/CustomerAdminMain.asp";
									break;
								case "d":
									document.location = sNSSL + "/m23Basket/CheckOut.asp";
									break;
								case "f":
									jQuery.noticeAdd({text: '<br>Unable to validate your password. Please try again.', iTop:'130'});
									break;
								case "g":
									jQuery.noticeAdd({text: '<br>Please enter your email and password to log in.', iTop:'130'});
									break;
								default:
							
							}
						});
					}
				});
			});



	
		});


