// Copyright Acro Media Inc. 1998-2003, www.acromediainc.com
graphicsDir = dirDepth+"graphics/nav/";
dirDepth = dirDepth+"";

// Setup global variables and Style settings for VER 4+ browsers
var imageNames;
var imageOver;
preloaded = 0;

NS4 = (document.layers) ? true : false;
IE4 = (document.all && !document.getElementById) ? true : false;
IE5 = (document.all && document.getElementById) ? true : false;
NS6 = (!document.all && document.getElementById) ? true : false;

isDom = (NS6 || IE5) ? true : false;

NS3 = (!NS4 && !IE4 && document.images) ? true : false;
IE3 = (!NS4 && !IE4 && !NS3 && (navigator.userAgent.indexOf("MSIE") != -1)) ? true : false;
NS2 = (!NS4 && !IE4 && !NS3 && !IE3 && !document.images) ? true : false;
isMac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false;

isGo = 0;
doc = (NS4) ? "document" : "document.all";
sty = (NS4) ? "" : ".style";

if(NS4 || isDom || (IE4 && !isMac)){
	defaultStyle = "<STYLE TYPE='text/css'>"
	+ ".obj {"
	+ "position:absolute;"
	+ "visibility:hidden;"
	+ "width:10;"
	+ "height:10;"
	+ "}"
	+ "</STYLE>";

	document.write(defaultStyle);
}

if (document.images) {
	imageNames = new initArray("button1", "button2", "button3", "button4", "button5", "button6", "button7", "button8");
	imageOver = new initArray("b_home_02.gif", "b_why_sacs_02.gif", "b_how_sacs_works_02.gif", "b_assess_success_02.gif", "b_get_sacs_02.gif", "b_events_02.gif", "b_about_us_02.gif", "b_contact_02.gif");

}

function preloadImages(){
	if(document.images){
		var i, temp;

		for(i=0; i<imageNames.length; i++){
			document.images[imageNames[i]].offsrc = document.images[imageNames[i]].src;
		}

		for(i=0; i<imageNames.length; i++){
			temp = new Image();
			temp.src = graphicsDir + imageOver[i];
			document.images[imageNames[i]].oversrc = temp.src;
		}
		preloaded = true;
	}
}

function initArray(){
      if (document.images) {
      this.length = initArray.arguments.length;
      for (var i=0;i<= this.length; i++)
         this[i] = initArray.arguments[i];
   }
}

function mouseOver(imageID) {
	if (document.images && preloaded) {
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].oversrc;
		hideMenu = 0;
		eval("show('menu"+imageID+"')");
	}
}

function mouseOut(imageID) {
	if (document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].offsrc;
		eval("hide('menu"+imageID+"')");
	}
}

if(NS4 || IE4) document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"menuinfo.js'><\/SCRIPT>");
if(NS4 || IE4 || isDom) document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"menuinfo.js'><\/SCRIPT>");
if(NS4){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"ns_menus.js'><\/SCRIPT>");
}
else if(IE4){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"ie_menus.js'><\/SCRIPT>");
}
else if(isDom){
	document.write("<SCRIPT LANGUAGE='JavaScript' SRC='"+dirDepth+"dom_menus.js'><\/SCRIPT>");
}

// open up

var newWin;

function openUp(windowURL, windowWidth, windowHeight) {
  var topPos = "";
  var leftPos = "";
  if(!windowWidth) windowWidth = 0;
  if(!windowHeight) windowHeight = 0;
  if(windowWidth == 0){
    if(screen){
      windowWidth = screen.availWidth -10;
    }
    else{
      windowWidth = 790;
    }
    leftPos = ",left=0";
  }
  if(windowHeight == 0){
    if(screen){
      windowHeight = screen.availHeight -30;
    }
    else{
      windowHeight = 790;
    }
    topPos = ",top=0";
  }

  newWin = window.open(windowURL,"acromedia","toolbar=no,menubar=0,width="+windowWidth+",height="+windowHeight+topPos+leftPos+",scrollbars=yes,resizable=yes");

  if(javascript_version > 1.0){
    setTimeout('newWin.focus();',100);
  }
}


function openUpDemo(windowURL, windowWidth, windowHeight) {
  var topPos = "";
  var leftPos = "";
  if(!windowWidth) windowWidth = 0;
  if(!windowHeight) windowHeight = 0;
  if(windowWidth == 0){
    if(screen){
      windowWidth = screen.availWidth -10;
    }
    else{
      windowWidth = 790;
    }
    leftPos = ",left=0";
  }
  if(windowHeight == 0){
    if(screen){
      windowHeight = screen.availHeight -30;
    }
    else{
      windowHeight = 790;
    }
    topPos = ",top=0";
  }

  newWin = window.open(windowURL,"acromediaDemo","toolbar=no,menubar=0,width="+windowWidth+",height="+windowHeight+topPos+leftPos+",scrollbars=no,resizable=yes");

	window.location="/demo/feedback.htm";

	if(javascript_version > 1.0){
		setTimeout('newWin.focus();',100);
	}
}

function openUpNoForward(windowURL, windowWidth, windowHeight) {
  var topPos = "";
  var leftPos = "";
  if(!windowWidth) windowWidth = 0;
  if(!windowHeight) windowHeight = 0;
  if(windowWidth == 0){
    if(screen){
      windowWidth = screen.availWidth -10;
    }
    else{
      windowWidth = 790;
    }
    leftPos = ",left=0";
  }
  if(windowHeight == 0){
    if(screen){
      windowHeight = screen.availHeight -30;
    }
    else{
      windowHeight = 790;
    }
    topPos = ",top=0";
  }

  newWin = window.open(windowURL,"acromediaDemo","toolbar=no,menubar=0,width="+windowWidth+",height="+windowHeight+topPos+leftPos+",scrollbars=no,resizable=yes");


	if(javascript_version > 1.0){
		setTimeout('newWin.focus();',100);
	}
}

function calcUp(windowURL, windowWidth, windowHeight) {
  var topPos = "";
  var leftPos = "";
  if(!windowWidth) windowWidth = 0;
  if(!windowHeight) windowHeight = 0;
  if(windowWidth == 0){
    if(screen){
      windowWidth = screen.availWidth -10;
    }
    else{
      windowWidth = 790;
    }
    leftPos = ",left=0";
  }
  if(windowHeight == 0){
    if(screen){
      windowHeight = screen.availHeight -30;
    }
    else{
      windowHeight = 790;
    }
    topPos = ",top=0";
  }

  newWin = window.open(windowURL,"acromedia","toolbar=no,menubar=0,width="+windowWidth+",height="+windowHeight+topPos+leftPos+",scrollbars=yes,resizable=no");

  if(javascript_version > 1.0){
    setTimeout('newWin.focus();',100);
  }
}
