 var R = jQuery.noConflict(); 
 R(document).ready(function(){
	R("#signin_submit").click(function(){
		var valid = '';
		var isr = ' is required.';
		var name = R("#username").val();
		var mail = R("#email").val();
		var RegVarID = R("#RegVarID").val();
		
		if (!mail.match(/^([a-z0-9._-]+@[a-z0-9._-]+\.[a-z]{2,4}$)/i)) {
			valid += ' A valid email'+isr;
		}
	
		if (valid!='') {
			R("#response2").fadeIn("slow");
			R("#response2").html("Error: "+valid);
		}
		else {
			var datastr ='RegVarID=' + RegVarID + '&name=' + name + '&mail=' + mail;
			R("#response2").css("display", "block");
			R("#response2").html("Registering Details ... ");
			R("#response2").fadeIn("slow");
			setTimeout("send('"+datastr+"')",2000);
		}
		return false;
	});
});
function send(datastr){
	R.ajax({	
		type: "POST",
		url: "join.asp",
		data: datastr,
		cache: false,
		success: function(html){
		R("#response2").fadeIn("slow");
		R("#response2").html(html);
		setTimeout('R("#response2").fadeOut("slow")',1000);
		
	}
	});
}

