function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } }
function doDefault(theText) { if (theText.value == "") { theText.value = theText.defaultValue } }


var OldList;
function ListMenu(){
	var menu = document.getElementById("menuAll");
	var items = menu.getElementsByTagName("li");
	
	for (var i=0; i<items.length; i++)
	{
			if( items[i].parentNode.className == "menu_list" )
			{
				var span = items[i].getElementsByTagName("span");
				if ( span[0] ) span[0].onclick=function ()
				{
					//if ( OldList &&  OldList != this) OldList.parentNode.className = "";
					if (this.parentNode.className == "" || this.parentNode.className == "last" )
						{
							if( this.parentNode.className == "last" )this.parentNode.className = "selectlast";
																else this.parentNode.className = "select";
						}
							 else 
						{
							if( this.parentNode.className == "selectlast" )this.parentNode.className = "last";
																	  else this.parentNode.className ="";
						}
						
					OldList = this;	
					
				}
			}
	}
}



var oldDiv, oldHeader;
function HideNewsBlock( td, div, box )
{
	if( !oldDiv )
	{
		allBlock = document.getElementById( box );
		var blocks = allBlock.getElementsByTagName('div');
		
		for( var i=0;i<blocks.length;i++ )
		{
			if( blocks[i].className == 'tab_descript' )
			{
				if( blocks[i].style.display == '' )oldDiv = blocks[i];
			}
		}
		
		allBlock = document.getElementById( 'inset_header' );
		blocks = allBlock.getElementsByTagName('td');
		
		for( var i=0;i<blocks.length;i++ )if( blocks[i].className == 'active tab' )oldHeader=blocks[i];
	}
	
	if( oldDiv )
	{
		oldDiv.style.display = 'none';
		if( oldHeader.className =='active' )oldHeader.className = 'last';
			else oldHeader.className = 'tab';
	}
	var newDiv = document.getElementById( div );

	newDiv.style.display = '';
	td.className = td.className + " active";
	
	oldDiv = newDiv;
	oldHeader = td;	
	return false;
}





























