var strtitle
//document.title="各位在线的朋友请注意，即将重启服务器，请几分钟后再试...."
strtitle=document.title
document.title=document.title+""
self.onError=null;

//if (self.location!=top.location){top.location.href=self.location; }
    
function PopOldFriend(){
	SubscibeWindow=window.open('/comm/login/OldFriend.htm','SomeWin','toolbar=no,scrollbars=no,menubar=no,left=100,top=60,width=400,height=360');
	SubscibeWindow.focus()
SubscibeWindow.focus();}



function Sorry()
{
alert("业务还没开展，真对不起，请您先在其它地方转转。");}

function Mother(){
	 alert("hello!");
	 window.open("http://alumni36755.alumni.chinaren.com/newclass3.jsp?schooluuid=641643")
}
       
function WinOpen(filename){
	//filename="http://www.100md.com"+filename
	NewWin=window.open(filename,'',"toolbar=0,location=0,status=0,menubar=0,resizable=1,scrollbars=1,top=0,left=0,width=780,height=547");
	NewWin.focus();
}

function xd(filename){
	if (filename!=""){
	if (filename=="*") {Sorry();}
	else
	{
	NewWin=window.open(filename,'','');
	NewWin.focus();
	}
	}
}

function Redirect(filename){
	if (filename!=""){
	if (filename=="*") {Sorry();}
	else
	{
	//top.location.href=filename;
	window.open(filename);
	}
	}
}

var temp;
function checkstatus(){
//window.status="中国科学院";
temp=setTimeout("checkstatus()",2000);
}
checkstatus()

function urlencode(str) {
//供行业搜索中用
	var ms = "%25#23 20+2B?3F<3C>3E{7B}7D[5B]5D|7C^5E~7E`60";
	var msi = 0;
	var i,c,rs,ts ;
	while (msi < ms.length) {

		c = ms.charAt(msi);
		rs = ms.substring(++msi, msi +2);
		msi += 2;
		i = 0;
		while (true)	{ 
			i = str.indexOf(c, i);
			if (i == -1) break;
			ts = str.substring(0, i);
			str = ts + "%" + rs + str.substring(++i, str.length);
		}
	}
	return str;
}

// 显示状态框
document.write("<div id='Busying' style='position:absolute; top:0; left:10; z-index:10; visibility:hidden'><table width=200 border=0 cellspacing=0 cellpadding=0><tr><td bgcolor=#ff9900><table width=100% height=40 border=0 cellspacing=2 cellpadding=0><tr><td bgcolor=#eeeeee align=center>中科院网，正在搜索, 请稍候...</td></tr></table></td></tr></table></div>")
function showBusying() {
	Busying.style.top=document.body.scrollTop+15
	//document.body.scrollTop+document.body.clientHeight-document.all.Busying.offsetHeight+15
	Busying.style.visibility="visible";
}
function hideBusying() {
	Busying.style.visibility="hidden";
}

function SetCookie(dataName,datavalue)
{
	var expireDate;
	expireDate = new Date;
		if (expireDate.getYear() < 100) {
			expireDate.setYear(expireDate.getYear() + 1900 + 1);
		} else {
			expireDate.setYear(expireDate.getYear() + 1);
		} 
var   nameString=dataName+"=" + datavalue + ";expires=" + expireDate.toGMTString() + ";";
document.cookie=nameString+";path=/";
return true;
}

function GetCookie(name){
	var cname = name + "=";               
	var dc = document.cookie;
	if (dc.length > 0) {              
		begin = dc.indexOf(cname);
		if (begin != -1) {           
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return unescape(dc.substring(begin, end));
			        }
	}
	return "";
}

var currentpos,timer; 
function initialize() 
	{ 
	timer=setInterval("scrollwindow()",10); 
	} 
function sc(){ 
	clearInterval(timer); 
	} 
function scrollwindow() 
	{ 
	currentpos=document.body.scrollTop; 
	window.scroll(0,++currentpos); 
	if (currentpos != document.body.scrollTop) 
	sc(); 
	} 
document.onmousedown=sc 
document.ondblclick=initialize 

function right() 
{
    if (window.event.button == 2 || window.event.button == 3)
    {
        //window.open ("/search/dir/index.htm");
        return false;
    }
   return true;
}
document.body.onmousedown=right


//收缩伸展段落
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
