function Level1MenuCell_OnMouseOver(cell)
{

	var table=cell.children[cell.children.length-1];
	table.style.display="block";
}

function Level1MenuCell_OnMouseOut(cell)
{
	var table=cell.children[cell.children.length-1];
	table.style.display="";
}

function CountDown()
{
	var timeSpan=(new Date(2008,8,19)-new Date())/1000;
	var day=parseInt(timeSpan/3600/24);
	var hour=parseInt((timeSpan-day*24*3600)/3600);
	var minute=parseInt((timeSpan-day*24*3600-hour*3600)/60);
	var second=parseInt(timeSpan-day*24*3600-hour*3600-minute*60);
	
	DaySpan.innerText=day;
	HourSpan.innerText=hour;
	MinuteSpan.innerText=minute;
	SecondSpan.innerText=second;
}

function ScrollProductList()
{
	if(ProductList.Stop)
	{
		window.setTimeout("ScrollProductList()",100);
	}
	else
	{
		if(ProductList.scrollTop<30)
		{
			ProductList.scrollTop++;
			window.setTimeout("ScrollProductList()",50);
		}
		else
		{
			var table=ProductList.children[0];
			table.moveRow(0,table.rows.length-1);
			ProductList.scrollTop=0;
			ScrollProductList();
		}
	}
}

function KeyBox_OnFocus(textBox)
	{
		if(textBox.value!="输入关键字")
			return;

		textBox.style.color="";
		textBox.value="";
	}
	
	function KeyBox_OnBlur(textBox)
	{
		if(textBox.value!="")
			return;
		
		textBox.style.color="silver";
		textBox.value="输入关键字"
	}

function Search(typeID,key)
	{

		if(key==""||key=="输入关键字")
		{
			window.alert("请输入搜索条件！");
			if(aspnetForm.SearchKey)
				aspnetForm.SearchKey.focus();
			return;
		}
		window.open("/News/default.aspx?TypeID="+typeID+"&Key="+key);
	}

function PrintImage(imageUrl)
{
	var frame=window.document.createElement("iframe");
	frame.id="PrintFrame";
	frame.style.display="none";
	window.document.body.appendChild(frame);
	PrintFrame.document.write("<style type=text/css>body{margin:0;}</style>");
	PrintFrame.document.write("<img src="+imageUrl+" />");
	PrintFrame.document.close();
	PrintFrame.print();
	window.document.body.removeChild(frame);
}