		window.addEvent('domready', function() 
		{
			$('topmenu').getChildren('li').each(function(el)
			{
				var submenu = el.getElement('ul.submenu');
				if ($defined(submenu))
				{
					//submenu.setStyle('width', (el.offsetWidth));
					el.addEvent('mouseenter', function()
					{
						submenu.setStyle('display', 'block');
					});
					el.addEvent('mouseleave', function()
					{
						submenu.setStyle('display', 'none');
					});
				}
			});
		});	
		function SetCookie(cookieName,cookieValue,nDays) {
			 var today = new Date();
			 var expire = new Date();
			 if (nDays==null || nDays==0) nDays=1;
			 expire.setTime(today.getTime() + 3600000*24*nDays);
			 document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString();
			 window.location.href=window.location.href;
		}
		var m_iInterval;
		var m_Height;
		//window.onload = wl;
		var iScroll=0;

		var arrLinks;
		var arrTitles;
		var arrStext;

		var arrCursor = 0;

		var arrMax;
		//window.onload=wl;
		function wl() {
		  m_iInterval = setInterval(ontimer, 10);
		  var base = document.getElementById("jump_base");

		  m_Height = base.offsetHeight;

		  var divi = parseInt(m_Height/5);
		  m_Height = divi*5;

		  var td1 = document.getElementById("td1");
		  var td2 = document.getElementById("td2");
		  var td3 = document.getElementById("td3");
		  td1.height = m_Height-5;
		  td2.height = m_Height-5;
		  td3.height = m_Height-5;

		  arrLinks = new Array();
		  arrTitles = new Array();
		  arrStext = new Array();

		  setupLinks();
		  arrMax = arrLinks.length-1;
		  setLink();
		}
		function setLink() {
		  var ilink = document.getElementById("jump_link");
		  var stext = document.getElementById("stext");
		  stext.innerHTML = arrStext[arrCursor];
		  ilink.innerHTML = arrTitles[arrCursor];
		  ilink.href = arrLinks[arrCursor];
		}
		function ontimer() {
		  var base = document.getElementById("jump_base");
		  iScroll+=5;
		  if (iScroll>(m_Height*2)) {
		    iScroll=0;
		    arrCursor++;
		    if (arrCursor>arrMax)
		      arrCursor=0;
		    setLink();
		  }
		  if (iScroll==m_Height) {
		    pause();
		    m_iInterval = setTimeout(resume, 4000);
		  }
		  base.scrollTop=iScroll;
		}
		function pause() {
		  clearInterval(m_iInterval);
		}
		function resume() {
		  m_iInterval = setInterval(ontimer, 5);
		}
		
		function fitWin(){
			var s = $('overall').getCoordinates();
			var size=s.bottom;//document.getElementsByTagName('body')[0].offsetHeight;
			var asd=window.getSize();
			
			//alert(asd.y+"-"+size);
			if(asd.y>size){
				$('rights').style.height=asd.y-size+35+"px";
			}
			//alert(asd.y);//
			//alert(asd.y+">"+size);//
		}
		function openClose(id){
			if($(id).style.display !=""){
				$(id).style.display=$(id).style.display=='block'?'none':'block';
			}else
				$(id).style.display='block';
			return false;
		}
		var timer=new Array();
		var browser = navigator.appName;
		function scroller(asd,aaa){
			var thediv=document.getElementById(asd);
				if(aaa==document.getElementById(asd).scrollTop)
					thediv.scrollTop=0;
				aaa=thediv.scrollTop;
				thediv.scrollTop+=1;
			timer[asd]=setTimeout("scroller('"+asd+"','"+aaa+"')",20);
		}
		function stopscroller(asd2){
			clearTimeout(timer[asd2]);
		}
		//window.onresize=fitWin;
