function classOpenDiv() {
	this.width = 1;
	this.height = 150;
	this.speed = 5;
	this.elementDiv = null;
	this.timer = 5;
	var thisObj = this;
	var pross = null;
	function _openHeight() {
		var currentElementY = parseInt(this.elementDiv.style.height, 10);
		if (currentElementY < this.height) {
			this.elementDiv.style.height = (currentElementY + Math
					.ceil((this.height - currentElementY) / this.speed))
					+ "px";
		} else {
			window.clearInterval(pross);
		}
	}
	function _closeHeight() {
		var currentElementY = parseInt(this.elementDiv.style.height, 10);
		if (currentElementY > 1) {
			var value = (currentElementY - Math.ceil(currentElementY
					/ this.speed));
			value = value == 0 ? 1 : value;
			this.elementDiv.style.height = value + "px";
		} else {
			window.clearInterval(pross);
			this.elementDiv.style.display = "none";
		}
	}
	this.openHeight = function() {
		if (this.elementDiv.style.display == "block")
			return;
		window.clearInterval(pross);
		this.elementDiv.style.display = "block";
		this.elementDiv.style.height = "1px";
		pross = window.setInterval( function() {
			_openHeight.apply(thisObj)
		}, this.timer);
	}
	this.closeHeight = function() {
		if (this.elementDiv.style.display == "block") {
			pross = window.setInterval( function() {
				_closeHeight.apply(thisObj)
			}, this.timer);
		}
	}
}
/*控制左边菜单的显示与隐藏*/
var isdis = true;
function DisTools() {
    var Then = new Date()
    Then.setTime(Then.getTime() + 12 * 60 * 60 * 1000)
	if (isdis == true) {
		/*隐藏*/
		document.getElementById("lefttool").style.display = "none";
		document.getElementById("tooldis").style.left = "2px";
		document.getElementById("toolsImg").src = "../Content/images/show_leftbar.gif";
		isdis = false;
		document.cookie = "sideoff=true;expires=" + Then.toGMTString();
	} else {
		/*显示*/
		document.getElementById("lefttool").style.display = "";
		document.getElementById("tooldis").style.left = "150px";
		document.getElementById("toolsImg").src = "../Content/images/hidden_leftbar.gif";
		isdis = true;
		document.cookie = "sideoff=false;expires=" + Then.toGMTString(); 		
	}
}
function ToolsImg(){
	if(isdis==true){
	  document.getElementById("toolsImg").src = "../Content/images/hidden_leftbar_hover.gif";
	}else{
	  document.getElementById("toolsImg").src = "../Content/images/show_leftbar_hover.gif";
	}
}
function ToolsImgfalse(){
	if(isdis==true){
		document.getElementById("toolsImg").src = "../Content/images/hidden_leftbar.gif";
	}else{
		document.getElementById("toolsImg").src = "../Content/images/show_leftbar.gif";
	}
}
/*设置公用*/
var ismore = false;
var disobj = new classOpenDiv();
function ToolsInit() {	
	disobj.elementDiv = document.getElementById("type_more");
	document.getElementById("tooldis").onclick = DisTools;
	document.getElementById("tooldis").onmousemove=ToolsImg;
	document.getElementById("tooldis").onmouseout=ToolsImgfalse;
}
