	var scnW = screen.availWidth;
	var footL = (scnW - 370 - 18) / 2;
	var headL = (scnW - 998 - 18) / 2;
	
	function footLeft() {
  		document.getElementById("foote").style.left=footL+"px";
	}

	function headLeft() {
  		document.getElementById("heade").style.left=headL+"px";
	}

	$(document).ready(function(){
		headLeft();
		footLeft();
		
$("#loginLink").click(function(){
	window.open('http://webmail.katotechnology.com');
});
		/*
		$("#loginLink").click(function(){
			if ($("#loginForm").is(":hidden")){
				$("#loginForm").slideDown("slow");
				if ($("#loginText").is(":hidden")){
					$("#loginText").show();
				}
				if ($("#loginForm2").is(":visible")){
					$("#loginForm2").hide();
				}
				if ($("#menu").is(":visible")){
					$("#menu").fadeOut("slow");
				}
			}
			else{
				$("#loginForm").slideUp("slow");
				$("#menu").fadeIn("slow");
			}
		});

		$("#content").click(function() {
			if ($("#loginForm").is(":visible")){
				$("#loginForm").slideUp("slow");
				$("#menu").fadeIn("slow");
			}
		});

		$("#adminLogin").click(function() {
			if ($("#loginText").is(":visible")){
				$("#loginText").fadeOut("slow", function() {
				$("#loginForm2").fadeIn("slow");});
			}
		});
		
*/      
		$('#userName').defaultValue('UserName'); 
		$('#passwd').defaultValue('Password');   

		// fade in content.
		$( '#content-wrapper' ).fadeIn("slow");
		// fade out content.
        $('a.fademeout').click(function(){
			$('#content-wrapper').fadeOut();
			setTimeout("nav('"+this.href+"')",400);
			return false;
		});
	
		
		 
		}); //document.ready end


	function closeForm(){
		$("#authenticate").show("slow");
		setTimeout('$("#authenticate").hide();$("#loginForm").slideUp("slow")', 2000);
		setTimeout('$("#menu").fadeIn("slow")',2000);
	}
	
	function backForm(){
		$("#loginForm2").fadeOut("slow", function() {
		$("#loginText").fadeIn("slow");});
	}

	function nav(href){
		location.href=href;
	}