﻿Google_page_url = document.locATIon;
var Mess = "Google_page_url = \"document.locATIon\";";
function LoadCaiDan()
{
	if (document.getElementById("HCDBZ").value=="1")
	{
		document.getElementById("LiOne").className = "on";
	}

	if (document.getElementById("HCDBZ").value=="2")
	{
		document.getElementById("LiTwo").className = "on";
	}

	if (document.getElementById("HCDBZ").value=="3")
	{
		document.getElementById("LiThree").className = "on";
	}
}


function CheckM()
{
setTimeout("document.getElementById('downLink').style.visibility = 'visible';",600);
}
function Check()
{
	if (document.Form1.TBSearch.value.length<=0)
	{
		alert("关键字不能为空！");
		document.getElementById("TBSearch").focus();
		return false;
	}
	return true;
}

function AddHits(ProID)
{
	var xxhh = new ActiveXObject("Microsoft.XMLHTTP");
	xxhh.open("POST","../../JSCPU.aspx?YID="+ProID,false);
	xxhh.send();
}

function ShowDiv(obj) {
	var liobj = new Array('Iabout', 'Icraft', 'Isuccess');
	for(var i=0; i<liobj.length; i++) 
	{
		document.getElementById(liobj[i]).className = "menuOn";
		var j = i+1;
		document.getElementById("M_" + j.toString()).style.display = "none";
	}
	document.getElementById(liobj[obj-1]).className = "menuOver";
	document.getElementById("M_" + obj.toString()).style.display = "";
	document.body.focus();
}

function Mes()
{
	document.writeln("Google_page_url = \"document.locATIon\";");
}

function OnSearch(Mes,Type,Path)
{
	if (Mes=="")
	{
		alert("关键字不能为空！");
		document.getElementById("TBSearch").focus();
		return false;
	}
	Mes = URLEncode(Mes);
	if (Path=="ProList")
		location.href="../../Search.aspx?KeyWord="+Mes+"&Type="+Type
	else
		location.href="Search.aspx?KeyWord="+Mes+"&Type="+Type
}

function URLEncode(strInput)
{
	strTmp = encodeURI(strInput);
	strTmp = strTmp.replace(/\ /g, '+');
	strTmp = strTmp.replace(/\@/g, '%40');
	strTmp = strTmp.replace(/\#/g, '%23');
	strTmp = strTmp.replace(/\$/g, '%24');
	strTmp = strTmp.replace(/\&/g, '%26');
	strTmp = strTmp.replace(/\+/g, '%2B');
	strTmp = strTmp.replace(/\=/g, '%3D');
	strTmp = strTmp.replace(/\;/g, '%3B');
	strTmp = strTmp.replace(/\:/g, '%3A');
	strTmp = strTmp.replace(/\//g, '%2F');
	strTmp = strTmp.replace(/\?/g, '%3F');
	strTmp = strTmp.replace(/\,/g, '%2C');
	return strTmp;
}

function ButUP()
{
	if (NowCount>0)
	{
		var tempCou = NowCount + 2;
		document.getElementById("dd"+tempCou).style.display = "none";
		tempCou = NowCount - 1;
		document.getElementById("dd"+tempCou).style.display = "block";
		tempCou = NowCount;
		document.getElementById("dd"+tempCou).style.display = "block";
		tempCou = NowCount + 1;
		document.getElementById("dd"+tempCou).style.display = "block";
		NowCount = NowCount - 1;
	}
}
		
function ButDown()
{
	if (NowCount+3<=MaxCount)
	{	
		var tempCou = NowCount;
		document.getElementById("dd"+tempCou).style.display = "none";
		tempCou = NowCount + 1 ;
		document.getElementById("dd"+tempCou).style.display = "block";
		tempCou = NowCount + 2;
		document.getElementById("dd"+tempCou).style.display = "block";
		tempCou = NowCount + 3;
		document.getElementById("dd"+tempCou).style.display = "block";
		NowCount = NowCount + 1;
	}
}