
function go(URL)
{
	window.location = URL
}

//在新窗口中打开页面
function openNewWindow(URL) 
{
	window.open(URL)
}

function showbasket(SysNo) 
{
	//window.open('../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo,'basketlist','width=700',height=500',resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no,left=20,top=20,titlebar=0');
	window.open('../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo,'basketlist');
}

function ShowBasketGift(SysNo) 
{
	//window.open('../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo,'basketlist','width=700',height=500',resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no,left=20,top=20,titlebar=0');
	window.open('../Sale/Shoppingcart.aspx?Action=giftadd&productno='+SysNo,'basketlist');
}

//added by joyce,add basket productsysno&quantity
function showbasketqty(SysNo,Quantity) 
{
	//window.open('../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo,'basketlist','width=700',height=500',resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no,left=20,top=20,titlebar=0');
	window.open('../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo+'&quantity='+Quantity,'basketlist');
}

function showbasketCar(SysNo)
{
	window.open('../../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo,'basketlist');
}

function showbasketqtyCar(SysNo,Quantity)
{
   window.open('../../Sale/Shoppingcart.aspx?Action=Add&productno='+SysNo+'&quantity='+Quantity,'basketlist');
}
function AlertFalse(str)
{
	alert(str);
	return false;
}

//弹出窗口
function openWindow(URL,Width,Height) 
{ 
	window.open(URL,'','width='+Width+',height='+Height+',resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no');
}

function openDialog(url)
{
    window.open(url,'','width=769,height=627,top=60,left=610,resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no');
}

function openDialog(url, Width, Height) {
    window.open(url, '', 'width=' + Width + ',height=' + Height + ',top=60,left=610,resizable=1,scrollbars=1,status=no,toolbar=no,location=no,menu=no');
}

function showdiv(divnum, divbefor, id) {
    for (i = 1; i <= divnum; i++) {
        try {
            if (i == divbefor) {
                document.getElementById(id + i).style.display = "inline";
            } else {
                document.getElementById(id + i).style.display = "none";
            }
        } catch (e) { }
    }
}

//裸钻选择按钮JS
function changeBg(obj,id) {
    if (obj.className == 'scData_noSelect') {
        obj.className = 'scData_Select';
        document.getElementById(id).checked  = true;
    } else {
    obj.className = 'scData_noSelect';
    document.getElementById(id).checked = false;
    }
}

function changeBg1(obj,id) {
    if (obj.className == 'zcutData_noSelect') {
        obj.className = 'zcutData_Select';
        document.getElementById(id).checked = true;
    } else {
    obj.className = 'zcutData_noSelect';
    document.getElementById(id).checked = false;
    }
}

function changeBg2(obj,id) {
    if (obj.className == 'zcolor_bg_off') {
        obj.className = 'zcolor_bg_on';
        document.getElementById(id).checked = true;
    } else {
    obj.className = 'zcolor_bg_off';
    document.getElementById(id).checked = false;
    }
}
//价格重量替换JS			
var lz1 = "<a href='#' onclick='lzr(); return false'><img src='../WebResources/images/Products/zEnterMyself1.gif' width='127' height='25' /></a>"
var lz2 = "<a href='#' onclick='lzl(); return false'><img src='../WebResources/images/Products/zEnterMyself2.gif' width='127' height='25' /></a>"
var bw;
function lzr() {
    document.getElementById("PM").style.display = "none";
    document.getElementById("WM").style.display = "none";
    document.getElementById("PE").style.display = "inline";
    document.getElementById("WE").style.display = "inline";
    document.getElementById("lz").innerHTML = lz2;
    document.getElementById("DSearch1").style.display = "none";
    document.getElementById("DSearch2").style.display = "inline";
}
function lzl() {
    document.getElementById("PM").style.display = "inline";
    document.getElementById("WM").style.display = "inline";
    document.getElementById("PE").style.display = "none";
    document.getElementById("WE").style.display = "none";
    document.getElementById("lz").innerHTML = lz1;
    document.getElementById("DSearch1").style.display = "inline";
    document.getElementById("DSearch2").style.display = "none";
}
function hideTR(id) {
    document.getElementById(id).style.display = "none";
}
function hideGROUP(id) {
    document.getElementById(id).style.display = "none";
}