function ControlDiv(cellName, tableName)
{
	var cellObj = document.getElementById(cellName);
	var controlObj = document.getElementById(tableName);
	
	if(controlObj.style.display == "none")
	{
		controlObj.style.display = "";
		cellObj.className = "blue_0";
	}
	else
	{
		controlObj.style.display = "none";
		cellObj.className = "blue_1";
	}
}

//展开所有
function AllDeploy()
{
	for(var i=1; i<=8; i++)
	{
		document.getElementById("InfoTable"+i.toString()).style.display = "";
		document.getElementById("InfoCell"+i.toString()).className = "blue_0";
	}
}
//关闭所有
function AllClose()
{
	for(var i=1; i<=8; i++)
	{
		document.getElementById("InfoTable"+i.toString()).style.display = "none";
		document.getElementById("InfoCell"+i.toString()).className = "blue_1";
	}
}

function setTitleColor()
{
	var subjectID = getparastr("stocktype");
	var typeID = "";
	if(subjectID == "4061")
	{
		typeID = "2";
	}
	else if(subjectID == "4062")
	{
		typeID = "3";
	}
	else if(subjectID == "4063")
	{
		typeID = "4";
	}
	else
	{
		typeID = "1";
	}

	for(var i=1; i<=4; i++)
	{
		if(i.toString() == typeID)
			document.getElementById("StcokType"+i.toString()).color = "#ff9900";
	}
}

function getparastr(strname)
{
	var hrefstr,pos,parastr,para,tempstr;
	hrefstr = window.location.href;
	pos = hrefstr.indexOf("?")
	parastr = hrefstr.substring(pos+1);
	para = parastr.split("&");
	tempstr="";
	for(i=0;i<para.length;i++)
	{
		tempstr = para[i];
		pos = tempstr.indexOf("=");
		if(tempstr.substring(0,pos) == strname)
		{
			return tempstr.substring(pos+1);
		}
	}
	return null;
}