function showResponse(responseText, statusText)  {
	var options = {
			target:		'#login',   // target element(s) to be updated with server response
			clearForm:	true,
			success:	showResponse
	};
	$('#loginform').ajaxForm(options);
	if ( $(".nologin").length > 0 && $('#login').html().indexOf('Welcome')!=-1) {
		var $this = $(".nologin");
		$this.removeClass('nologin');
		$this.addClass('yeslogin');
	}
	else {
		if ($(".yeslogin").length > 0 ) {
			var $this = $(".yeslogin");
			$this.removeClass('yeslogin');
			$this.addClass('nologin');
		}
	}
	if ($('#ipaddress').length > 0) { $('#logintxt').html('Facility Staff Login Here'); } else { $('#logintxt').html('Facility Staff Logout Here'); }
}
$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({height: "260px"}).animate({height: "230px"}, "fast");
		$("div.panel_button").toggle();
	});

   $("div#hide_button").click(function(){
		$("div#panel").animate({height: "0px"}, "fast");
   });

  /* BINDING LOGINFORM */
	var options = {
		target:		'#login',   // target element(s) to be updated with server response
		clearForm:	true,
		success:	showResponse
	};
	// bind form using 'ajaxForm'
	$('#loginform').ajaxForm(options);
});
