
/*
-- ------ Shop ------ --
*/
function Shop(){}
//-- ------ #Parameters ------ --

Shop.prototype.sAjax_0=new netsSingleAjax();

//-- ------ #Methods ------ --
//-- #Navigation --
Shop.prototype.sNavigationCount=6;
Shop.prototype.OnNavigation=function(pIndex){
	var Coun0=0;
	while(Coun0<this.sNavigationCount){
		document.getElementById("MainNavigation_"+Coun0).className="Shop_Navigation_2";
		Coun0++;
	}
	
	document.getElementById("MainNavigation_"+pIndex).className="Shop_Navigation_3";
	return 0;
}
//-- #Navigation --
Shop.prototype.OnTab_0=function(pIndex){
	var Coun0=0;
	tmpElement_0=document.getElementById("tab0_Button_"+Coun0);
	while(Coun0<this.sNavigationCount){
		document.getElementById("tab0_Button_"+Coun0).className="ShopH_0_36";
		document.getElementById("tab0_Box_"+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	document.getElementById("tab0_Button_"+pIndex).className="ShopH_0_35";
	document.getElementById("tab0_Box_"+pIndex).className="ShopH_0_37";
	return 0;
}
//-- #Detail --
Shop.prototype.sDetail_Img="";
Shop.prototype.sDetail_ImgMarkSpace=43;
Shop.prototype.sDetail_ImgBoxSpace=235;
Shop.prototype.sDetail_ImgHiddenHeight=1200;
Shop.prototype.OnDetail_ImgZoom=function(pImg,pEvent){
	this.sDetail_Img=pImg;
	document.getElementById("mainImgzoom_Box").className="ShopD_5_8";
	document.getElementById("mainImgzoom_Mark").className="ShopD_5_10";
	document.getElementById("mainImgzoom_Hidden").className="ShopD_5_11";
	document.getElementById("mainImgzoom_Hidden").style.top=0+tmpCommon.sysPx;
	document.getElementById("mainImgzoom_Hidden").style.left=0+tmpCommon.sysPx;
	tmpINT=document.body.offsetWidth-100;
	document.getElementById("mainImgzoom_Hidden").style.width=tmpINT+tmpCommon.sysPx;
	tmpINT=this.sDetail_ImgHiddenHeight;
	document.getElementById("mainImgzoom_Hidden").style.height=tmpINT+tmpCommon.sysPx;
	document.getElementById("mainImgzoom_Img").src=this.sDetail_Img;
	
	this.OnDetail_ImgMove(pEvent);
	return 0;
}
Shop.prototype.OnDetail_ImgMove=function(pEvent){
	//-- ### --
	tmpSTR="";
	tmpEvent=tmpCommon.getMouse(pEvent);
	//-- ------ ### ------ --
	//-- #Y --
	tmpX=tmpEvent.clientY-tmpCommon.getElementY(document.getElementById("mainImgzoom_Box"),"BODY")-this.sDetail_ImgMarkSpace;
	if(tmpX>this.sDetail_ImgBoxSpace){
		tmpX=this.sDetail_ImgBoxSpace;
	}
	if(tmpX<0){
		tmpX=0;
	}
	document.getElementById("mainImgzoom_Mark").style.marginTop=tmpX+tmpCommon.sysPx;
	tmpX=tmpX*(-5)+85;
	document.getElementById("mainImgzoom_Box").childNodes[0].style.marginTop=tmpX+tmpCommon.sysPx;
	//-- #X --
	tmpY=tmpEvent.clientX-tmpCommon.getElementX(document.getElementById("mainImgzoom_Box"),"BODY")-this.sDetail_ImgMarkSpace+340;
	if(tmpY>this.sDetail_ImgBoxSpace){
		tmpY=this.sDetail_ImgBoxSpace;
	}
	if(tmpY<0){
		tmpY=0;
	}
	document.getElementById("mainImgzoom_Mark").style.marginLeft=tmpY+tmpCommon.sysPx;
	tmpY=tmpY*(-5)+85;
	document.getElementById("mainImgzoom_Box").childNodes[0].style.marginLeft=tmpY+tmpCommon.sysPx;
	return 0;
}
Shop.prototype.OnDetail_ImgHidden=function(){
	document.getElementById("mainImgzoom_Box").className=tmpCommon.sysHidden;
	document.getElementById("mainImgzoom_Mark").className=tmpCommon.sysHidden;
	document.getElementById("mainImgzoom_Hidden").className=tmpCommon.sysHidden;

	return 0;
}
Shop.prototype.OnDetail_ImgIndex=function(pIndex){
	//-- ### --
	var tmpSTR=document.getElementById("mainImgzoom_Button_"+pIndex).childNodes[0].childNodes[0].src;
	this.sDetail_Img=tmpSTR;
	document.getElementById("mainImgzoom_Box").childNodes[0].childNodes[0].src=tmpSTR;
	document.getElementById("mainImgzoom_Img").src=tmpSTR;
	//-- ### --
	var Coun0=0;
	var tmpElement=document.getElementById("mainImgzoom_Button_"+Coun0);
	while(tmpElement!=undefined){
		tmpElement.className="ShopD_5_6_1";
		Coun0++;
		tmpElement=document.getElementById("mainImgzoom_Button_"+Coun0);
	}
	document.getElementById("mainImgzoom_Button_"+pIndex).className="ShopD_5_6_2";
	
	return 0;
}
Shop.prototype.sInventorys_Name="mainSale_Inventorys";
Shop.prototype.OnDetail_InventorysOpen=function(){
	document.getElementById(this.sInventorys_Name+"_Tab").className="ShopD_0_8_2";
	document.getElementById(this.sInventorys_Name+"_Box").className="ShopD_0_8_3";

	
	return 0;
}
Shop.prototype.OnDetail_InventorysClose=function(){
	document.getElementById(this.sInventorys_Name+"_Tab").className=tmpCommon.sysHidden;
	document.getElementById(this.sInventorys_Name+"_Box").className=tmpCommon.sysHidden;

	return 0;
}
Shop.prototype.OnDetail_InventorysChoose=function(pID,pName,pValue){
	document.getElementById(this.sInventorys_Name+"_Tab").childNodes[0].innerHTML=pName;
	document.getElementById(this.sInventorys_Name+"_Button").innerHTML=pName;
	document.getElementById(this.sInventorys_Name+"_Label").innerHTML=pValue;
	document.getElementById(this.sInventorys_Name+"_Txt").value=pID;
	
	this.OnDetail_InventorysClose();
	return 0;
}
Shop.prototype.OnDetail_ParameterChoose=function(pFlag,pIndex,pElement){
	var Coun0=0;
	var tmpINT=0;
	var tmpCONTENT="";
	var tmpElement_Box=document.getElementById(pFlag+"_Box");
	//-- ### --
	if(pElement.parentNode.childNodes[0].className==tmpCommon.sysHidden){
		Coun0=0;
		while(tmpElement_Box.childNodes.length>Coun0){
			if(tmpElement_Box.childNodes[Coun0].tagName=="LI" && tmpElement_Box.childNodes[Coun0].className!="DClear"){
				if(tmpElement_Box.childNodes[Coun0].childNodes[0].className=="ShopD_0_12"){
					tmpINT++;
				}
			}
			Coun0++;
		}
		if(parseInt(document.getElementById(pFlag+"_ChooseAble").value)<=tmpINT){
			document.getElementById(pFlag+"_Alert").className="DError";
			document.getElementById(pFlag+"_Alert").innerHTML="对不起，您只能选择"+document.getElementById(pFlag+"_ChooseAble").value+"项。您可以点击已选项取消选择。";
		}else{
			pElement.parentNode.childNodes[0].className="ShopD_0_12";
			document.getElementById(pFlag+"_Alert").className=tmpCommon.sysHidden;
		}
	}else{
		pElement.parentNode.childNodes[0].className=tmpCommon.sysHidden;
		document.getElementById(pFlag+"_Alert").className=tmpCommon.sysHidden;
	}
	//-- ### --
	Coun0=0;
	while((tmpElement_Box.childNodes.length-1)>Coun0){
		if(tmpElement_Box.childNodes[Coun0].tagName=="LI"){
			if(tmpElement_Box.childNodes[Coun0].childNodes[0].className!=tmpCommon.sysHidden){
				tmpCONTENT+=Coun0+tmpCommon.sysSPLIT1;
			}
		}
		Coun0++;
	}
	document.getElementById(pFlag+"_Txt").value=tmpCONTENT;
	return 0;
}




//-- #Compare --
Shop.prototype.sCompareURL="../../../Plus/m_default/shop/saleCompare.php";
Shop.prototype.OnCompare_Add=function(pID){
	var tmpURL=this.sCompareURL+"?ActionType=DCompare&DCompare="+pID+tmpCommon.sysSPLIT1+"0";
	
	this.sAjax_0.sFlag="MainComparebox";
	this.sAjax_0.sPanel="mainCompareBox";
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"shop_CompareOperation_Callback();");
	//window.open(tmpURL,"_blank");
	this.OnCompare_Boxshow(0);

	return 0;
}
Shop.prototype.OnCompare_Sub=function(pID){
	var tmpURL=this.sCompareURL+"?ActionType=DCompare&DCompare="+pID+tmpCommon.sysSPLIT1+"1";
	
	this.sAjax_0.sFlag="MainComparebox";
	this.sAjax_0.sPanel="mainCompareBox";
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"shop_CompareOperation_Callback();");
	//window.open(tmpURL,"_blank");
	this.OnCompare_Boxshow(0);

	return 0;
}
function shop_CompareOperation_Callback(){
	var tmpFlag=tmpShop.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpShop.sAjax_0.sPanel);
	var tmpURL=tmpShop.sAjax_0.sURL;
	var tmpHttpRequests=tmpShop.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
			tmpFrames.showMessage("","对比商品已保存。","",0);
	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
	
}
Shop.prototype.OnCompare_Boxshow=function(pType){
	if(pType==0){
		document.getElementById("mainCompareButton").className="ShopCompare_1_2";
		document.getElementById("mainCompareButton_A").className=tmpCommon.sysHidden;
		document.getElementById("mainCompareBox").className="ShopCompare_1_3";
	}else if(pType==1){
		document.getElementById("mainCompareButton").className="ShopCompare_1_1";
		document.getElementById("mainCompareButton_A").className="Link1 SBlue4";
		document.getElementById("mainCompareBox").className=tmpCommon.sysHidden;
	}
	
	this.OnCompare_BoxFloat();
	return 0;
}
Shop.prototype.OnCompare_BoxFloat=function(){
	document.getElementById("mainCompareButton").style.top=160+tmpCommon.sysPx;
	if(document.getElementById("mainCompareButton").className=="ShopCompare_1_1"){
		document.getElementById("mainCompareButton").style.left=(980-20)+tmpCommon.sysPx;
	}else{
		document.getElementById("mainCompareButton").style.left=(980-150)+tmpCommon.sysPx;
	}
	
	return 0;
}

