
var buffer = new Array(5);
buffer[0] = null;
buffer[1] = null;
buffer[2] = null;
buffer[3] = null;
buffer[4] = null;

var isNav, isIE, isOld, active;

if (parseInt(navigator.appVersion) >= 4)
{
	if (navigator.appName == "Netscape")
    {
		isNav = true;
		obj="document.layers";
		innerLayersLength=".document.layers.length";
		innerLayer=".document.layers";
		posLeft=".left";
		posTop=".top";
		posWidth=".clip.width";
		posHeight=".clip.height";
		posHeight2=".clip.height";
		bgColor=".bgColor";
		visibility=".visibility";
		visible="='show'";
		visible_eng="show";
		invisible="='hide'";
		invisible_eng="hide";
	}

	else
	{
		isIE = true;
		obj="document.all";
		innerLayersLength=".children.length";
		innerLayer=".children";
		posLeft=".style.pixelLeft";
		posTop=".style.pixelTop";
		posWidth=".style.posWidth";
		posHeight=".style.pixelHeight";
		posHeight2=".clientHeight";
		bgColor=".style.backgroundColor";
		visibility=".style.visibility";
		visible="='visible'";
		visible_eng="visible";
		invisible="='hidden'";
		invisible_eng="invisible";
	}
}

else isOld = true;

function handleResize()
{
	location.reload()
	return false
}

if (isNav)
{
	window.captureEvents(Event.RESIZE)
	window.onresize = handleResize
}


//  Design functions
function hidePrev(menuId)
{
	var i = menuId;
	do
		{
			if (buffer[i] !=null)
			{
				eval(obj+'["'+buffer[i]+'"]'+visibility+invisible);
				buffer[i]=null;
			}
		} while (++i < buffer.length-1);
}

function showMenu(menuId,layerName)
{
	hidePrev(menuId)
	if (buffer[i] != layerName)
	{
		buffer[menuId] = layerName;
		eval(obj+'["'+layerName+'"]'+visibility+visible);
	}
}

function hideMenu(menuId,layerName)
{
	if (buffer[menuId] != layerName) eval(obj+'["'+layerName+'"]'+visibility+invisible);
}

function hideAll()
{
	if (!active)
	{
		var i=0;
		do
		{
			if (buffer[i] !=null)
			{
				eval(obj+'["'+buffer[i]+'"]'+visibility+invisible);
				buffer[i]=null;
			}
		} while (++i < buffer.length-1);
	}
}

function showLayer(layerName)
{
	eval(obj+'["'+layerName+'"]'+visibility+visible);
}


function hideLayer(layerName)
{
	eval(obj+'["'+layerName+'"]'+visibility+invisible);
}

function moveLayer(layerName,left,top)
{
	eval(obj+'["'+layerName+'"]'+posLeft+"="+left);
	eval(obj+'["'+layerName+'"]'+posTop+"="+top);
}

function DA_menuLink(selectObject, windowRef) {

  toURL = selectObject.options[selectObject.selectedIndex].value

  resetIndex = -1

  for (x = 0 ; x < selectObject.length ; x++) {

    if (selectObject.options[x].defaultSelected)  { resetIndex = x }

  }

  selectObject.selectedIndex = resetIndex

  if (toURL) {

    if (windowRef == 'blank'  ||  (windowRef == 'window.opener'  &&  (!window.opener || window.opener.closed))) {

      window.open(toURL)

    }

    else {

      eval(windowRef + ".location.href = toURL")

    }

  }

}
