// All Javascript header code for various pages


function pop8x6plus(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=640,left=50,top=50');");
}

function pop8x6(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left=0,top=0');");
}

function pop7x5(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=700,height=500,left=0,top=0');");
}


function walPop(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=580,height=525,left=50,top=50');");
}

function browserCheck() { 
URL ='https://webster-vista.blackboard.com/webct/urw/lc5122011.tp0/browserchecker.dowebct?checkType=manual';	
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=250,height=475,left=350,top=50');");
}











function initMenus(sect,page) {

	$('ul.menu ul').hide();
	/*$.each($('ul.menu'), function(){
		$('#' + this.id + '.expandfirst ul:first').show();
	});*/
	
	
	
	$.each($('ul.menu'), function(){
$('ul.expand').show();
});
	var theLink='#'+sect+'_'+page;
	$(theLink).addClass("linkChoose");
	$(theLink).css({ 'color': '#ffffff', 'background': '#2376b8', 'background-image':'url(images/rollover.png)','background-repeat': 'no-repeat','background-position': 'right','padding-left':'10px' });
	
	
	
	$('ul.menu li a').click(
		function() {
			var checkElement = $(this).next();
			var parent = this.parentNode.parentNode.id;

			if($('#' + parent).hasClass('noaccordion')) {
				$(this).next().slideToggle('normal');
				return false;
			}
			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
				if($('#' + parent).hasClass('collapsible')) {
					$('#' + parent + ' ul:visible').slideUp('normal');
				}
				return false;
			}
			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
				$('#' + parent + ' ul:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		}
	);
}
//$(document).ready(function() {initMenus();});
