document.ns = navigator.appName == "Microsoft Internet Explorer"
function randomStr(str){
	var showId=Math.floor(Math.random()*3);
	var tempStr=str[showId];
	str[showId]=str[0];
	str[0]=tempStr;
}
function showStr(str,textWidth,num){
	if(!document.ns){document.write(str[0]+'<br>')}
	else{
		document.write('<table border=0 cellspacing=0 cellpadding=0>'
		+'<tr><td>'
		+'<div id="icefable1'+num+'">'
		+'<table width='+textWidth+' border=0 cellspacing=0 cellpadding=0>'
		+'<tr><td height=20>'+str[0]+'</td></tr>'
		+'<tr><td height=20>'+str[1]+'</td></tr>'
		+'<tr><td height=20>'+str[2]+'</td></tr>'
		+'</table>'
		+'</div>'
		+'<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden"></div>'
		+'</td></tr>'
		+'</table>');
	}
}
function init_srolltext(num){
countnum=0
marqueesHeight=20;
eval('stopscroll'+num+'=false;')
eval('icefable1'+num+'.scrollTop=0;')
rotatenum=0
eval('icefable1'+num+'.style.width=0;')
eval('icefable1'+num+'.style.height=marqueesHeight;')
eval('icefable1'+num+'.style.overflowX="visible";')
eval('icefable1'+num+'.style.overflowY="hidden";')
eval('icefable1'+num+'.noWrap=true;')
eval('icefable1'+num+'.onmouseover=new Function("stopscroll'+num+'=true");')
eval('icefable1'+num+'.onmouseout=new Function("stopscroll'+num+'=false");')
eval('preTop'+num+'=0; ')
eval('currentTop'+num+'=0;')
eval('stoptime'+num+'=0;')
eval('icefable2'+num+'.innerHTML="";')
eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;')  
eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;')  
eval('setInterval("scrollUp'+num+'()",40);') 
}
function scrollUp1(){
  if(stopscroll1==true) return;
  currentTop1+=1;
  if(currentTop1==21){
  	stoptime1+=1;
  	currentTop1-=1;
  	if(stoptime1==80){
  		currentTop1=0;
  		stoptime1=0;
  	}
  }else{
	  preTop1=icefable11.scrollTop;
	  icefable11.scrollTop+=1;
	  if(icefable11.scrollTop==78){
	    preTop1=0; currentTop1=0; stoptime1=0;icefable11.scrollTop=0
	  }
  }
}
//var strArray1=new Array();
//strArray1[0]='&nbsp;<img src="images/biao.jpg" width=9 height=9 alt="">&nbsp;&nbsp;<a href=http://202.108.132.227:8080/gb/news.do?NewsId=8219 class=news target=_blank>市投资促进局招聘工作人员考试公告</a>'
//strArray1[1]='&nbsp;<img src="images/biao.jpg" width=9 height=9 alt="">&nbsp;&nbsp;<a href=http://202.108.132.227:8080/gb/news.do?NewsId=7837 class=news target=_blank>第九届京港洽谈会赴港筹备工作圆满完成</a>'
//strArray1[2]='&nbsp;<img src="images/biao.jpg" width=9 height=9 alt="">&nbsp;&nbsp;<a href=http://202.108.132.227:8080/gb/news.do?NewsId=7835 class=news target=_blank>会议通知</a>'


function openWindow1(){ 
	window.open("", 'newswin', 'width=740,height=500,scrollbars=yes,left=0,top=0,resizable=yes'); 
}

function log_submit(){
    var form = document.loginForm;
	form.userId.value = fTrim(form.userId.value); 
	if(form.userId.value.length == 0){
		alert("必须填写用户名.");
		form.userId.focus();
		return false;
	}
	if(form.password.value.length == 0){
		alert("必须填写密码.");
		form.password.focus();
		return false;
	}
	return true;
}

function fTrim(str){
	return str.replace(/(^\s*)|(\s*$)/g, "");
}
