var MyPopupHeight;
var MyPopupWidth;

if (screen.height <= 600)
{
	MyPopupHeight = 530;
}
else
{
	MyPopupHeight = 580;
}

if (screen.width <= 800)
{
	MyPopupWidth = 422;
}
else
{
	MyPopupWidth = 422;
}

//-Urchin Tracking Module(UTM),$Revision: 1.4 $,Copyright 2002 Urchin Software Corporation-

var __utmf;

if (!__utmf) {
 var __utm1,__utm2,__utm3,__utmi,__utmn,__utmd,__utmu,__utmp,__utmr;
 __utm1 = document.cookie.indexOf("__utm1=");
 __utm2 = document.cookie.indexOf("__utm2=");
 __utm3 = document.cookie.indexOf("__utm3=");
 __utmn = Math.round(Math.random() * 4294967295);
 __utmd = new Date();
 __utmu = Math.round(__utmd.getTime()/1000);
 if ((__utm1 < 0) || (__utm2 < 0)) {
  document.cookie="__utm1="+__utmn+"."+__utmu+"; path=/; expires=Sun, 18 Jan 2038 00:00:00 GMT";
  document.cookie="__utm2="+__utmu+"; path=/; expires=Sun, 18 Jan 2038 00:00:00 GMT";
  document.cookie="__utm3="+__utmu+"; path=/;";
 } else if (__utm3 < 0) {
  document.cookie="__utm2="+__utmu+"; path=/; expires=Sun, 18 Jan 2038 00:00:00 GMT";
  document.cookie="__utm3="+__utmu+"; path=/;";
 }
 __utmr = document.referrer;
 if (!__utmr) {__utmr = "-";}
 else {
  __utmp = __utmr.indexOf(document.domain);
  if ((__utmp >= 0) && (__utmp <= 8)) __utmr = 0;
 }
 var __utmi = new Image(1,1);
 __utmi.src ="/Images/CommonImages/__utm.gif?utmn="+__utmn+"&utmr="+__utmr;
 __utmf = 1;
}

<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

//Popup Script
<!-- Begin
function NewWindow1(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
//  End -->

//DropNav
                                                                            
isNS4 = (document.layers) ? true : false;
NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);   
isMac = (navigator.appVersion.indexOf("Mac") != -1);
isMenu = (NS4 || (IE4 && !isMac));
function popUp(){return};
function popDown(){return};
function startIt(){return};
   var platform = navigator.appVersion;
isUNIX = (platform.indexOf("X11") != -1) ||
  (platform.indexOf("Linux") != -1) ||
  (platform.indexOf("SunOS") != -1) ||
  (platform.indexOf("IRIX") != -1) ||
   (platform.indexOf("HP-UX") != -1);

if (!ver4) event = null;

browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

// preload universal images
if (browser) {

//LearningModules !1
	LearningModules_off = new Image;
	LearningModules_off.src = "/Images/Nav/learningmodules.gif";
	LearningModules_on = new Image;
	LearningModules_on.src = "/Images/Nav/learningmoduleson.gif";

//Apples !2
	Apples_off = new Image;
	Apples_off.src = "/Images/Nav/apples.gif";
	Apples_on = new Image;
	Apples_on.src = "/Images/Nav/appleson.gif";

//SelfAssessments !3
	SelfAssessments_off = new Image;
	SelfAssessments_off.src = "/Images/Nav/selfassessments.gif";
	SelfAssessments_on = new Image;
	SelfAssessments_on.src = "/Images/Nav/selfassessmentson.gif";
	
//MyPortfolio !4
	MyPortfolio_off = new Image;
	MyPortfolio_off.src = "/Images/Nav/myportfolio.gif";
	MyPortfolio_on = new Image;
	MyPortfolio_on.src = "/Images/Nav/myportfolioon.gif";
	
//Resources !5
	Resources_off = new Image;
	Resources_off.src = "/Images/Nav/resources.gif";
	Resources_on = new Image;
	Resources_on.src = "/Images/Nav/resourceson.gif";

//ResourcesIndividual !6
	ResourcesIndividual_off = new Image;
	ResourcesIndividual_off.src = "/Images/Nav/resourcesindividual.gif";
	ResourcesIndividual_on = new Image;
	ResourcesIndividual_on.src = "/Images/Nav/resourcesindividualon.gif";

}

function putImage(imgDocID,imgObjName) {
if (browser) {
        document.images[imgDocID].src = eval(imgObjName + ".src")
	}
}


// jumpto menu
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

//td mouseover for nav
function cOn1(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#9999CC";
	}
}

function cOut1(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#666699";
	}
}
//-->



// global variables for popups
var PopupFlag=0;
var Popup;