//-- #Detail --
Shop.prototype.OnDetail_Tab=function(pFlag,pIndex){
	var Coun0=0;
	var tmpElement=document.getElementById("saleTab"+pFlag+"_"+pIndex);
	while(tmpElement!=undefined){
		document.getElementById("saleTab"+pFlag+"_"+Coun0).className="Shop_Title_14";
		document.getElementById("saleBox"+pFlag+"_"+Coun0).className=tmpCommon.sysHidden;
		
		Coun0++;
		tmpElement=document.getElementById("saleTab"+pFlag+"_"+Coun0);
	}
	
	document.getElementById("saleTab"+pFlag+"_"+pIndex).className="Shop_Title_13";
	document.getElementById("saleBox"+pFlag+"_"+pIndex).className="ShopD_1_1";
	return 0;
}
Shop.prototype.OnDetail_Tab_A=function(pFlag,pIndex){
	var Coun0=0;
	var tmpElement=document.getElementById("saleTab"+pFlag+"_"+pIndex);
	while(tmpElement!=undefined){
		document.getElementById("saleTab"+pFlag+"_"+Coun0).className="Sale_Tab_3";
		document.getElementById("saleBox"+pFlag+"_"+Coun0).className=tmpCommon.sysHidden;
		
		Coun0++;
		tmpElement=document.getElementById("saleTab"+pFlag+"_"+Coun0);
	}
	
	document.getElementById("saleTab"+pFlag+"_"+pIndex).className="Sale_Tab_2";
	document.getElementById("saleBox"+pFlag+"_"+pIndex).className="ShopD_1_1";
	return 0;
}
Shop.prototype.OnDetail_TabSearch_A=function(pFlag,pIndex){
	var Coun0=0;
	var tmpElement=document.getElementById("saleTab"+pFlag+"_"+pIndex);
	while(tmpElement!=undefined){
		document.getElementById("saleTab"+pFlag+"_"+Coun0).className="Sale_Tab_3";
		
		Coun0++;
		tmpElement=document.getElementById("saleTab"+pFlag+"_"+Coun0);
	}
	
	document.getElementById("saleTab"+pFlag+"_"+pIndex).className="Sale_Tab_2";
	return 0;
}
//-- #Discuss --
Shop.prototype.OnDetail_DiscussURL="Plus/m_default/Shop/saleDetail.php";
Shop.prototype.OnDetail_DiscussSearch=function(pFlag,pIndex,pParameter){
	var tmpURL=tmpCommon.sysHome+this.OnDetail_DiscussURL+"?ID="+document.getElementById(tmpCommon.sysMainID).value+"&DSearch_Discuss"+pFlag+"="+pParameter;
	this.sAjax_0.sFlag="discussBox_"+pFlag;
	this.sAjax_0.sPanel="discussBox_"+pFlag;
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"shop_Detail_DiscussSearch_Callback();");
	//window.open(tmpURL,"_blank");
	
	this.OnDetail_TabSearch_A(pFlag,pIndex);
	return 0;
}
function shop_Detail_DiscussSearch_Callback(){
	var tmpFlag=tmpShop.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpShop.sAjax_0.sPanel);
	var tmpURL=tmpShop.sAjax_0.sURL;
	var tmpHttpRequests=tmpShop.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
	
}
Shop.prototype.OnDetail_DiscussEvaluation=function(pID,pDiscussid,pType){
	var tmpURL=tmpCommon.sysHome+this.OnDetail_DiscussURL+"?ActionType=DEvaluation_Discuss&DEvaluation_Discuss="+pDiscussid+tmpCommon.sysSPLIT1+pType;
	
	this.sAjax_0.sFlag="Message";
	this.sAjax_0.sPanel="discussEvaluation_"+pDiscussid+"_"+pType;
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"shop_DiscussEvaluation_Callback();");
	//window.open(tmpURL,"_blank");
	return 0;
}
function shop_DiscussEvaluation_Callback(){
	var tmpFlag=tmpShop.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpShop.sAjax_0.sPanel);
	var tmpURL=tmpShop.sAjax_0.sURL;
	var tmpHttpRequests=tmpShop.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpAR0=tmpData.split(tmpCommon.sysSPLIT1);
			if(tmpAR0.length==2){
				tmpFrames.showMessage("",tmpAR0[0],"",0);
				tmpPanel.innerHTML=tmpAR0[1];
			}else{
				tmpFrames.showMessage("",tmpAR0[0],"",0);
			}
	    	tmpFrames.showLoading(1);
	    }else{
	    	//tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
		//tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
	
}
//-- #Sets --
Shop.prototype.sSets_Name="A";
Shop.prototype.sSets_TabCount=3;
Shop.prototype.OnSets_Tab=function(pFlag,pIndex){
	//-- ### --
	if(pFlag==""){
		pFlag=this.sSets_Name;
	}
	//-- ### --
	var Coun0=0;
	var tmpElement=document.getElementById("saleSetsTab_"+pFlag+"_"+Coun0);
	while(tmpElement!=undefined){
		document.getElementById("saleSetsTab_"+pFlag+"_"+Coun0).className="ShopD_5_18";
		document.getElementById("saleSetsBox_"+pFlag+"_"+Coun0).className=tmpCommon.sysHidden;
		
		Coun0++;
		tmpElement=document.getElementById("saleSetsTab_"+pFlag+"_"+Coun0);
	}
	
	document.getElementById("saleSetsTab_"+pFlag+"_"+pIndex).className="ShopD_5_17";
	document.getElementById("saleSetsBox_"+pFlag+"_"+pIndex).className="ShopD_5_30";
	return 0;
}
Shop.prototype.OnSets_Choose=function(pFlag){
	//-- ### --
	var tmpCount=0;
	var tmpIDS="";
	var tmpPriceOld=parseFloat(document.getElementById("Order_Price_Txt").value);
	var tmpPrice=parseFloat(document.getElementById("Order_Price_Txt").value);
	//-- ### --
	var Coun0=0;
	var tmpElement=document.getElementById("Order_"+pFlag+"_"+Coun0+"_ID_Txt");
	while(tmpElement!=undefined){
		if(document.getElementById("Order_"+pFlag+"_"+Coun0+"_Txt").checked){
			tmpIDS+=document.getElementById("Order_"+pFlag+"_"+Coun0+"_ID_Txt").value+tmpCommon.sysSPLIT1;
			tmpPriceOld+=parseFloat(document.getElementById("Order_"+pFlag+"_"+Coun0+"_PriceOld_Txt").value);
			tmpPrice+=parseFloat(document.getElementById("Order_"+pFlag+"_"+Coun0+"_Price_Txt").value);
			
			tmpCount++;
		}
		Coun0++;
		tmpElement=document.getElementById("Order_"+pFlag+"_"+Coun0+"_ID_Txt");
	}
	
	document.getElementById("Order_"+pFlag+"_IDS").value=tmpIDS;
	document.getElementById("Order_"+pFlag+"_PriceOld").innerHTML=tmpPriceOld;
	document.getElementById("Order_"+pFlag+"_Price").innerHTML=tmpPrice;
	document.getElementById("Order_"+pFlag+"_LabelCount").innerHTML="("+tmpCount+")";
	return 0;
}
//-- #Search --
Shop.prototype.sDefaultSTR="请在这里输入您要查询的内容...";
Shop.prototype.OnSearch_Text=function(){
	var tmpSTR=document.getElementById("mainSearchTxt").value;
	if(tmpSTR==this.sDefaultSTR){
		tmpSTR="";
	}
	var tmpURL="../../../Plus/m_default/shop/saleList.php?ID=-1&DKeyword="+tmpCommon.encodeURL(tmpSTR,0)+"&DSearch=0,2,-1,-1";
	window.location=tmpURL;
	
	return 0;
}
Shop.prototype.OnSearch_Focus=function(pType){
	var tmpElement=document.getElementById("mainSearchTxt");
	if(pType==0){
		//#Focus
		if(tmpElement.value==this.sDefaultSTR){
			tmpElement.value="";
		}
		tmpElement.style.color="#333333";
	}else{
		//#Blur
		if(tmpElement.value==""){
			tmpElement.value=this.sDefaultSTR;
		}
		tmpElement.style.color="#CCCCCC";
	}
	
	return 0;
}


