/* author: DigitalPartyPhotos.Com */
/* Creation date: 3/11/2003 */
function showMenu(relPath) {
 var menuWidth = 580;
 var menuHeight = 404;
 var x = (screen.width - menuWidth)/2;
 var y = (screen.height - menuHeight)/2;
 window.moveTo(x,y);
 window.resizeTo(menuWidth,menuHeight);
 location = relPath;
}

var nav_menu,scrollIt;
var theTop = 10;
var old = theTop;
var scrollIt = true;
function init() {
 nav_menu = new getObj('nav_menu');	movemenu();
}

function movemenu() {
 if (scrollIt) {
  if (window.innerHeight) {
   pos = window.pageYOffset;
  }
  else if (document.documentElement && document.documentElement.scrollTop) {
   pos = document.documentElement.scrollTop;
  }
  else if (document.body) {
   pos = document.body.scrollTop;
  }
  if (pos < theTop) pos = theTop;
  else pos += 10;
  if (pos == old) {
   nav_menu.style.top = pos;
  }
  old = pos;
 }
 temp = setTimeout('movemenu()',50);
}

function getObj(name) {
 if (document.getElementById) {
  this.obj = document.getElementById(name);
  this.style = document.getElementById(name).style;
 }
 else if (document.all) {
  this.obj = document.all[name];
  this.style = document.all[name].style;
 }
 else if (document.layers) {
  this.obj = document.layers[name];
  this.style = document.layers[name];
 }
}

var PriorButton = 'open';
function toggleBoxOut() { // 1 visible, 0 hidden
 if (PriorButton == 'news') {
  var szDivID = 'news';
 }
 else if(PriorButton !== 'news') {
  var szDivID = 'open';
 }
 var iState = 1;
 PriorButton = szDivID;
 if(document.layers) {   //NN4+
  document.layers[szDivID].visibility = iState ? "show" : "hide";
 }
 else if(document.getElementById) {  //gecko(NN6) + IE 5+
  var obj = document.getElementById(szDivID);obj.style.visibility = iState ? "visible" : "hidden";
 }
 else if(document.all) {// IE 4
  document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
 }
}

function toggleBoxOn(szDivID) { // 1 visible, 0 hidden
 PriorButton = szDivID;
 var iState = 1;
 if(document.layers) {   //NN4+
  document.layers[szDivID].visibility = iState ? "show" : "hide";
 }
 else if(document.getElementById) {  //gecko(NN6) + IE 5+
  var obj = document.getElementById(szDivID);obj.style.visibility = iState ? "visible" : "hidden";
 }
 else if(document.all) {// IE 4
  document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
 }
}

function toggleBoxOff() { // 1 visible, 0 hidden
 var szDivID = PriorButton;
 var iState=0;
 if(document.layers) {   //NN4+
  document.layers[szDivID].visibility = iState ? "show" : "hide";
 }
 else if(document.getElementById) {  //gecko(NN6) + IE 5+
  var obj = document.getElementById(szDivID);obj.style.visibility = iState ? "visible" : "hidden";
 }
 else if(document.all) {// IE 4
  document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
 }
}

function resizeWindow (width,height) {
center=1;
 xposition=0; 
 yposition=0;
 if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
  xposition = (screen.availWidth - width) / 2;
  yposition = (screen.availHeight - height) / 2 + 36;
 }
 window.moveTo(xposition,yposition);
 window.resizeTo(width,height); 
}


function openContentWindow( pageToLoad, winName, center) {
 var width=580;
 var height=404;
 xposition=0; 
 yposition=0;
 if ((parseInt(navigator.appVersion) >= 4 ) && (center)) {
  xposition = (screen.availWidth - width) / 2;
  yposition = (screen.availHeight - height) / 2 + 36;
 }
 args = "width=" + width + "," 
 + "height=" + height + "," 
 + "location=0," 
 + "menubar=0,"
 + "resizable=1,"
 + "scrollbars=1,"
 + "status=0," 
 + "titlebar=0,"
 + "toolbar=0,"
 + "hotkeys=0,"
 + "screenx=" + xposition + ","  //NN Only
 + "screeny=" + yposition + ","  //NN Only
 + "left=" + xposition + ","     //IE Only
 + "top=" + yposition;           //IE Only
 window.open( pageToLoad,winName,args );
}

