<!-- // Hide this script from older browsers
ie6 = false;
pathLength = 1;

// $Id: publicJavascript.js,v 1.1 2005/11/15 20:55:05 justins Exp $
function video_window(video_server_path, video_file_name, video_width, video_height, video_title, video_content_type, video_loop, video_autostart) {
	var popup_width = Number(video_width) + 30;
	var popup_height = Number(video_height) + 125;
	window.open('displayVideo?video_server_path='+video_server_path+'&video_file_name='+video_file_name+'&video_width='+video_width+'&video_height='+video_height+'&video_title='+video_title+'&video_content_type='+video_content_type+'&video_loop='+video_loop+'&video_autostart='+video_autostart, 'VideoWindow', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+popup_width+',height='+popup_height+',left = 200,top = 100');
}

function setCSS_Style(newstyle) {
	document.cookie = 'CSS_Style=' + newstyle + '; path=/';
	self.location = self.location;
}

function simplePopup(url, title, popup_width, popup_height) {
	var screenHeight,screenWidth;
	screenHeight = self.screen.height;
	screenWidth= self.screen.width;
	var positionLeft,positionTop;
	positionLeft = parseInt((screenWidth - popup_width)/2);
	positionTop = parseInt((screenHeight - popup_height)/2);
	window.open(url, title, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+popup_width+',height='+popup_height+',left='+positionLeft+',top='+positionTop);
}

function exitConfirmation() {
	var currentLocation = window.location;
	var value=window.confirm('Are you sure you want to Exit this course?\nYou will lose any unsaved information if you exit now.\nClick OK to exit out of this course. If you would like to go back, click Cancel.');
	if (value) { 
		window.location.replace('/userBookmark?location='+currentLocation);
	}
}

$(document).ready(function(){
	//initialize content
	$("#homeNavContent li").height($("#homeNavBox").height()-20);
	$("#homeNavContent li").css("overflow-y", "auto");
	$("#homeNavContent").css("position", "absolute");
	$("#homeNavContent").css("top", "0");
	$("#homeNavContent").css("right", "0");
	$(".content").css('display', 'none');
	$(".mainNavLink:first").addClass("selected");
	$(".content:first").css('display', 'block');
	
	$("#searchBox").focus(function (i){
		if ($(this).val() == "Search") $(this).val("");
	});
	
 	//Apply top corners
	$("#containerBox").corners("5px");
	$(".audHead").corners("top");
	if ( pathLength == 0) { 
		$("#right_top h2").corners("top");
		$(".homeBelow h2").corners("top");
 	}
 	
 	
	
	//on click event - hide all sections then show the selected one.
	$("a.mainNavLink").each(function (i){
		$(this).click(function(event) {
			event.preventDefault();
			$(".content").css('display', 'none');
			$(".selected").removeClass("selected");
			$(this).addClass("selected");
			$("#"+this.id+"_content").css('display', 'block');
			$("#"+this.id+"_content a:eq(1)").focus();
		})
	})
 });

// -->
