function initBand(SelectID,parent,initvalue)
{
	if (parent=="undefined") return;
	var action = "/JScript/common_search.asp?action=MachineBand";	
	if (parent!="")  action = action + "&parent=" + parent;		
	if (LoadData(myXML,action)) {
		WriteSelect(SelectID,false,myXML,"BandCode","BandDesc",initvalue)                               
	}
}

function initBrand(SelectID,parent,initvalue)
{
	if (parent=="undefined") return;	
	var action = "/JScript/common_search.asp?action=MachineBand";	
	if (parent!="")  action = action + "&parent=" + parent;		
	if (LoadData(myXML,action)) WriteSelect(SelectID,false,myXML,"BandCode","BandDesc",initvalue)                               
}

function initMachineType(SelectID,initvalue)
{
	var action = "/JScript/common_search.asp?action=MachineType";	
	if (LoadData(myXML,action))	WriteSelect(SelectID,false,myXML,"TypeCode","TypeDesc",initvalue)                               
}
function initMaterialType(SelectID,initvalue)
{
	var action = "/JScript/common_search.asp?action=MaterialType";
	if (LoadData(myXML,action))	WriteSelect(SelectID,false,myXML,"TypeCode","TypeDesc",initvalue)                               
}

function initNewsType(SelectID,initvalue)
{
	var action = "/JScript/common_search.asp?action=NewsType";
	if (LoadData(myXML,action))	WriteSelect(SelectID,false,myXML,"TypeCode","TypeDesc",initvalue)                               
}

function initNewsTypePT(SelectID,initvalue)
{
	var action = "/JScript/common_search.asp?action=NewsTypePT";
	if (LoadData(myXML,action))	WriteSelect(SelectID,false,myXML,"TypeCode","TypeDesc",initvalue)                               
}

function initComment(ParentDIV,NewsID)
{
	var action="/JScript/common_search.asp?action=Comment&Parent="+NewsID;
	if (LoadData(myXML,action)) WriteComment(ParentDIV,false,myXML,"UserName","Comment",NewsID)
}

function initRelateArtcle(ParentDIV,keyCode,iCol)
{
	var action="/JScript/common_search.asp?action=RelateArtcle&KeyCode="+keyCode;
	if (LoadData(myXML,action)) WriteRelate(ParentDIV,false,myXML,"Title","FileName",iCol)
}

function initRelateADVProduct(ParentDIV,UserID,ProID)
{
	var action="/JScript/common_search.asp?action=RelateADVProduct&Parent="+UserID+"&ProID="+ProID;
	if (LoadData(myXML,action)) WriteRelateADVProduct(ParentDIV,false,myXML,"PhotoFile","ProductName","FileName")
}

function initADVProductComment(ParentDIV,id)
{
	var action="/JScript/common_search.asp?action=ADVProductComment&Parent="+id;
	if (LoadData(myXML,action)) {
		WriteADVProductComment(ParentDIV,false,myXML,"UserName","Other","PubDate","Comment");
	}
}

function initRelateMachine(ParentDIV,UserID,ProID)
{
	var action="/JScript/common_search.asp?action=RelateMachine&Parent="+UserID+"&ProID="+ProID;
	if (LoadData(myXML,action)) WriteRelateMachine(ParentDIV,false,myXML,"PhotoFile","MachineName","FileName")
}
function initMachineComment(ParentDIV,id)
{
	var action="/JScript/common_search.asp?action=MachineComment&Parent="+id;
	if (LoadData(myXML,action)) {
		WriteMachineComment(ParentDIV,false,myXML,"UserName","Other","PubDate","Comment");
	}
}

function initRelateMaterial(ParentDIV,UserID,ProID)
{
	var action="/JScript/common_search.asp?action=RelateMaterial&Parent="+UserID+"&ProID="+ProID;
	if (LoadData(myXML,action)) WriteRelateMaterial(ParentDIV,false,myXML,"PhotoFile","MaterialName","FileName")
}
function initMaterialComment(ParentDIV,id)
{
	var action="/JScript/common_search.asp?action=MaterialComment&Parent="+id;
	if (LoadData(myXML,action)) {
		WriteMaterialComment(ParentDIV,false,myXML,"UserName","Other","PubDate","Comment");
	}
}

function ShowiAskArgue(ParentDIV,sID)
{
	var action="/JScript/common_search.asp?action=iAskArgue&Parent="+sID;	
	if (LoadData(myXML,action)){
		DisplayiAskArgue(ParentDIV,false,myXML,"Mode","Total");
	}
}

