function $(obj){return (document.getElementById(obj));}
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

var h_timer=null;
function overmenu(o,c){
	var s = $('subNav').getElementsByTagName("OL");
	for(var i=0;i<s.length;i++) s[i].className="hidden";
	s[c].className="";
}

function outmenu(o){h_timer = setTimeout(""+o.id+".className='hidden'",1000);}

function out(o){h_timer=setTimeout("outmenu("+o.id+")",500);}
function over(){if(h_timer)clearTimeout(h_timer);}


function nprint() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
}


function getURL(c){	$("searchform").action = c==0?"/news/index.asp":"/project/index.asp";}

//滑动
function slideLine(ul, delay, speed, lh) {
	var slideBox = (typeof ul == 'string')?document.getElementById(ul):ul;
	var delay = delay||1000, speed=speed||20, lh = lh||50;
	var tid = null, pause = false;
	var start = function() {tid=setInterval(slide, speed);}
	var slide = function() {
		if (pause) return;slideBox.scrollTop += 2;
		if (slideBox.scrollTop % lh == 0) {
			clearInterval(tid);
			slideBox.appendChild(slideBox.getElementsByTagName('ol')[0]);
			slideBox.scrollTop = 0;
			setTimeout(start, delay);
		}
	}
	slideBox.onmouseover=function(){pause=true;}
	slideBox.onmouseout=function(){pause=false;}
	setTimeout(start, delay);
}

