//main javscript functions
function openSubWindow(page,w,h){
	if(page){
		window.open('subpage.php?p='+page,'subWin','status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height='+h+',width='+w);
		return false;
	}else{
		return true;
	}
}

//menu arrays
var schools = new Array()
schools[0] = '<a href="http://www.finneytown.org/schools.php?p=brent">Brent</a>'
schools[1] = '<a href="http://www.finneytown.org/schools.php?p=whitaker">Whitaker</a>'
schools[2] = '<a href="http://www.finneytown.org/schools.php?p=middle">Middle School</a>'
schools[3] = '<a href="http://www.finneytown.org/schools.php?p=high">High School</a>'//<a href="schools.php?school=secondary">Secondary Campus</a>'
var studentParent = new Array()
studentParent[0] = '<a href="https://pbaccess.hccanet.org/General/District.aspx?__EVENTTARGET=_ctl14">Progress Book</a>'
studentParent[1] = '<a href="http://www.finneytown.org/payschools.php">PaySchools</a>'
studentParent[2] = '<a href="http://www.finneytown.org/forms.php">Forms</a>'
studentParent[3] = '<a href="http://www.finneytown.org/announcements.php" style="font-size:11px;">HS/MS Announcements</a>'
studentParent[4] = '<a href="http://www.finneytown.org/blogs/">Staff Blogs</a>'
studentParent[5] = '<a href="http://band.finneytown.org/">Band</a>'
studentParent[6] = '<a href="http://theater.finneytown.org/">Theater</a>'
studentParent[7] = '<a href="http://web.mac.com/larawalker/FinneytownLMC/Home.html">Media Center</a>'
studentParent[8] = '<a href="http://www.finneytown.org/wellness.php">Wellness Center</a>'
var staff = new Array()
staff[0] = '<a href="http://www.hccanet.org/">H/CCA</a>'
staff[1] = '<a href="http://www.hcsecu.com/">Credit Union</a>'
staff[2] = '<a href="http://mail.hccanet.org/exchange">Mail Log-in</a>'
staff[3] = '<a href="https://pb.hccanet.org/General/LoginForm.Aspx">Progress Book</a>'
staff[4] = '<a href="http://www.finneytown.org/admin/">Blog Login</a>'
staff[5] = '<a href="http://intranet.finneytown.org/">Intranet Login</a>'
staff[6] = '<a href="http://www.publicschoolworks.com/pages/training.asp?di=218&mi=5">PublicSchool Works</a>'
//menu functions
document.write('<div id="dropMenu" style="visibility: hidden; z-index: 50;" onMouseOver="keepDropMenu();" onMouseOut="hideDropMenu();"></div>')
function showDropMenu(obj, data, objDivWidth, loc, offset){
	var objLeft = objTop = 0;
	if (obj.offsetParent) {
		objLeft = obj.offsetLeft
		objTop = obj.offsetTop
		objHeight = obj.offsetHeight
		objWidth = obj.offsetWidth
		while (obj = obj.offsetParent) {
			objLeft += obj.offsetLeft
			objTop += obj.offsetTop
		}
	}
	if(loc == 'side'){
		objLeft += objWidth;
	}else{
		objTop += objHeight;
	}
	if(drop = document.getElementById('dropMenu')){
		drop.innerHTML = data.join("");
		drop.style.width = objDivWidth;
		if(offset){
			drop.style.left = Math.floor(objLeft+offset) + 'px';
		}else{
			drop.style.left = objLeft + 'px';
		}
		drop.style.top = objTop + 'px';
		drop.style.visibility = 'visible';
	}
}
function keepDropMenu(){
	document.getElementById('dropMenu').style.visibility = 'visible';
}
function hideDropMenu(){
	document.getElementById('dropMenu').style.visibility = 'hidden';
}