// global arcade common JavaScript
function describeLink(linkName)
{
	switch (linkName)
	{
	case "home":
		window.status = "Return to the Global Arcade home page"
		break
	case "games":
		window.status = "Play the Global Arcade games"
		break
	case "global":
		window.status = "An introduction to globalization and the issues"
		break
	case "alert":
		window.status = "Global Action alerts"
		break
	case "discuss":
		window.status = "Post your opinions!  Listen, debate, question, network"
		break
	case "dict":
		window.status = "Common terminology explained here"
		break
	case "faq":
		window.status = "Frequently Asked Questions about Global Arcade"
		break
	case "info":
		window.status = "Information and resources for students, teachers, activists and citizens"
		break
	case "support":
		window.status = "Having technical problems?  Click here."
		break
	default:
		window.status = "";
		document.images["hint"].src = eval("Ibuttons_blankh.src");
		return false;
	}
	
	if (document.images && document.images["hint"])
    	document.images["hint"].src=eval("Ibuttons_"+linkName+"h.src"); 
        
	return false;
}

function loadImages(relPath, section) 
{
if (document.images) 
{
	Ibuttons_global = new Image(58, 50);
	Ibuttons_global.src = relPath + 'image/nav/' + (section == 'global' ? 'global_down.gif' : 'global.gif');
	Ibuttons_globalo = new Image(58, 50);
	Ibuttons_globalo.src = relPath + 'image/nav/' + (section == 'global' ? 'global_down.gif' : 'global_over.gif');
	Ibuttons_globalh = new Image(166, 48);Ibuttons_globalh.src = relPath + 'image/hints/global.gif';
	
	Ibuttons_games = new Image(58, 51);
	Ibuttons_games.src = relPath + 'image/nav/' + (section == 'games' ? 'games_down.gif' : 'games.gif');
	Ibuttons_gameso = new Image(58, 51);
	Ibuttons_gameso.src = relPath + 'image/nav/' + (section == 'games' ? 'games_down.gif' : 'games_over.gif');
	Ibuttons_gamesh = new Image(166, 48);Ibuttons_gamesh.src = relPath + 'image/hints/games.gif';
	
	Ibuttons_dict = new Image(58, 49);
	Ibuttons_dict.src = relPath + 'image/nav/' + (section == 'dict' ? 'dict_down.gif' : 'dict.gif');
	Ibuttons_dicto = new Image(58, 49);
	Ibuttons_dicto.src = relPath + 'image/nav/' + (section == 'dict' ? 'dict_down.gif' : 'dict_over.gif');
	Ibuttons_dicth = new Image(166, 48);Ibuttons_dicth.src = relPath + 'image/hints/dict.gif';
	
	Ibuttons_faq = new Image(58, 50);
	Ibuttons_faq.src = relPath + 'image/nav/' + (section == 'faq' ? 'faq_down.gif' : 'faq.gif');
	Ibuttons_faqo = new Image(58, 50);
	Ibuttons_faqo.src = relPath + 'image/nav/' + (section == 'faq' ? 'faq_down.gif' : 'faq_over.gif');
	Ibuttons_faqh = new Image(166, 48);Ibuttons_faqh.src = relPath + 'image/hints/faq.gif';
	
	Ibuttons_info = new Image(58, 49);
	Ibuttons_info.src = relPath + 'image/nav/' + (section == 'info' ? 'info_down.gif' : 'info.gif');
	Ibuttons_infoo = new Image(58, 49);
	Ibuttons_infoo.src = relPath + 'image/nav/' + (section == 'info' ? 'info_down.gif' : 'info_over.gif');
	Ibuttons_infoh = new Image(166, 48);Ibuttons_infoh.src = relPath + 'image/hints/info.gif';
	
	Ibuttons_alert = new Image(58, 52);
	Ibuttons_alert.src = relPath + 'image/nav/' + (section == 'alert' ? 'alert_down.gif' : 'alert.gif');
	Ibuttons_alerto = new Image(58, 52);
	Ibuttons_alerto.src = relPath + 'image/nav/' + (section == 'alert' ? 'alert_down.gif' : 'alert_over.gif');
	Ibuttons_alerth = new Image(166, 48);Ibuttons_alerth.src = relPath + 'image/hints/alert.gif';
	
	Ibuttons_discuss = new Image(58, 51);
	Ibuttons_discuss.src = relPath + 'image/nav/' + (section == 'discuss' ? 'discuss_down.gif' : 'discuss.gif');
	Ibuttons_discusso = new Image(58, 51);
	Ibuttons_discusso.src = relPath + 'image/nav/' + (section == 'discuss' ? 'discuss_down.gif' : 'discuss_over.gif');
	Ibuttons_discussh = new Image(166, 48);Ibuttons_discussh.src = relPath + 'image/hints/discuss.gif';
	
	Ibuttons_supporth = new Image(166, 48);Ibuttons_supporth.src = relPath + 'image/template_00.gif';
	Ibuttons_blankh = new Image(166, 48);Ibuttons_blankh.src = relPath + 'image/template_00.gif';
}
}

function di(id,name){
  if (document.images) 
  {
      document.images[id].src=eval(name+".src"); 
  }
}

// function that displays status bar message

function dm(msgStr) {
  document.returnValue = false;
  if (document.images) { 
     window.status = msgStr;
     document.returnValue = true;
  }
}
var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";
function dmim(msgStr) {
  document.returnValue = false;
  if (showMsg) { 
    window.status = msgStr;
    document.returnValue = true;
  }
}

// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.
function launch(newURL, newName, newFeatures, orgName) {
  var remote = window.open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function launchGame(page, winname) {
  myRemote = launch(page, winname, "height=500,width=640,screenX=8,left=8,screenY=8,top=8,directories=0,menubar=1,location=0,resizable=1,scrollbars=1,status=1,titlebar=1,hotkeys=1,toolbar=0", "garcade");
  return false;
}
// end Athenia scripts
