

// Menu Stuff


window.onload= function(){

    activateMenu('nav'); //you only need one of these for each menu
    activateMenu('vertnav');
}

var ie = (document.all);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns4 = (document.layers);
var ns6 = (!document.all && document.getElementById);
var aol = (navigator.userAgent.indexOf('AOL') !=-1);
var opr = (navigator.userAgent.indexOf('Opera') != -1);
var pic_state;
var skn;
var slicefile = 1;
var status = "";
var status1 = "";
function loaded(){
 if (ie){
  skn=document.all.picci.style
 }
 else {
  skn=document.getElementById("picci").style
 }

}

var ua = navigator.userAgent;
var ual = ua.toLowerCase();
var brokenHover = ((ual.indexOf("msie") != -1) && (ual.indexOf("konqueror") == -1));
var mozPosBug = false;

// Fix for older Gecko
var bd = ua.match(/Gecko\/(\d+)/);
if (bd) { 
   try { 
      var d = new Date(bd[1].substr(0, 4), bd[1].substr(4,2), bd[1].substr(6,2));
      if (d <= new Date( 2003, 10, 18 )) {
         mozPosBug = true;
      }
   } catch (e) {}
}

// Fix for Firefox (which seems to have inherited older Gecko)
var bd = ua.match(/Firefox/);
if (bd) { mozPosBug = true; }


// Display the sub menu
function dSM( num ) {
   if (brokenHover) {
      var sm = document.getElementById('subMenu' + num);
      sm.style.display = "block";
   } else if (mozPosBug) {
      var sm = document.getElementById('subMenu' + num);
      sm.style.marginTop = "0";
   }
}

// Hide the sub menu
function hSM( num ) {
   if (!brokenHover) return;
   var sm = document.getElementById('subMenu' + num);
   sm.style.display = "none";
}


// Content placement




function show_content(div,file,text,status){

	status1 = status;
	if (file!=""){ var content= file; } else { var content= text; }
	if(ie){ 
		if (content == "<P></P>" || content == "") {	// blank element, IE style
			document.all(div).style.display = "none";
		} else {
			document.all(div).innerHTML=content; 
			document.all(div).style.display = "block";

		}
	}
	else { 
		if (content == "<p> </p>" || content == "") {	// blank element
			document.getElementById(div).style.display = "none";
		} else {
			document.getElementById(div).innerHTML=content; 
			document.getElementById(div).style.display = "block";
		}
	}

}


function getDiv(divName,divPlace){
	if (ie){ contents=document.all(divName).innerHTML; }
	else { contents=document.getElementById(divName).innerHTML }
	show_content(divPlace,'',contents);
}

function makePage(page) {

	getDiv("page"+page,"picci");
	getDiv("info"+page,"piccb");
	getDiv("turn"+page,"piccc");
	return false;

}
