function msover(img,ref){document.images[img].src = ref;}
function msout(img,ref){document.images[img].src = ref;} 
function getObject(obj) {return document.getElementById(obj) }
function show(obj) { var theObj = getObject(obj) 
theObj.style.visibility = "visible" }
function hide(obj) { var theObj = getObject(obj) 
theObj.style.visibility = "hidden" } 

// ******** locatewindow ********
// Locates the submenu
function locatewindow(obj)
{
	// ** Set x position
//	alert(parent.window.event.x);
//	alert(obj.event.x);
//	alert(obj.className);
//	temp = obj.className;
//	temp2 = temp & "temp";
//	obj.className = temp2;
//	alert(window.event.x);
//	obj.className= temp;
//	alert(window.event.x);
//	alert(GeneralInformationLink.window.event.x);



	obj.style.left=parent.window.event.x-25;
	// If Menu will scroll past right side of page, push back in
	if (obj.style.left.substring(0,obj.style.left.indexOf("p")) > (getWidth()-250-30)) {
		obj.style.left = getWidth() - 250 - 30;
	}
	
	// ** Set y position
	if (parent.window.event.y < 107 - document.body.scrollTop) {
		obj.style.top = 103 + document.body.scrollTop - document.body.scrollTop;  
	} else if (parent.window.event.y < 125 - document.body.scrollTop) {
		obj.style.top = 121 + document.body.scrollTop - document.body.scrollTop; 
	}
}

// ****** getWidth **********
// Gets the width of the browser window
function getWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }
 return myWidth;
}

// ****** getHeight **********
// Gets the height of the browser window
function getHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }
 return myHeight;
}

// For side menu, if too far down, bring up
// 40 is thrown in so the top of the submenu will be adjusted to be a line above the menu item selected
// Throw each item in the else section so if body is high enough, the pixels can be realigned to their
// original values.
function locateWindowHeight(obj) {

	if ((obj.clientHeight + parent.window.event.y - 40) > getHeight()) {
		obj.style.top = getHeight() - obj.clientHeight - 5 + document.body.scrollTop;
	} else {
		if (obj.className == 'LSUHSCStudentInsuranceInformationSMC') {
			obj.style.top = 398;
	}
}
}

function msover2(img1,ref1,img2,ref2){document.images[img1].src = ref1; document.images[img2].src = ref2;}
function msout2(img1,ref1,img2,ref2) {document.images[img1].src = ref1; document.images[img2].src = ref2;}