function ShowiAskVote(ParentDIV,sID,sVoteContent)
{
	var action="/JScript/common_search.asp?action=iAskVote&Parent="+sID;		
	if (LoadData(myXML,action)){
		DisplayiAskVote(ParentDIV,false,myXML,"Mode","Total",sVoteContent);
	}
}

function initTopAsk(ParentDIV,Group)
{
	var action="/JScript/common_search.asp?action=TopAsk&Parent="+Group;		
	if (LoadData(myXML,action)){
		ShowAskTopList(ParentDIV,false,myXML,"TypeCode","Title","FileName","PubUser","UserName","CompanyName","PubDate");
	}
}
function initTopAskForMain(ParentDIV,Group)
{
	var action="/JScript/common_search.asp?action=TopAsk&Parent="+Group;		
	if (LoadData(myXML,action)){
		ShowAskTopListForMain(ParentDIV,false,myXML,"TypeCode","Title","FileName","PubUser","UserName","CompanyName","PubDate");
	}
}
function initTopAskShort(ParentDIV,Group)
{
	var action="/JScript/common_search.asp?action=TopAsk&Parent="+Group;		
	if (LoadData(myXML,action)){
		ShowAskTopListShort(ParentDIV,false,myXML,"TypeCode","Title","FileName","PubUser","UserName","CompanyName","PubDate");
	}
}
function initTopNews(ParentDIV,Mode,TypeCode,Amount){
	var action="/JScript/common_search.asp?action=TopNews&Parent="+TypeCode+"&Amount="+Amount;	
	if (LoadData(myXML,action)) {
		if (Mode=="Min"){			
			WriteNewsForTableMin(ParentDIV,false,myXML,"Title","FileName");
		}
		if (Mode=="Max"){			
			WriteNewsForTableMax(ParentDIV,false,myXML,"Title","FileName");
		}
	}
}

function initNewSupplyBuy(ParentDIV,Amount){
	var action="/JScript/common_search.asp?action=NewSupplyBuy&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteNewSupplyBuy(ParentDIV,false,myXML,"Title","FileName");	
	}
}

function initJobListForMain(ParentDIV,Amount){
	var action="/JScript/common_search.asp?action=JobListForMain&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteJobListForMain(ParentDIV,false,myXML,"AutoID","JobName","PubUser","CompanyName","Num","PubDate");	
	}
}

function initNewsListForMain(ParentDIV,Amount){
	var action="/JScript/common_search.asp?action=NewsListForMain&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteNewsListForMain(ParentDIV,false,myXML,"TypeCode","Title","FileName","PubDate","TypeDesc");	
	}
}

function initSupplyBuyForMain(ParentDIV,Amount,iCol){
	var action="/JScript/common_search.asp?action=SupplyBuyForMain&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteSupplyBuyForMain(ParentDIV,false,myXML,"TypeCode","Title","FileName","PubDate","PhotoFile",iCol);	
	}
}



function initCompanyAdFlag(ParentDIV,Amount){
	var action="/JScript/common_search.asp?action=AdFlagForCompany&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteCompanyListAdFlag(ParentDIV,false,myXML,"CompanyName","UserNo");	
	}
}

function initNewBuyInfo(ParentDIV,Amount){
	var action="/JScript/common_search.asp?action=NewBuyInfo&Parent="+Amount;		
	if (LoadData(myXML,action)) {			
			WriteNewBuyInfo(ParentDIV,false,myXML,"Title","FileName","PubDate","EndDate");	
	}
}

function initRelateSupplyBuy(ParentDIV,keyCode){
	var action="/JScript/common_search.asp?action=RelateSupplyBuy&Parent="+keyCode;	
	if (LoadData(myXML,action)) {			
			WriteRelateSupplyBuy(ParentDIV,false,myXML,"Title","FileName");	
	}
}

//统计人流量
function TotalFlow(sPageName){
	var action="/JScript/CountPageFlow.asp?PageName="+sPageName;	
	LoadData(action);
}

function selectone(table,rowid)
{
	for(i=0;i<table.rows.length;++i)
		if (table.rows[i].id==rowid)
			table.rows[i].bgColor = 'd6f4aa';
		else
			table.rows[i].bgColor = 'white';
}

function CountPageFlow(PageUrl,PageName,BrowerPage,ParentUrl){		
	  document.write("<img src='/JScript/CountPageFlow.asp?ParentUrl="+ParentUrl+"&BrowerPage="+BrowerPage+"&PageUrl="+PageUrl+"&PageName="+PageName+"&iWidth="+escape(screen.width)+"&iHeight="+escape(screen.height)+"' border=0 width=1 height=1>");
}
