var numMenus = 5;

function getStyleObject(objectId) {
// cross-browser function to get an object's style object given its id
if(document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) {	return document.all(objectId).style; }
else if (document.layers && document.layers[objectId]) { return document.layers[objectId]; } else { return false;}
}

function changeObjectVisibility(objectId, newVisibility) {
// get a reference to the cross-browser style object and make sure the object exists
var styleObject = getStyleObject(objectId);
if(styleObject) { styleObject.visibility = newVisibility; return true; } else { return false; }
}

function moveObject(objectId, newXCoordinate, newYCoordinate) {
// get a reference to the cross-browser style object and make sure the object exists
var styleObject = getStyleObject(objectId);
if(styleObject) {	styleObject.left = newXCoordinate;	styleObject.top = newYCoordinate; return true; } else { return false; }
}

function showMenu(menuNumber, eventObj) {
    //    alert(eventObj);
    hideAllMenus();
    var menuId = 'dhtml' + menuNumber;
    if(changeObjectVisibility(menuId, 'visible')) {
	var dhtmlTitle = getStyleObject('dhtmlTitle' + menuNumber);
	dhtmlTitle.backgroundColor = '';
	dhtmlTitle.color= '#F2D400';
	eventObj.cancelBubble = true;
	return true;
    } else {
	return false;
    }
}

function hideAllMenus() {
  for(counter = 1; counter <= numMenus; counter++) {
	changeObjectVisibility('dhtml' + counter, 'hidden');
	var dhtmlTitle = getStyleObject('dhtmlTitle' + counter);
	dhtmlTitle.backgroundColor = '';
	dhtmlTitle.color= '#FFFFFF';
  }
}

function showCountry(eventObj) {
  hideAllMenus();
  var styleObject = getStyleObject('dhtml5');
  if(styleObject) { styleObject.visibility = 'visible'; }
	eventObj.cancelBubble = true;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}