var isNew = 0;
var isNS4 = 0;
var isIE4 = 0;

var ClipFlag = 0;

var mousePosX = null;
var mousePosY = null;

//browser sniffer
var brows=((navigator.appName)+(parseInt(navigator.appVersion)));
if(parseInt(navigator.appVersion)>=5) 
	isNew=1;
else if (brows=="Netscape4") 
	isNS4=1;
else if (brows=="Microsoft Internet Explorer4") 
	isIE4=1;

if (isNS4||isIE4){
	if (isNS4){
		var docObj = 'document';
	}
	else{
		var docObj = 'document.all';
	}
	var styleObj = (isNS4) ? '' : '.style';
}
if (isNew){
	var docObj = 'document.getElementById';
	var styleObj = '.style';
}


// SHOW A HIDDEN DIV -----------------------------------
	function fncShowDiv(menuName,top,left)
	{
		if (isNew){
			var menu = eval(docObj + "(menuName)" + styleObj);
		}
		else if (isNS4 || isIE4){
			var menu = eval(docObj + '.' + menuName + styleObj);
		}
		else{
		}
	
		if (isIE4) { // grab the x-y position of the mouse if browser is IE
	    	mousePosX = event.clientX + document.body.scrollLeft;
	    	mousePosY = event.clientY + document.body.scrollTop;
	  	} 
		else {  // grab the x-y position of the mouse if browser is NS
			document.captureEvents(Event.MOUSEMOVE);
			document.onmousemove=mTrack;
		}
	
		//assign an offset of the mouse to the div top and left
		menu.top=(mousePosY+top);
		menu.left=(mousePosX+left);
		
		menu.visibility="visible";
	}

	/*This function finds the mouse x y coordinates*/
	function mTrack(e) {
    	mousePosX = e.pageX;
    	mousePosY = e.pageY;
	  	// catch possible negative values in NS4
	  	if (mousePosX < 0){
			mousePosX = 0;
		}
	  	if (mousePosY < 0){
			mousePos = 0;
		} 
	}


	/*This function gets the DOM depending on the browser and hides the menu.
	The id of the span is passed in as a parameter*/
	function fncHideDiv(menuName)
	{
		if (isNew){
			var menu = eval(docObj + "(menuName)" + styleObj);
		}
		else if (isNS4 || isIE4){
			var menu = eval(docObj + '.' + menuName + styleObj);
		}
		else{
		}
		menu.visibility="hidden";
	}



// BEGIN DHTML MENUS  ----------------------------------------------------

//This function is used to swap images to the moused-over state
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; 
  	document.MM_sr=new Array; 
  	for(i=0;i<(a.length-2);i+=3)
	{
   		if ((x=MM_findObj(a[i]))!=null)
   		{
   			document.MM_sr[j++]=x; 
			if(!x.oSrc) 
				x.oSrc=x.src; 
			x.src=a[i+2];
		}
	}
}

//This function is used to swap images to the moused-out state
function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; 
	for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) 
  		x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d=document; 
	if(d.images)
	{ 
		if(!d.MM_p) 
			d.MM_p=new Array();
   		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
		for(i=0; i<a.length; i++)
		{
   			if (a[i].indexOf("off")!=0)
			{ 
				d.MM_p[j]=new Image; 
				d.MM_p[j++].src=a[i];
			}
		}
	}
}


/*This function is called when the header is loaded and it calls the functions
  that load the quicklinks and inner portal menus*.  Then it writes the menus*/
function LoadMenus() 
{
	LoadQuickLinksMenu();
	LoadInnerMenus();
	writeMenus();
}

function fwDoHide()
{
	if (!fwDHFlag) return;
	var elapsed = new Date() - fwStart;
	if (elapsed < 200) 
	{
		fwHideMenuTimer = setTimeout("fwDoHide()", 300-elapsed);
		return;
	}
	fwDHFlag = false;
	hideActiveMenus();
	
	//added by LS to make sure the select box doesn't unclip until the active menus are hidden
	setClipFlag(0); 
	window.ActiveMenuItem = 0;
} 

//inner menus
// they are now in _Includes/DropdownMenus.asp
// the function is: LoadInnerMenus()

function MM_findObj(n, d) { //v4.0
	var p,i,x;  
	if(!d) 
		d=document; 
	if((p=n.indexOf("?"))>0&&parent.frames.length) 
	{
    	d=parent.frames[n.substring(p+1)].document; 
		n=n.substring(0,p);
	}
  	if(!(x=d[n])&&d.all) 
		x=d.all[n]; 
	for (i=0;!x&&i<d.forms.length;i++) 
		x=d.forms[i][n];
  	for(i=0;!x&&d.layers&&i<d.layers.length;i++) 
		x=MM_findObj(n,d.layers[i].document);
  	if(!x && document.getElementById) 
		x=document.getElementById(n); 
	return x;
}


