//called with html <body onload=...>//
function page_load() {
	
	for (var i = 0; i < load_funcs.length; i++) {
		cmd = load_funcs[i] + "()";
		eval(cmd);
	}
}



$(document).ready(function() { 

	$("#top_intelliport").click(function() {
		$("#top_intelliport_expanded").toggle();
	});

	$("#top_intelliport_username").focus(function() {
		if ($(this).attr("value")=="user name") {
			$(this).attr("value", "");
		}
	    // if($(this).attr('type')=='text') {
	    // 	window.console.log('here');
	    // 	$(this).attr('type', 'password');
	    // }
	});
	
	$("#top_intelliport_username").blur(function() {
		if ($(this).attr("value")=="") {
			$(this).attr("value", "user name");
		}	
	});

	$("#top_intelliport_password").focus(function() {
		if ($(this).attr("value")=="password") {
		  //$(this).attr("type", "password");
			$(this).attr("value", "");
		}
	});
	
	$("#top_intelliport_password").blur(function() {
		if ($(this).attr("value")=="") {
			$(this).attr("value", "password");
		}	
	});
	
	$("#top_intelliport_form").submit(function() {
		if ($("#top_intelliport_username").attr("value")=="user name") {
			$("#top_intelliport_username").attr("value", "");
		}
		
		if ($("#top_intelliport_password").attr("value")=="password") {
			$("#top_intelliport_password").attr("value", "");
		}
	});

	
	$("#top_search_field").focus(function() {
		if ($(this).attr("value")=="search") {
			$(this).attr("value", "");
		}
	
	});
	
	$("#top_search_field").blur(function() {
		if ($(this).attr("value")=="") {
			$(this).attr("value", "search");
		}
		
	});
	
	$("#top_search_form").submit(function() {
		if ($("#top_search_field").attr("value")=="search") {
			$("#top_search_field").attr("value", "");
		}
		
	});



/*	
	// calendar
	$("#style1_calendar_div").load("listener_calendar.php");

	$(".style1_calendar_dropoff").mouseover(function () {
		$(".widget_day_events_overlay").hide();
	
	});
*/

});

