function on(id){
	id.style.background="#FFF0D2";
}
function out(id){
	id.style.background=''
}
function son(id){
	id.style.background="#f9f9f9";
}
function sout(id){
	id.style.background=''
}
function mon(id){
	id.style.background="#FFF0D2";
}
function mout(id){
	id.style.background=''
}
function Cheight(obj){ 
document.getElementById(obj).offsetHeight; 
}
function divheight(){
  //var Array0=new Array(left.offsetHeight,middle.offsetHeight,right.offsetHeight);   
  //Array0.sort(function(a,b){return a-b});   
  //if (left.offsetHeight!=parseInt(Array0[Array0.length-1])){
  	//left.style.height=parseInt(Array0[Array0.length-1])-1;
  //}
  //if (middle.offsetHeight!=parseInt(Array0[Array0.length-1])){
  	//middle.style.height=parseInt(Array0[Array0.length-1])-1;
  //}
  //if (right.offsetHeight!=parseInt(Array0[Array0.length-1])){
  	//right.style.height=parseInt(Array0[Array0.length-1])-1;
  //}
  //取数组中的最大值作为DIV的高度。
  left.style.height=middle.offsetHeight;
  right.style.height=middle.offsetHeight;
}
function imgheight(id){
	id.height=103/908*middle.offsetWidth
	setTimeout("this.height=103/908*middle.offsetWidth",200);
}
function changewindow(id){
	var a = document.getElementById(id);
	a.height=(document.body.clientWidth/1003)*500;
}
function tree(id,my){
	if(id.style.display==""){
		id.style.display="none";
		my.style.background="url(/images/close.gif)";
		my.title="点击展开小类";
	}
	else{
		id.style.display="";
		my.style.background="url(/images/open.gif)";
		my.title="点击收起小类";
	}
}

// 幻灯片式的网页图片滚动函数（不需要做任何改动）
function roll_pic_flash(roll_pic_ary)        {
        // 生成幻灯片式的网页图片滚动代码
        var w                        = roll_pic_ary[3][0];
        var h                        = roll_pic_ary[3][1];
        var text_h                = roll_pic_ary[3][2];
        var bgcolor                = roll_pic_ary[3][3];
        var roll_swf        = roll_pic_ary[3][4];
        var swf_height        = h + text_h;
        var pics                = roll_pic_ary[0].join("|");
        var links                = roll_pic_ary[1].join("|");
        var texts                = roll_pic_ary[2].join("|");
        return '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ w +'" height="'+ swf_height +'"><param name="default_url" value=""><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="' + roll_swf + '"><param name="quality" value="high"><param name="bgcolor" value="'+bgcolor+'"><param name="menu" value="false"><param name="improved_by" value=""><param name=wmode value="opaque"><param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+w+'&borderheight='+h+'&textheight='+text_h+'"><embed src="' + roll_swf + '" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+w+'&borderheight='+h+'&textheight='+text_h+'" menu="false" bgcolor="'+bgcolor+'" quality="high" width="'+ w +'" height="'+ h +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';

}
function checklogin() {
  if(login.username.value == '') {
    alert('请输入用户名！');
    login.username.focus();
    return false;
  }
  if(login.password.value == '') {
    alert('请输入密码！');
    login.password.focus();
    return false;
  }
}
function checkmyearch() {
  if(mysearch.mysearch.value == '') {
    alert('请输入关键字！');
    mysearch.mysearch.focus();
    return false;
  }
}
function checkguestbook() {
  if(guestbook.author.value == '') {
    alert('请输入姓名！');
    guestbook.author.focus();
    return false;
  }
  if(guestbook.title.value == '') {
    alert('请输入主题！');
    guestbook.title.focus();
    return false;
  }
  if(guestbook.content.value == '') {
    alert('请输入留言内容！');
    guestbook.content.focus();
    return false;
  }
  if(guestbook.verify.value == '') {
    alert('请输入验证码！');
    guestbook.verify.focus();
    return false;
  }
}
function checkreg() {
  if(reg.username.value == '') {
    alert('请输入用户名！');
    reg.username.focus();
    return false;
  }
  if(reg.password.value == '') {
    alert('请输入密码！');
    reg.password.focus();
    return false;
  }
  if(reg.password.value != reg.password2.value) {
    alert('两次输入的密码不一致！');
    reg.password2.focus();
    return false;
  }
  if(reg.verify.value == '') {
    alert('请输入验证码！');
    reg.verify.focus();
    return false;
  }
}
function checkmemberedit() {
  if(memberedit.password.value != memberedit.password2.value) {
    alert('两次输入的密码不一致！');
    memberedit.password2.focus();
    return false;
  }
}
