var strtitle
strtitle=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){
	//filename="http://www.100md.com"+filename
	if (filename!=""){
	if (filename=="*") {Sorry();}
	else
	{
	NewWin=window.open(filename,'','');
	NewWin.focus();
	}
	}
}

function Redirect(filename){
	//filename="http://www.100md.com"+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:500; 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()",1000); 
} 

function sc(){ 
	clearInterval(timer); 
} 

function scrollwindow() 
	{ 
	currentpos=document.body.scrollTop; 
	window.scroll(0,++currentpos); 
	if (currentpos != document.body.scrollTop) 
	sc(); 
	} 
document.onmousedown=sc 
//document.onmousedown=right
document.ondblclick=initialize 


function OpenImg(ImgPath,ImgNo){
	//NewWin=window.open(unescape(ImgPath),'',"toolbar=0,location=0,status=0,menubar=0,resizable=1,scrollbars=1,top=50,left=100");
	NewWin=window.open('/showimg.asp?n='+ImgNo+'&p='+ImgPath,'',"toolbar=0,location=0,status=0,menubar=0,resizable=1,scrollbars=1,top=50,left=100");
	NewWin.focus();
}

function WriteMoreRelation(theKeyword){
 document.write("<div align=right><font color=#008040>☆</font><a href='/search/100md.asp?stype=b&keyword="+theKeyword+"' target=_blank>更多文章</a>&nbsp;&nbsp;")
 document.write( "<font color=#008040>☆</font><a href='/search/100md.asp?stype=r&keyword="+theKeyword+"' target=_blank class=tl >相关栏目</a>&nbsp;&nbsp; ")
 document.write(  "<font color=#008040>☆</font><a href='/search/100md.asp?stype=h&keyword="+theKeyword+"' target=_blank class=tl>相关图片</a>&nbsp;&nbsp;")
 document.write(  "<font color=#008040>☆</font><a href='/search/100md.asp?stype=d&keyword="+theKeyword+"' target=_blank class=tl>相关网站</a>&nbsp;&nbsp;")
 document.write(  "<font color=#008040>☆</font><a href='/search/100md.asp?stype=c&keyword="+''+"' target=_blank class=tl>相关网页</a>")
  }
//相关网页中 theKeyword 暂时屏避

function doPrint() {
	if (window.print) {
		var p_TableTrue = document.all.p_TableTrue.innerHTML;
		if (p_TableTrue != '') {
		document.all.p_Table.innerHTML = '<center><table width="700" border="0" cellspacing="0" cellpadding="0"><tr><td align="center" valign="top" class="bgc_whiter">  ' + p_TableTrue + '</td>  </tr> </table></center><div align=center id="p_TableTrue"></div>';
	}
	window.print();
	}
}







function rb(str) {
	var tmpstr='';
	for (var i=0;i<str.length;i++) if ((str.charAt(i)!=' ')&&(str.charAt(i)!='\t')) tmpstr=tmpstr+str.charAt(i);
	return tmpstr;
}
function chkLogin(){
	var NameValue=rb(document.aaaform.userid2.value);
	//alert(NameValue);
	if (NameValue.length == 0) {alert('请输入您的编号！');document.aaaform.userid2.focus();return false;}
	var PassValue=rb(document.aaaform.password2.value);
	if (PassValue.length == 0) {alert('请输入您的密码！');document.aaaform.password2.focus();return false;}
	document.aaaform.userid.value=NameValue;document.aaaform.password.value=PassValue;
	//document.aaaform.userid2.value="";
	document.aaaform.password2.value="";
	return true;
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function navOn(x,l)
{
	x.className='nav'+l+'CellOn';
}

function navOff(x,l)
{	
	x.className = 'nav'+l+'CellOff';
}

