	function OnPageSize(selPageSize){
//		var nPageSize	= selPageSize.options[selPageSize.selectedIndex].value;
//		var szHref		= location.href;
//		if(szHref.indexOf("PageSize=")>0){
//			var vReg	= /PageSize=([\d]+)/ig;
//			szHref	= szHref.replace(vReg, "PageSize="+nPageSize)
//		}
//		else
//			szHref		= szHref+"&PageSize="+nPageSize;
//
//		location.href	= szHref;
//		var szUrl		= selPageSize.options[selPageSize.selectedIndex].value;
//		alert(selPageSize.value);
//		location.href	= szUrl;
	}

	function OnSortChange(chSort){
		var szHref		= location.href;
		if(szHref.indexOf("Sorts=")>0){
			var vReg	= /Sorts=([\w\d]*)/ig;
			var szMatch	= szHref.match(vReg);
			if(szMatch!=null){
				var szSorts	= szMatch.toString().substring(6);
				var nIdx	= szSorts.indexOf(chSort);
				if(nIdx>=0){
					var szFlag	= szSorts.substr(nIdx+1, 1);
					if(szFlag=="0"){
						//替换为1 - 升序
						szSorts	= szSorts.substr(0, nIdx)+chSort+"1"+szSorts.substring(nIdx+2);
					}
					else{
						//撤消排序
						szSorts	= szSorts.substr(0, nIdx)+szSorts.substring(nIdx+2);
					}
				}
				else{
					szSorts	= szSorts+chSort+"0";
				}

				szHref	= szHref.replace(vReg, "Sorts="+szSorts);
			}
		}
		else
			szHref		= szHref+"&Sorts="+chSort+"0";
		location.href	= szHref;
	}

	function OnSortCancel(){
		var szHref		= location.href;
		var vReg		= /[&]+Sorts=([\w\d]*)/ig;
		szHref			= szHref.replace(vReg, "");
		location.href	= szHref;
	}

	function GoodsImgPreview(imgGoods, bFlag){
//		var imgPicPreview	= document.getElementById("idPicPreview");
//		if(bFlag){
//alert(window.event);
//			imgPicPreview.style.display	= 'block';
//		}
//		else{
//			imgPicPreview.style.display	= 'none';
//		}
	}
	
	function OnHelp(){
		var vSearchHelp	= document.getElementById("idSearchHelp");
		vSearchHelp.style.display	= vSearchHelp.style.display=='none'?'':'none';
	}
	
	function ExplendSubPriceForList(idProduct){
		var vSubExtend	= document.getElementById(idProduct);
		vSubExtend.style.display	= vSubExtend.style.display=='none'?'':'none';
	}
	
	function ExpandAdviseSearchContent(idAdviseSearchContent){
		var vAdviseSearchContent	= document.getElementById(idAdviseSearchContent);
		vAdviseSearchContent.style.display	= vAdviseSearchContent.style.display=='none'?'':'none';
	}
	
	function AdviseSearch(szAttachKey){
		var formSearch		= document.getElementById('idSearchForm');
		var txtSearch		= document.getElementById('idSearch');
		
		txtSearch.value		+= '+'+szAttachKey;
		formSearch.submit();
	}
	
	function ShowPopupMenu(obj, bFlag){
		var szClass			= obj.className;
		var vSubItems		= obj.getElementById('idsubItems');
		alert(obj);
		if(bFlag){
			obj.style.display	= '';
		}
		else{
			obj.style.display	= 'none';
		}
	}
	
	function ShowTopMenu(flag){
		var vMainCat	= document.getElementById('idMainCat');
		vMainCat.style.display	= flag?"":"none";
	}
	
	function ShowTopMenu(flag){
		var vMainCat	= document.getElementById('idMainCat');
		vMainCat.style.display	= flag?"":"none";
	}
