// Redirect NN4 users to the Site map
if (document.layers) {
window.location.href = 'sitemap.html';
}
// Redirect IEWIN < 5.5 (Temp)
var version="";
temp=navigator.appVersion.split("MSIE"); // Retrieve the version after MSIE
version=parseFloat(temp[1]);
if ((navigator.userAgent.indexOf('Win') != -1) && (navigator.appName == "Microsoft Internet Explorer") && (version < 5.5)) {
window.location.href = 'sitemap.html';
} 
// Account for DOMs
var allDmaps = new Array("pacific", "africa", "asia", "latinam"); // stars
var allDmenus = new Array("pacificmenu", "africamenu", "asiamenu", "latinammenu", "pacificmenu2", "africamenu2", "asiamenu2"); // menus
var allDarrows = new Array("down01", "down02", "down03", "down04", "down05", "down06", "down07"); // nav arrows
// build string to identify the object
function getElem(layerName) {
return document.all ? document.all(layerName).style :
document.getElementById ? document.getElementById(layerName).style :
document.layers ? document.layers[layerName] :
null;
}
// forces IE6 PC to show the background Map
function makeVis() {
var el = getElem('base');
el.visibility = "visible";
}
// Change layer visibility, pass to change arrow state
function toggle(layerName,arrayName,arrowName) {
// Get the correct id string
var el = getElem(layerName);
if (el.visibility == "visible" || el.visibility == "show") {
el.visibility = "hidden";
if (arrowName) {
changeArrow(allDarrows,arrowName,'down');
}
} else {
el.visibility = "visible";
if (arrowName) {
changeArrow(allDarrows,arrowName,'up');
}
}
hideLayer(arrayName,layerName);	
}
// Call to change visibility etc.
function multiToggle(layerName, menuName, arrowName) {
toggle(menuName,allDmenus,arrowName);
toggle(layerName,allDmaps,'');
}
// hide Layer
function hideLayer(arrayName,layerName) {
for (i=0;i<arrayName.length; i++){
if (arrayName[i] != layerName) {
var el = getElem(arrayName[i]);
el.visibility = "hidden";
}
}
}
function changeArrow(arrayName,arrowName,upDown) {
if (upDown == 'up')  { // check the direction to set the arrow to
swapImage(arrowName,'','src','gfx/n-arrowup.gif');
} else {
swapImage(arrowName,'','src','gfx/n-arrowdown.gif');
}
var source = "gfx/n-arrowdown.gif";
for (i=0;i<arrayName.length; i++){
if (arrayName[i] != arrowName) {
swapImage(arrayName[i],'','src',source);
}
}
}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function swapImage(objName,x,theProp,theValue) { //v3.0
var obj = MM_findObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}
