

/* Popup & Help scripts (auto generated -- do not edit)
Copyright 2003-2005, Socratic Arts, http://www.socraticarts.com/
*/

function hidePopups(){
	var i;
	for(i=1;i<=getGlobal("numPopups");i++){
		hideObject(findObject("p" + i + "content"));
	}
}

function showPopup(id){
	var obj = findObject(id + "link");
	if(obj.className == "popupLinkDisabled") return(null);
	showPopup2(id + "content");
}

function showPopup2(id){
	hidePopups();
	showObject(id);
}

function activateLinks(type){
	var i;
	hidePopups();
	for(i=1;i<=getGlobal("numLinks");i++){
		var obj = findObject("p" + i + "link");
		if(obj.type == type){
			obj.className = "popupLinkEnabled";
		}
		else{
			obj.className = "popupLinkDisabled";
		}		
	}
}

function openKC(theURL){
	windowOpenAndFocus(theURL, 'KC', 'width=1000,height=600,left=10,top=50,scrollbars,location');
}


function hideHelpDiv(id){
	findObject("help" + id + "Link").className = "helpLinkOff";
}
	
setGlobal("helpLinkIDs", "");
function showHelpDiv(name){
   setObjectText("theHelp", "");
   map("hideHelpDiv", getGlobal("helpLinkIDs"));
   findObject(name + "Link").className = "helpLinkOn";
   if(browserInfo().NS){
	   showHelpDiv2(name + "Div");
	}
	else{
	   window.setTimeout("showHelpDiv2('" + name + "Div" + "')", 10);   
	}
}

function showHelpDiv2(name){
   setObjectText("theHelp", getObjectText(name));
}

function initHelp(){
   var helpID = getURLparam("helpID");
   if(helpID==null){
   		helpID = getGlobal("helpLinkFirstID");
   }
   showHelpDiv("help" + helpID);
}


