//  GLOBAL SCRIPTS

  var ie4 = document.all
  var ns6 = document.getElementById&&!document.all
  var ns  = navigator.userAgent.indexOf('Netscape') != -1 && navigator.userAgent.indexOf('Gecko') != -1
  var opr = navigator.userAgent.indexOf('Opera/') != -1 | navigator.userAgent.indexOf('Opera ') != -1;   // Opera identifying Opera or Other
  var moz = navigator.userAgent.indexOf('Gecko') != -1

if (self != top) top.location = self.location;

	// PRELOAD ICONS
icon0 = new Image();icon0.src = "images/icon_info.gif"
icon1 = new Image();icon1.src = "images/icon_info2.gif"
icon2 = new Image();icon2.src = "images/icon_zoom.gif"
icon3 = new Image();icon3.src = "images/icon_zoom2.gif"
icon4 = new Image();icon4.src = "images/icon_zoom_out.gif"
icon5 = new Image();icon5.src = "images/icon_zoom_out2.gif"
icon6 = new Image();icon6.src = "images/type_icon_print.gif"
icon7 = new Image();icon7.src = "images/type_icon_orig.gif"
icon8 = new Image();icon8.src = "images/type_icon_cards.gif"
icon9 = new Image();icon9.src = "images/type_icon_cards_small.gif"
icon10= new Image();icon10.src = "images/type_icon_keyfob.gif"

	//  IMAGE ROLLOVERS
function swapBg(mo,ab) {
 if (ab=='a'){
        mo.style.backgroundColor = '#f1ddba'
                 mo.style.cursor = 'pointer';}
 if (ab=='b'){
	mo.style.backgroundColor = '#ffffff'
	mo.style.cursor          = '';}
 if (ab=='a2'){
        mo.style.backgroundColor = '#fffff0'
                 mo.style.cursor = 'pointer';}
 if (ab=='b2'){
	mo.style.backgroundColor = '#f9edd7'
	mo.style.cursor          = '';}
 if (ab=='a3'){
        mo.style.backgroundColor = '#fffff0'
        mo.style.color           = '#7a3a02'
        mo.style.cursor          = 'pointer';}
 if (ab=='b3'){
	mo.style.backgroundColor = '#f9edd7'
        mo.style.color           = '#c58513'
	mo.style.cursor          = '';}
}

	//  DROPDOWN MENUS
//Adapted from SuckerTree Horizontal Menu - Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids= new Array('menu1')       //Enter id(s) of UL menus separated by commas
var adj ='';  adj=-2; if(ns){adj=199}

function submenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
   for (var t=0; t<ultags.length; t++){
    if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu
        ultags[t].style.top=ultags[t].parentNode.offsetHeight+adj+"px" //dynamically position first level submenus to be height of main menu item
//        ultags[t].parentNode.getElementsByTagName("a")[0].className="mainicon"
	}
	else{ //else if this is a sub level menu (ul)
        ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
        ultags[t].parentNode.getElementsByTagName("a")[0].className="subicon"
	}
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.visibility="visible"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
   }
  }
}

if (window.addEventListener)
window.addEventListener("load",submenus,false)
else if (window.attachEvent)
window.attachEvent("onload",submenus)
