// <![CDATA[
if (document.getElementById) {
	document.write("<style type='text/css' media='screen'>.listitemcontent { display: none }</style>");
}
var old_menu;
function ToggleListItem(whichLayer)
{
    var style2 = document.getElementById(whichLayer).getElementsByTagName("div")[0].style;
    var style3 = document.getElementById(whichLayer).getElementsByTagName("a")[0].style;
    style2.display = style2.display? "":"block";
   // style3.color = style3.color? "":color1;
    //style3.backgroundColor = style3.backgroundColor? "":color2;
    
    if (old_menu && old_menu != whichLayer) {
    	document.getElementById(old_menu).getElementsByTagName("a")[0].style.color = "";
    	document.getElementById(old_menu).getElementsByTagName("a")[0].style.backgroundColor = "";
    	document.getElementById(old_menu).getElementsByTagName("div")[0].style.display = "";
    }
    old_menu = whichLayer;
}

function ToggleOverlay(imageSource, bu)
{	
	//visible area
	if( window.innerHeight ) {
		//standarts
		var yheight = window.innerHeight;
	} else if ( document.documentElement.clientHeight ) {
		//ie6/win
		var yheight = document.documentElement.clientHeight;
	} else if ( document.body.clientHeight ) {
		//ie5/mac
		var yheight = document.body.clientHeight;
	} else {
		var yheight = 999;
	}
	// don't cover the head on large screens
	if ( yheight < 660 ) {
		var top = 0;
	} else {
		var top = 150;
	}
	//scrolled down?
	if( window.pageYOffset ) {
		//standarts	
		var ypos = window.pageYOffset;
	} else if ( document.documentElement.scrollTop ) {
		//ie6/win
		var ypos = document.documentElement.scrollTop;
	} else if ( document.body.scrollTop ) {
		//ie5/mac
		var ypos = document.body.scrollTop;
	} else {
		var ypos = 0;
	}
	//move overlay
	if ( ypos > top ) {
	ypos += "px"
	}  else {
	ypos = top + "px";
	}
	document.getElementById('overlay_bu').firstChild.nodeValue = bu;
    if (document.getElementById)
    {
        // this is the way the standards work
        image = document.getElementById('overlay_image');
        if( image.loaded ) {
        	image.src = "";
        	image.loaded = false;
        } else {
        	image.src = imageSource;
        	image.loaded = true;
        }
        var styleo = document.getElementById('overlay').style;
        var styleb = document.getElementById('overlay_background').style;
        styleo.display = styleo.display? "":"block";
        styleo.top = ypos;
        styleb.display = styleb.display? "":"block";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var styleo = document.all['overlay'].style;
        var styleb = document.all['overlay_background'].style;
        styleo.display = styleo.display? "":"block";
        styleo.top = ypos;
        styleb.display = styleb.display? "":"block";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var styleo = document.layers['overlay'].style;
        var styleb = document.layers['overlay_background'].style;
        styleo.display = styleo.display? "":"block";
        styleo.top = ypos;
        styleb.display = styleb.display? "":"block";
        }
}

function ToggleLayer(whichLayer)
{
    if (document.getElementById)
    {
        // this is the way the standards work
        var style2 = document.getElementById(whichLayer).style;
        style2.display = style2.display? "":"block";
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        var style2 = document.all[whichLayer].style;
        style2.display = style2.display? "":"block";
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        var style2 = document.layers[whichLayer].style;
        style2.display = style2.display? "":"block";
    }
}

// ]]>// JavaScript Document