// 04/2009

//����л�ͼƬ
//========================
var GetRandomn = 1;
function GetRandom(n){GetRandomn=Math.floor(Math.random()*n+1)}
/*
//����
GetRandom("3");
switch(GetRandomn){
case 1:
document.write("<img src=\"default/images/flash1.jpg\" width=\"940px\" height=\"256px\">")
break;
case 2:
document.write("<a href=\"#\" target=\"_blank\"><img src=\"default/images/flash2.jpg\" width=\"940px\" height=\"256px\"></a>")
break;
case 3:
document.write("<a href=\"#\" target=\"_blank\"><img src=\"default/images/flash3.jpg\" width=\"940px\" height=\"256px\"></a>")
break;
}
*/
//end


// index bannerͼƬ
function setCurrentHeaderNavPosition(curPos){
	var oLis = document.getElementById('Header_nav').getElementsByTagName("li");
	for(var i = 0; i < oLis.length; i++){
		if(i == curPos - 1){
			oLis[i].id = "active";
		}else{
			oLis[i].removeAttribute("id");
		}
	}
}


function setCurrentMenuPosition(curPos){
	var oLis = document.getElementById('page_menu').getElementsByTagName("li");
	for(var i = 0; i < oLis.length; i++){
		if(i == curPos - 1){
			oLis[i].firstChild.className = "current";
		}else{
			oLis[i].firstChild.removeAttribute("class");
		}
	}
}

function bindInterval(funcName){
    var args=[];
    for(var i=1;i<arguments.length;i++){
        args.push(arguments[i]);
    }
    return function(){
        funcName.apply(this,args);
    }
}

//
function listTable_trMouseOver(o){
	o.style.background = "#ffe7e6";
}
function listTable_trMouseOut(o){
	o.style.background = "#f5f5f5";
}


function toggleDisplay(id){
	try{
		var obj = document.getElementById(id);
		if(obj){
			if(obj.style.display == ""){
				obj.style.display = "none";
			}else{
				obj.style.display = "";
			}
		}
	}catch(e){}
}
