<!--
// 鼠标移入
function mouseover(obj){
	obj.background="images/Button_bgB.gif";
	obj.style.cursor="hand";
}
//鼠标移出
function mouseout(obj){
	obj.background="images/Button_bg.gif";
	obj.style.cursor="hand";
}
//鼠标点击
function mouseclick(Bottonid,URL){
	//计算COOKIES 时间
	//var curTime = new Date();
    //curTime.setTime(curTime.getTime() + 1000*24*60*60*1000);
	document.cookie="Button="+Bottonid;//写COOKIES
	window.location=URL;
}

///取得ＣＯＯＫＩＥＳ值
function getCookie(name)
{											// 使用名称参数取得Cookie值, null表示Cookie不存在
  var strCookies = document.cookie;
  var cookieName = name + "=";  // Cookie名称
  var valueBegin, valueEnd, value;
  // 寻找是否有此Cookie名称
  valueBegin = strCookies.indexOf(cookieName);
  if (valueBegin == -1) return null;  // 没有此Cookie
  // 取得值的结尾位置
  valueEnd = strCookies.indexOf(";", valueBegin);
  if (valueEnd == -1)
      valueEnd = strCookies.length;  // 最後一个Cookie
  // 取得Cookie值
  value = strCookies.substring(valueBegin+cookieName.length,valueEnd);
  return value;
}//end function getCookie

// 检查Cookie是否存在
function checkCookieExist(name)
{											
  if (getCookie(name))
      return true;
  else
      return false;
}//end function checkCookieExist

//从ＣＯＯＫＩＥＳ对应设置菜单状态
function settable(){
	if(checkCookieExist("Button")){
		Button[getCookie("Button")].background="images/Button_bgB.gif";
	}else{
		Button[0].background="images/Button_bgB.gif";
	}
}
//验证用户登陆
function CheckUserLogin(){
	if(document.UserLogin.Userid.value==""){
		alert("用户名不能为空!");
		document.UserLogin.Userid.focus();
		return false;
	}
	if(document.UserLogin.Password.value==""){
		alert("密码不能为空!");
		document.UserLogin.Password.focus();
		return false;
	}
	if(document.UserLogin.check.value==""){
		alert("验证码不能为空!");
		document.UserLogin.check.focus();
		return false;
	}
}
//设置被先表格颜色
function ModThisBgColor(obj,thisobj){
	if(thisobj.checked){
		obj.style.backgroundColor='#f2f2f2';
	}else{
		obj.style.backgroundColor='#FBFBFB';
	}
}
//-->
// JavaScript Document
/*-------------------------------------------\
|      Simple Cross Browser Menu Script      |
|--------------------------------------------|
|        Author:        Emil A. Eklund       |
|        First Created: May 19, 2000         |
|        Last Updated:  Aug 17, 2000         |
|--------------------------------------------|
|     Created to work with ie4+ and ns4+     |
\-------------------------------------------*/

menuPrefix = 'menu';  // Prefix that all menu layers must start with
                      // All layers with this prefix will be treated
                      // as a part of the menu system.

var menuTree, mouseMenu, hideTimer, doHide;

function init() {
  ie4 = (document.all)?true:false;
  ns4 = (document.layers)?true:false;
  document.onmousemove = mouseMove;
  if (ns4) { document.captureEvents(Event.MOUSEMOVE); }
}

function expandMenu(menuContainer,subContainer,menuLeft,menuTop) {
	// Hide all submenus thats's not below the current level
	doHide = false;
  if (menuContainer != menuTree) {
	  if (ie4) {
      var menuLayers = document.all.tags("DIV");
      for (i=0; i<menuLayers.length; i++) {
        if ((menuLayers[i].id.indexOf(menuContainer) != -1) && (menuLayers[i].id != menuContainer)) {
          hideObject(menuLayers[i].id);
        }
      }
    }
    else if (ns4) {
      for (i=0; i<document.layers.length; i++) {
        var menuLayer = document.layers[i];
        if ((menuLayer.id.indexOf(menuContainer) != -1) && (menuLayer.id != menuContainer)) {
          menuLayer.visibility = "hide";
        }
      }
    }
  }
  // If this is item has a submenu, display it, or it it's a toplevel menu, open it
  if (subContainer) {
    if ((menuLeft) && (menuTop)) {
    	positionObject(subContainer,menuLeft,menuTop);
    	hideAll();
    }
    else {
      if (ie4) {
      	positionObject(subContainer, document.all[menuContainer].offsetWidth + document.all[menuContainer].style.pixelLeft - 10, mouseY);
      }
      else {
      	positionObject(subContainer, document.layers[menuContainer].document.width + document.layers[menuContainer].left + 50, mouseY);
      }
    }
    showObject(subContainer);
    menuTree = subContainer;
  }
}

function showObject(obj) {
  if (ie4) { document.all[obj].style.visibility = "visible"; }
  else if (ns4) { document.layers[obj].visibility = "show";  }
}

function hideObject(obj) {
  if (ie4) { document.all[obj].style.visibility = "hidden"; }
  else if (ns4) { document.layers[obj].visibility = "hide"; }
}

function positionObject(obj,x,y) {
  if (ie4) {
    var foo = document.all[obj].style;
    foo.left = x;
    foo.top = y;
  }
  else if (ns4) {
    var foo = document.layers[obj];
    foo.left = x;
    foo.top = y;
   }
}

function hideAll() {
 if (ie4) {
    var menuLayers = document.all.tags("DIV");
    for (i=0; i<menuLayers.length; i++) {
      if (menuLayers[i].id.indexOf(menuPrefix) != -1) {
        hideObject(menuLayers[i].id);
      }
    }
  }
  else if (ns4) {
    for (i=0; i<document.layers.length; i++) {
      var menuLayer = document.layers[i];
      if (menuLayer.id.indexOf(menuPrefix) != -1) {
        hideObject(menuLayer.id);
      }
    }
  }
}

function hideMe(hide) {
	if (hide) {
		if (doHide) { hideAll(); }
	}
	else {
		doHide = true;
		hideTimer = window.setTimeout("hideMe(true);", 1);
	}
}

function mouseMove(e) {
  if (ie4) { mouseY = window.event.y;}
  if (ns4) { mouseY = e.pageY; }
}

function itemHover(obj,src,text,style) {
  if (ns4) {
    var text = '<nobr><a href="' + src + '" class="' + style + '">' + text + '<\/a><\/nobr>'
    obj.document.open();
    obj.document.write(text);
    obj.document.close();
  }
}

onload = init;


//连接字体变色
var rate = 20;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}
if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement;
while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
}
if (obj.tagName == 'A' && obj.href != '') {
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
}
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == 'A') {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}
function ChangeColor()
{
obj.style.color = makeColor();
}
function makeColor()
{
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;
if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
return clrRGB;
}