function so11() {

}
TimeoutSECOND = 1
step=5
tree=0
menuname='menu';
hidden_object='hidden';
menucount=0;
function set_ul_menu(){
	if(navigator.appName == "Netscape"){
	var e=document.getElementsByTagName('*');
  for (var i=0,l=e.length;i<l;i++) e[i].sourceIndex=i;
		}
//	alert(1);
	obj = document.getElementsByTagName("ul");
	for (var i = 0; i < obj.length; i++){
			if (obj[i].className == menuname){
				obj[i].onclick = function(){tree=1};
				set_cursor(obj[i])
				menucount=i;
			}
	}
	stt=get_cookie("menu2");
	//	alert(get_cookie("menu2"));
	openmenu2(stt);
	//alert(111);
}
function set_cursor(obj){
	obj1 = obj.getElementsByTagName("li");
	if (obj1.length != 0 ){
		for (var i = 0; i < obj1.length; i++){
			if (obj1[i].getElementsByTagName("ul").length > 0 ){
				obj1[i].style.cursor='pointer';
			}else{
				obj1[i].style.cursor='text';
			}
		}
	}
}

function change(obj){
	if (tree==1){
		if(navigator.appName == "Netscape"){
			obj2=obj.target
		}
		 if(navigator.appName == "Microsoft Internet Explorer"){
			obj2=event.srcElement
		}
			obj3=obj2.getElementsByTagName("ul");
			myobj = document.getElementsByTagName("ul");
			if (obj3.length != 0 ){
				obj3 = obj2.getElementsByTagName("ul")[0];
				obj3.style.overflow= 'hidden';
				if (obj3.className==hidden_object && obj3.stat != 'open'){obj3.stat='close';objHeight=0;}
				if (!obj3.stat){obj3.stat='open';}
				if (obj3.stat == 'open'){
					obj3.stat = 'close'
					close_menu(obj3);
					getindex(myobj[menucount]);
				}else{
					obj3.stat = 'open';
					obj3.style.display = 'block';
					pre_objHeight =  parseInt(obj3.offsetHeight);
					obj3.style.height= 'auto';
					obj3.maxHeight = parseInt(obj3.offsetHeight);
					obj3.style.height = pre_objHeight;
					
					//document.cookie ="menu2="+(myobj[menucount].sourceIndex);
					//alert(1);
					open_menu(obj3)
					//document.getElementById("menu22").innerHTML=get_cookie("menu2");
				//	alert(1);
					getindex(myobj[menucount]);
					//alert(1);
				}
			}
	tree=0;
	}
}

function close_menu(obj){
if (!obj.style.height){
	objHeight = parseInt(obj.offsetHeight);
}else{
	objHeight = parseInt(obj.style.height);
}
	if (obj.stat == 'close'){
		objHeight = objHeight - step
		if (objHeight > 1){
			obj.style.height = objHeight + 'px';
			var myTime=setTimeout(function(){close_menu(obj)}, TimeoutSECOND);
		}else{
			obj.style.display = 'none'
		}
	}
}
function open_menu(obj){
	if (obj.stat == 'open'){
		objHeight = objHeight + step
		obj.style.height = objHeight + 'px'; 
		if (parseInt(obj.style.height) < obj.maxHeight){
			var myTime=setTimeout(function(){open_menu(obj)}, TimeoutSECOND);
		}else{
			obj.style.height= '';
			obj[i].style.display="1";
		}
	}
}
document.onclick = change;

function setheader(){
//alert(2);
//opena('');
obj = document.getElementsByTagName("center");
	for (var i = 0; i < obj.length; i++){
			if (obj[i].className == 'tb2')
			{
				document.getElementById("headertitle").innerHTML=obj[i].innerHTML;
				obj[i].innerHTML="";
				break;
			}
	}
}
function getindex(obj2)
{
obj=obj2.getElementsByTagName('*')
stt="";
for (var i = 0; i < obj.length; i++)
	{
			if (obj[i].style.display == 'block')
			{
				var lin2=document.all[obj[i].sourceIndex];
				stt=obj[i].sourceIndex+","+stt;
				lin3=lin2.getElementsByTagName('*');
				for(var j=0;j<lin3.length;j++)
				{
					if(lin3[j].style.display == 'block')
					{
						stt=obj[i].sourceIndex+","+stt;
					}
				}
			}
	}	
	setCookie('menu2',stt,10);
//	document.cookie ="menu2="+stt;
//		alert(stt);
}
function openmenu2(st)
{
	if(st!=null)
	{
		var stt2=st.split(",");
		for(l=0;l<stt2.length-1;l++)
		{
			myobj4 = get(stt2[l]);
			myobj4.stat = 'open';
			myobj4.style.display = 'block';
		}
//	alert(obj.style.display);
	}
}
function get(k)
{
	obj = document.getElementsByTagName("*");
	for (var i = 0; i < obj.length; i++)
			if (obj[i].sourceIndex == k)
			{
			return obj[i];
			}
}
function opena(lin)
{
	if(navigator.appName == "Netscape"){
	var e=document.getElementsByTagName('*');
  for (var i=0,l=e.length;i<l;i++) e[i].sourceIndex=i;
		}
//	alert(1);	
	obj = document.getElementsByTagName("a");
	//alert(lin);
	for (var i = 0; i < obj.length; i++)
	{
//			alert(obj[i].href);
			if (obj[i].href.split("#")[0] == lin)
			{
//				alert(obj[i].sourceIndex);
//				obj[i].style.display='';
				var lin2=document.all[obj[i].sourceIndex];
				lin3=lin2.parentNode.getElementsByTagName('*');
//				lin3=lin2.childNodes;
				
				for(var j=0;j<lin3.length;j++)
				lin3[j].style.display='';
			}
	}
}
function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setMinutes(exdate.getMinutes()+271);
//	alert(exdate.toGMTString());
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}
function istree(obj)
{
alert(obj);
obj3=obj;
alert(obj3);
	for(var i=0;i<4;i++)
	{
		if(obj3.className==menuname)
			return true;
		else
			obj3=obj.parent;
	}
	return false;
		
}
function funct2()
{
	
alert(1);	
}