//-- #Salegroup --
Shop.prototype.sSalegroup_Count=6;
Shop.prototype.sSalegroup_Index=0;
Shop.prototype.sSalegroup_ARRAY=new Array();
Shop.prototype.sSalegroup_Name="SaleGroup";
Shop.prototype.sSalegroup_URL="Plus/Common/Shop/Data_Salegroup_Choose.php";
Shop.prototype.sSalegroup_Top=8;
Shop.prototype.sSalegroup_Height=1000;
Shop.prototype.OnSalegroup_Show=function(pParid,pIndex){
	var tmpFlag=0;
	var Coun0=0;
	//-- ### --
	Coun0=0;
	tmpFlag=0;
	while(this.sSalegroup_ARRAY.length>Coun0){
		if(this.sSalegroup_ARRAY[Coun0]==pIndex){
			tmpFlag=1;
			Coun0=this.sSalegroup_ARRAY.length+10;
		}
		Coun0++;
	}
	//-- ### --
	this.OnSalegroup_Hidden();
	//-- ### --
	document.getElementById(this.sSalegroup_Name+"_Button_"+pIndex).className="ShopL_1_1";
	document.getElementById(this.sSalegroup_Name+"_Box_"+pIndex).className="ShopL_1_2";
	tmpINT=tmpTop=tmpCommon.getElementY(document.getElementById("SaleGroup_Title"),"BODY")+document.documentElement.scrollTop+this.sSalegroup_Top;
	document.getElementById(this.sSalegroup_Name+"_Box_"+pIndex).style.top=tmpINT+tmpCommon.sysPx;
	document.getElementById(this.sSalegroup_Name+"_Hidden_"+pIndex).className="ShopL_1_3";
	document.getElementById(this.sSalegroup_Name+"_Hidden_"+pIndex).style.top=0+tmpCommon.sysPx;
	document.getElementById(this.sSalegroup_Name+"_Hidden_"+pIndex).style.left=0+tmpCommon.sysPx;
	tmpINT=document.body.offsetWidth;
	document.getElementById(this.sSalegroup_Name+"_Hidden_"+pIndex).style.width=tmpINT+tmpCommon.sysPx;
	tmpINT=tmpTop+this.sSalegroup_Height;
	document.getElementById(this.sSalegroup_Name+"_Hidden_"+pIndex).style.height=tmpINT+tmpCommon.sysPx;
	if(tmpFlag==0){
		this.sSalegroup_ARRAY[this.sSalegroup_ARRAY.length]=pIndex;
	}
	this.sSalegroup_Index=pIndex;
	
	//-- ### --
	if(tmpFlag==0){
		var tmpURL=tmpCommon.sysHome+this.sSalegroup_URL+"?ActionType=DGroup&DGroup="+pParid;
		this.sAjax_0.sFlag="Data";
		this.sAjax_0.sPanel=this.sSalegroup_Name+"_Box_"+pIndex;
		this.sAjax_0.sURL=tmpURL;
		this.sAjax_0.sendRequestSp(tmpURL,"shop_Salegroup_Show_Callback();");
		//window.open(tmpURL,"_blank");
	}
	return 0;
}
function shop_Salegroup_Show_Callback(){
	var tmpFlag=tmpShop.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpShop.sAjax_0.sPanel);
	var tmpURL=tmpShop.sAjax_0.sURL;
	var tmpHttpRequests=tmpShop.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    }
	    tmpFrames.showLoading(1);
	}else{
		tmpFrames.showLoading(0);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
	
}
Shop.prototype.OnSalegroup_Hidden=function(){
	var Coun0=0;
	while(this.sSalegroup_Count>Coun0){
		document.getElementById(this.sSalegroup_Name+"_Button_"+Coun0).className=tmpCommon.sysHidden;
		document.getElementById(this.sSalegroup_Name+"_Box_"+Coun0).className=tmpCommon.sysHidden;
		document.getElementById(this.sSalegroup_Name+"_Hidden_"+Coun0).className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	return 0;
}
Shop.prototype.OnSalegroup_ALLStyle=function(pFlag,pIndex,pType){
	if(pType==0){
		document.getElementById(pFlag+"_"+pIndex+"_Box").className="ShopG_5 ShopG_5_L";
		document.getElementById(pFlag+"_"+pIndex+"_Title").className="ShopG_6 ShopG_6_L";
		document.getElementById(pFlag+"_"+pIndex+"_TitleA").className="ShopG_7 ShopG_7_L";
		document.getElementById(pFlag+"_"+pIndex+"_Content").className="ShopG_8 ShopG_8_L";
	}else{
		document.getElementById(pFlag+"_"+pIndex+"_Box").className="ShopG_5";
		document.getElementById(pFlag+"_"+pIndex+"_Title").className="ShopG_6";
		document.getElementById(pFlag+"_"+pIndex+"_TitleA").className="ShopG_7";
		document.getElementById(pFlag+"_"+pIndex+"_Content").className="ShopG_8";
	}
	
	return 0;
}







/*-- ------ #Car ------ --*/
function onSetCarcount(pPage,pID,pCount){
	window.location=pPage+"?ActionType=DCar_setcount&DCar_setcount="+parseInt(pID)+","+parseInt(pCount);
}

/*-- ------ #Order ------ --*/
var sysInvoiceRare=0.08;

function onTypeselected(pControl,pAR0){
	document.getElementById(pControl.id+"_Content").innerHTML=pAR0[pControl.selectedIndex];
	
	calculatePrice();
}
function onSetSendmodelPrice(pControl,pAR0){
	document.getElementById("shsoctSendmodelidTxt_Pay").value=pAR0[pControl.selectedIndex];
	document.getElementById("shsoctSendmodelidTxt_Label").innerHTML=pAR0[pControl.selectedIndex];
	
	calculatePrice();
}
function onSetInvoicePrice(pType){
	var tmpINT=0;
	if(pType==1){
		tmpINT=parseInt(document.getElementById("totalPriceTxt_Pay").value)*sysInvoiceRare;
	}
	document.getElementById("shsoctInvoiceTxt_Pay").value=tmpINT;
	document.getElementById("shsoctInvoiceTxt_Label").innerHTML=tmpINT;
	
	calculatePrice();
}

function calculatePrice(){
	var tmpPrice=parseInt(document.getElementById("shsoctSendmodelidTxt_Pay").value)+
		parseInt(document.getElementById("shsoctInvoiceTxt_Pay").value)+
		parseInt(document.getElementById("totalPriceTxt_Pay").value);
	
	document.getElementById("totalPayTxt_Label").innerHTML=document.getElementById("totalPayTxt_Pay").value=tmpPrice;
}

/*-- ------ #User order ------ --*/
function onTypeselected_userorder(pControl,pAR0){
	document.getElementById(pControl.id+"_Content").innerHTML=pAR0[pControl.selectedIndex];
}

function setUserorderName(pValue){
	document.getElementById("shupctPayUsernameTxt").value=pValue;
}
function setUserorderMoney(pValue){
	document.getElementById("shuptTotalPriceTxt").value=pValue+".00";
}
function userOrder_Get_ShowReceivetype(pIndex,pCount){
	var Coun0=0;
	while(pCount>Coun0){
		document.getElementById("shupctReceivetypeidTxt_Box_"+Coun0).className="DHidden";
		Coun0++;
	}
	document.getElementById("shupctReceivetypeidTxt_Box_"+pIndex).className="Order_detail_content_1";
}

