function openWin(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function CheckForm()
{
	if(document.UserLogin.username.value=="")
	{
		alert("请输入用户名!");
		document.UserLogin.username.focus();
		return false;
	}
	if(document.UserLogin.password.value == "")
	{
		alert("请输入密码!");
		document.UserLogin.password.focus();
		return false;
	}
}

function CheckFrmS()
{
	if((document.SearchF.SearchKey.value=="")||(document.SearchF.SearchKey.value=="请输入关键字"))
	{
		alert("请输入要查询的关键字!");
		document.SearchF.SearchKey.focus();
		return false;
	}
}

function CheckClick(msg){
  if(confirm(msg)){
    event.returnValue=true;
  }
  else{
    event.returnValue=false;
  }
}

function movstar(a,time){movx=setInterval("mov("+a+")",time)}
function movover(){clearInterval(movx)}
function mov(a){
  scrollx=andysky.document.body.scrollLeft;
  scrolly=andysky.document.body.scrollTop;
  scrolly=scrolly+a;
  andysky.window.scroll(scrollx,scrolly);
}
function wback(){
  if(andysky.history.length==0){window.history.back()}
  else{andysky.history.back()}}

var IE = 0, NN = 0
var s = navigator.userAgent
var user = ''
var nouserpass=false

if (s == '')
  IE = 3
else if (s.indexOf('MSIE') != -1)
  IE = parseFloat(s.substring(s.indexOf('MSIE') + 5, s.length))
else if (s.indexOf('Mozilla') != -1)
  NN = parseFloat(s.substring(s.indexOf('Mozilla') + 8, s.length))

if (window.location.search) {
  if (window.location.search.substring(0,12) == '?nouserpass=') {
    nouserpass = true;
    user = window.location.search.substring(12, window.location.search.length);
  }
  else
    user = window.location.search.substring(6, window.location.search.length);
}

function login() {
var form
  if (document.forms[0].elements[0].value == '' || document.forms[1].elements[0].value == '') {
    nouserpass = true;
    user = document.forms[0].elements[0].value;
    document.location = "http://"+document.domain+'/?nouserpass='+user;
    return;
  }
form = document.forms[2]
form.target = ''
form.user.value = document.forms[0].elements[0].value
  form.password.value = document.forms[1].elements[0].value
  document.forms[0].elements[0].value = ''
  document.forms[1].elements[0].value = ''
  form.submit()
}

function post() {
  login();
  return false;
}

var which="none";

function imageoff() {
  document.bannerlinkone.src = bannerlinkoneoff.src;
}

function imageon(imgName) {
  document[imgName].src = eval(imgName + "on.src");
}

function loadandswap(imgName, contentName) {
  imageoff();
  imageon(imgName);
  which=imgName;
}

function over(imgName) {
  if (which!=imgName)
    document[imgName].src= eval(imgName + "over.src");
  else return false;
}

function out(imgName) {
  if (which!=imgName)
    document[imgName].src= eval(imgName + "off.src");
  else return false;
}
