function bookmark(url, description) {
	if (navigator.userAgent.indexOf("AOL") >= 0) {
			alert("Add this site to your Favorites.");
		}
	else if (navigator.appName=='Microsoft Internet Explorer' && navigator.appVersion.indexOf("Windows") >= 0) {
		window.external.AddFavorite(url, description);
		}
	else {
		if (navigator.appVersion.indexOf("Windows") >= 0) {
			alert("Hit CTRL+D to bookmark this site.")
			}
		else if (navigator.appVersion.indexOf("Mac") >= 0){
			alert("Hit Command + D to bookmark this site.")
			}
		else {
			alert("Add this site to your bookmark list.")
			}
		}
	}

function newWindow(URL, name, w, h, scroll) {
	var winl = (screen.width - w) / 4;
	var wint = (screen.height - h) / 4;
	props = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=1'
//	props = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=1,location=1,status=1'
	win = window.open(URL,name,props)
//	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}

function newWindow2(url,name,state,menu,scroll,resize,wide,high) {
	var str = "status=" + state + ",menubar=" + menu + ",scrollbars=" + scroll + ",resizable=" + resize + ",width=" + wide + ",height=" + high; 
	var win = window.open(url,name,str);
	}	

// ----------------------------------------------
// --------------- Rollovers ---------------
// ----------------------------------------------
image1 = new Image();
image1.src = "/images/nav_products_on.gif";

image2 = new Image();
image2.src = "/images/nav_kb_on.gif";

image3 = new Image();
image3.src = "/images/nav_downloads_on.gif";

image4 = new Image();
image4.src = "/images/nav_resources_on.gif";

image5 = new Image();
image5.src = "/images/nav_contact_on.gif";

function buttonOn (imgId) {
	if ( document.images ) {
		butOn = eval ( imgName + "_on.src" );
		document.getElementById(imgId).src = butOn;
		}
	}

function buttonOff ( imgId ){
	if ( document.images ) {
		butOff = eval ( imgName + "_off.src" );
		document.getElementById(imgId).src = butOff;
		}
	}



// ----------------------------------------------
// --------------- Dropdown Menus ---------------
// ----------------------------------------------

function showHand(id) {
	eval("document.getElementById(id).style.cursor = 'pointer'");	
	}

function toggleVisibility(id, state) {
	var hideid = "hide" + id;
	var url = document.URL;
	if (state=='show') {
		eval("document.getElementById(id).style.visibility = 'visible'");
		eval("document.getElementById(hideid).style.visibility = 'visible'");
		if(document.statemenu && id == 'products' && url.indexOf('correlations/index.asp') > 0)  {
			eval("document.statemenu.state.style.visibility = 'hidden'");
			}
		if(document.statemenu && id == 'downloads' && url.indexOf('correlations') > 0 && url.indexOf('correlations/index.asp') < 0)  {
			eval("document.statemenu.state.style.visibility = 'hidden'");
			}
		if(document.statemenu && id == 'resources' && url.indexOf('correlations') > 0 && url.indexOf('correlations/index.asp') < 0)  {
			eval("document.statemenu.state.style.visibility = 'hidden'");
			}
		}
	else if (state=='hide') {
		eval("document.getElementById(id).style.visibility = 'hidden'");
		eval("document.getElementById(hideid).style.visibility = 'hidden'");
		if(document.statemenu) {
			eval("document.statemenu.state.style.visibility = 'visible'");
			}
		}
	}
	
function hideMenus() {
	toggleVisibility("products", "hide");
	toggleVisibility("kb", "hide");
	toggleVisibility("downloads", "hide");
	toggleVisibility("resources", "hide");
	}

	
	
function clearBGcolors() {
	toggleBGcolor("reading", "off")
	toggleBGcolor("math", "off")
	toggleBGcolor("science1", "off")
	toggleBGcolor("social", "off")
	toggleBGcolor("esl", "off")
	toggleBGcolor("additional", "off")
	}

function toggleBGcolor(id, state, color) {
	if (state=='on') {
		eval("document.getElementById(id).style.backgroundColor = '#feac43'"); // orange
		eval("document.getElementById(id).style.cursor = 'pointer'");	
		}
	else {
		eval("document.getElementById(id).style.backgroundColor = '#edf5ff'"); // light blue
		eval("document.getElementById(id).style.cursor = 'auto'");	
		}
	}
	
	
	
	
