
//this is the function to launch in the right size window
function WM_netscapeCssFix() {
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Taylor
    Author Email: taylor@wired.com
    Author URL: http://www.taylor.org/
    */

  // This part was inspired by Matthew_Baird@wayfarer.com
  // It gets around another unfortunate bug whereby Netscape 
  // fires a resize event when the scrollbars pop up. This 
  // checks to make sure that the window's available size 
  // has actually changed.
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape 
  // in use contains the bug; if so, it records the window's 
  // width and height and sets all resize events to be handled 
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()

if (document.layers) {
  visible = 'show';
  hidden = 'hide';
} else if ((document.all)||(document.getElementById)) {
  visible = 'visible';
  hidden = 'hidden';
}

function action(dont)
{
	//alert('hi');
	if (dont != 'ourwork')
	{
		hide('ourwork','menu');
	}
	if (dont != 'solutions')
	{
		hide('solutions','menu');
	}
	if (dont != 'aboutus')
	{
		hide('aboutus','menu');
	}
	if (dont != 'none')
	{
		reveal(dont,'menu');
	}
}
function action2(dont)
{
	//alert('hi');
	if (dont != 'ourwork')
	{
		hide('ourwork','menu');
	}
	if (dont != 'solutions')
	{
		hide('solutions','menu');
	}
	if (dont != 'aboutus')
	{
		hide('aboutus','menu');
	}
	if (dont != 'none')
	{
		reveal(dont,'menu');
	}
}

function hide(menu, parent) {
  if (document.layers) 
    daMenu = document.layers[menu];
  else if (document.all) 
    daMenu = document.all(menu).style;
  else if (document.getElementById != null)
    daMenu = document.getElementById(menu).style;
  
  daMenu.visibility = hidden;
  lastMenu = daMenu;
}

function reveal(menu, parent) {
  
  if (document.layers)    
    daMenu = document.layers[menu];
  else if (document.all) 
    daMenu = document.all(menu).style;
  else if (document.getElementById)
    daMenu = document.getElementById(menu).style;
  daMenu.visibility = visible;
  lastMenu = daMenu;
}

function toggle(menu, parent) {
  if (document.layers)    
    daMenu = document.layers[menu];
  else if (document.all) 
    daMenu = document.all(menu).style;
  else if (document.getElementById)
    daMenu = document.getElementById(menu).style;
  if (daMenu.visibility == visible) {
    daMenu.visibility = hidden;
  } else {
    daMenu.visibility = visible;
  }
  lastMenu = daMenu;
}

var lastItem = 'hold';

function menuItem(item){

  if (document.layers) 
  	{
    daLast = document.layers[lastItem];
    daItem = document.layers[item];
  	} 
  else if (document.all) 
  	{
    daLast = document.all(lastItem).style;
    daItem = document.all(item).style;
  	}
  else if (document.getElementById) 
  	{
    daLast = document.getElementById(lastItem).style;
    daItem = document.getElementById(item).style;
  	}
  daLast.visibility = hidden;
  daItem.visibility = visible;
  lastMenu.visibility = hidden;
  lastItem = item;
}