//  END  DHTML MENUS  ----------------------------------------------------

// CLIP  ---------------------------------------------
/*This function clips the form element if a dhtml menu will be dropping over it.
In many browsers, certain form elements, especially the <select> element, ignore z-layering.
This means that a dhtml menu will drop down BEHIND the form element, which is not a desired effect.
To fix this, the following function is called in the mouseover event, right after the showmenu function
is called.  It takes 2 parameters: the name of the div that the form element lives in and how much of it is 
necessary to clip (0 means the whole thing is clipped and with incrementally higher numbers, more of the 
element will show)*/
function fncClipSelectElement(clipNumber,direction){
	
	if (!ClipFlag)
		return

	divName="addressDropDown";

	if (isNew){
		var selectDiv = eval(docObj + "(divName)" + styleObj);
	}
	else if (isNS4 || isIE4){
		var selectDiv = eval(docObj + '.' + divName + styleObj);
	}
	else{
	}
	if (direction=='down')
		selectDiv.clip  = 'rect(auto auto ' + clipNumber + 'px auto)';
	else if (direction=='left')
		selectDiv.clip  = 'rect( auto ' + clipNumber + 'px auto auto)';
	/*Depending on what part of the div you want to clip is where the clipNumber is placed*/
} 

/*This function unclips the form element.  
It takes one parameter: the name of the div containing the form element*/
function fncUnClipSelectElement(){

	if (ClipFlag)
		return
	
	divName="addressDropDown";
	if (isNew){
		var selectDiv = eval(docObj + "(divName)" + styleObj);
	}
	else if (isNS4 || isIE4){
		var selectDiv = eval(docObj + '.' + divName + styleObj);
	}
	else{
	}
	selectDiv.clip  = 'rect(auto auto auto auto)';
}


function setClipFlag(flag){
	ClipFlag=flag;
}
//  END  CLIP  ----------------------------------------------------

browser = navigator.appName;
ie = "Microsoft Internet Explorer";
netscape = "Netscape";

function SetFormValue(formStr,field,value) {
	
	form=(MM_findObj(formStr))
	
	if (form) {
		if (null != (form.elements[field])) {
			if ((browser == netscape)&&(form.elements[field].type=='select-one')){
				sellength=form.elements[field].length;
				for (i=0; i< sellength; i++) {
					if (form.elements[field].options[i].value==value)
						form.elements[field].options[i].selected=true;
				}
			} 
			else 
				form.elements[field].value=value;
		}		
	}
}

function SubmitForm(formStr) {
	form=(MM_findObj(formStr))
	if(form) form.submit();
}

// campus management dropnav
browser = navigator.appName;
ie = "Microsoft Internet Explorer";
netscape = "Netscape";

//Declaring variables for setting and manipulating navigation
var navActive   //Name of active navigation
var timerID     //Timer variable

//Creating a custom object called nav with the methods "name" and "menuExist"
function nav(name) {
this.name = name;
}

//Array of all navigation objects with variables "name" and "menuExist"
//var linkcount
//linkcount = parseInt(document.links[linkcount].innerHTML);

navItem = new Array()
for (i=0;i<2;i++) {
navItem[i] = new nav('drop'+(i+1));
}

//Simple function to turn on a <DIV>
function showMenu(navInput) {
if (browser == netscape) {
document.layers['M' + navInput].visibility = 'show';
}
else if (browser == ie) {
document.all['M' + navInput].style.visibility = 'visible';
}
}
//Simple function to turn off a <DIV>
function hideMenu(navInput) {
if (browser == netscape) {
document.layers['M' + navInput].visibility = 'hide';
}
else if (browser == ie) {
document.all['M' + navInput].style.visibility = 'hidden';
}
}

function activateMenu(navInput) {
stopTimer()
for (i = 0; i < navItem.length; i++) {
if (navItem[i].name == navInput) {
  showMenu(navItem[i].name);
}
else {
  hideMenu(navItem[i].name);
}
}
}

function setTimer(navInput) {
for (i = 0; i < navItem.length; i++) {
if (navItem[i].name == navInput) {
  navActive = navItem[i].name;
  timerID = setTimeout('hideMenu(navActive)', 100);
}
}
}

function stopTimer() {
clearTimeout(timerID);
}

//td mouseover for nav
function cOn1(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#D4D2D2";
	}
}

function cOut1(td){
	if(document.getElementById||(document.all && !(document.getElementById))){
	td.style.backgroundColor="#F4F4F4";
	}
}
