
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
}

//  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 showCell(cellId)
{ 
	eval(cellId+'.bgColor="#FEF4DD"');
}

function hideCell(cellId)
{   
	eval(cellId+'.bgColor="#FEF4DD"');
}

function hideCell2(cellId)
{   
	eval(cellId+'.bgColor="#FEF4DD"');
}


function reSet(){
	eval(obj+".leftLayer"+innerLayer+".pInfo"+visibility+visible);
	position = eval(obj+".leftLayer"+posHeight) + 200;
	if (window.innerHeight > position) position = window.innerHeight-21;
	eval(obj+ ".leftLayer.clip.bottom = position-160");
	eval(obj+".leftLayer"+innerLayer+".pInfo"+posTop+" = position-180");
}

	if (isNav)
	{
		var i = 0;
		window.captureEvents(Event.MOUSEDOWN);
		window.onmousedown = hideAll;
	}


