//产品详细说明项之间切换
function Opendesc(tagid, onclickobj, itemcount) {
    for (var i = 0; i < itemcount; i++) {
        document.getElementById("DescHead" + i).className = "";
        document.getElementById("desc" + i).style.display = "none";
    }
    onclickobj.className = "onclicktd";
    document.getElementById(tagid).style.display = "";
}

//二级产品分类-左则产品导航
function OpenSublb(tagid) {
    var tag = document.getElementById(tagid);
    if (tag.style.display == "none")
        tag.style.display = "";
    else
        tag.style.display = "none";
}

function ShowLightBox(imgPath) {
    document.getElementById("linkimg").href = imgPath;
    document.getElementById("linkimg").click()
}

//email地址  
function checkemail(eml) {

    var myReg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    if (myReg.test(eml)) {
        return true;
    }

    else {
        return false;
    }
}


function OpenNewWindow(Path, wW, wH) {
    var url = Path;
    var mwidth = wW;
    var mheight = wH;
    var loc_x = parseInt((window.screen.width - mwidth) / 2);
    var loc_y = parseInt((window.screen.height - mwidth) / 2);
    window.open(url, "kalendar", "left=" + loc_x + "px,top=" + loc_y + "px,width=" + mwidth + "px,height=" + mheight + "px,resizable=1,scrollbars=no,status=0");
}

function selectpic(thisPic) {
    document.getElementById("mpic").src = thisPic;
}
function outpic(mPic) {
    document.getElementById("mpic").src = mPic;
}
