////////////////////////////////////////////////
//  DHTML MENU BUILDER 2.5.126                //
//  (c)xFX JumpStart                          //
//  Registered to Roger Kerr                  //
//                                            //
//  Customized by Humaniz, Inc.               //
//  Salt Lake City, UT                        //
//  www.humaniz.com                           //
//  writen by Roger Kerr                      //
//  email: roger@humaniz.com                  //
////////////////////////////////////////////////

	var NSLayerCW = 0;
	var NSLayerCH = 0;

	var ParentMenu = '';
	var CurMenu = '';
	var tCmd = '';
	var cCmd = '';
	var AnimStep = 0;
	var as = 0;
	var DoFormsTweak = false;

	if ((frames.length==0) && IsMac) {
		frames.top = window;
	}
	var mFrame = eval(frames['top']);
	var cFrame = eval(frames['top']);

	var fx = 1;


	function HideAll() {
		if(!as) {
      for (i=0; i<Menus.length; i++) {
        if (Menus[i].getMenuItems() != null) 
          Hide(Menus[i].getName());
      }
		}
	}
  
  function Hide(menuId) {
    toggleImageOff(menuId);
    FormsTweak("visible");
    if(IE)
			var Menu = document.all[menuId].style;
		else if(NS)
			var Menu = document.layers[menuId];
    else if(NS6)
      var Menu = document.getElementById(menuId).style;
      
    with(Menu)
			visibility = "hidden";
		if(ParentMenu!='') {
			CurMenu = ParentMenu;
			ParentMenu = '';
			tCmd = '';
		} else {
			cCmd = '';
			CurMenu = '';
		}
    HoverOff(menuId);
	}

	function DoClear() {
		tCmd = '';
		ParentMenu = '';
		HideAll();
	}

	function Animate(menuId) {
		var r = '';
		var nw = nh = 0;
		switch(fx) {
			case 1:
				if(IE) r = "0 " + AnimStep + "% " + AnimStep + "% 0";
				if(NS) nw = AnimStep; nh = AnimStep;
				break;
			case 2:
				if(IE) r = "0 100% " + AnimStep + "% 0";
				if(NS) nw = 100; nh = AnimStep;
				break;
			case 3:
				if(IE) r = "0 " + AnimStep + "% 100% 0";
				if(NS) nw = AnimStep; nh = 100;
				break;
			case 0:
				if(IE) r = "0 100% 100% 0";
				if(NS) nw = 100; nh = 100;
				break;
		}
		if(IE)
			document.all[menuId].style.clip =  "rect(" + r + ")";
		if(NS)
			with(document.layers[menuId].clip) {
				width = NSLayerCW*(nw/100);
				height = NSLayerCH*(nh/100);
			}
		AnimStep += 20;
		if(AnimStep<=100)
			as = window.setTimeout("Animate('" + menuId + "')",25);
		else {
			window.clearTimeout(as);
			as = 0;
			AnimStep = 0;
		}
	}
	
	function FormsTweak(str) {
		if(DoFormsTweak)
			for(var i = 0; i <= (document.forms.length - 1); i++)
				document.forms[i].style.visibility = str;
	}

	function execURL(evt) {
    url = evt.currentNode.attributes.getNamedItem("hrefurl").nodeValue;
    tframe = document;
    execURL(url, tframe);
  }
  
  function execURL(url, tframe) {
		DoClear();
		window.setTimeout("execURL2('" + url + "', '" + tframe + "')", 100);
	}

	function execURL2(url, tframe) {
		tframe = rStr(tframe);
		var fObj = eval(tframe);
		url = rStr(url);
		if(url.indexOf("javascript")!=url.indexOf("vbscript"))
			eval(url);
		else if(url.indexOf("open:")!=-1)
      window.open(url.substring(url.indexOf(":")+1));
		else
			fObj.location.href = url;
	}

	function rStr(s) {
		s = xrep(s,"\x1E","'");
		s = xrep(s,"\x1D","\x22");
		s = xrep(s,"\x1C",",");
		return s;
	}

	function xrep(s, f, n) {
		var tmp = s.split(f);
		return tmp.join(n);
	}

  function toggleImageOn(name, noMenu) {
    if (noMenu) {
    	if(as) {
			  window.clearTimeout(as);
			  as = 0;
		  }
      DoClear();
    }
    img = document.images[name+"Image"];
    if ( img ) {
      imgSrc = img.src;
      if (imgSrc.indexOf("off.gif") != -1) {
        imgName = imgSrc.substring(0,imgSrc.indexOf("off.gif"));
        img.src = imgName + "on.gif";
      }
    }
  }

  function toggleImageOff(name) {
    img = document.images[name+"Image"];
    if ( img ) {
      imgSrc = img.src;
      if (imgSrc.indexOf("on.gif") != -1) {
        imgName = imgSrc.substring(0,imgSrc.indexOf("on.gif"));
        img.src = imgName + "off.gif";
      }
    }
  }

