function ajax(stritem, strurl) {
    var xmlHttp;
    try {
        // Firefox, Opera 8.0+, Safari
        xmlHttp = new XMLHttpRequest();
    }
    catch (e) {
        // Internet Explorer
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            try {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e) {
                document.getElementById(stritem).innerHTML = "Your browser does not support AJAX!";
                return false;
            }
        }
    }
    xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
            document.getElementById(stritem).innerHTML = xmlHttp.responseText;
        }
    }
    xmlHttp.open("GET", strurl, true);
    xmlHttp.send(null);
}
function ChkAll() {
    ret = '';
    for (var i = 0; i < document.buy.elements.length; i++) {
        var obj = document.buy.elements[i];
        if (obj.type == "select-one")
        ret = ret + '|' + obj.value;
    }
    return ret;
}
function jsconfirm(strText, strURL) {
    if (confirm(strText)) {
        window.location = strURL
    }
}
function BytSida(targ, selObj, restore) { //v3.0
    eval(targ + ".location='" + selObj.options[selObj.selectedIndex].value + "'");
    if (restore) selObj.selectedIndex = 0;
}
function openPopup(strurl, strname) {
    var popup;
    popup = window.open(strurl, strname, "menubar=no,width=350,height=280,toolbar=no,location=no,directories=no");
    popup.focus();
}
function showproductall() {
    document.getElementById('product_storage').style.visibility = '';
    document.getElementById('product_description').style.visibility = '';
    document.getElementById('product_images').style.visibility = '';
    document.getElementById('product_images2').style.visibility = '';
    document.getElementById('product_options').style.visibility = '';
    document.getElementById('product_info').style.visibility = '';
    document.getElementById('product_stat').style.visibility = '';
    document.getElementById('product_update').style.visibility = '';

    document.getElementById('product_storage').style.display = 'block';
    document.getElementById('product_description').style.display = 'block';
    document.getElementById('product_images').style.display = 'block';
    document.getElementById('product_images2').style.display = 'block';
    document.getElementById('product_options').style.display = 'block';
    document.getElementById('product_info').style.display = 'block';
    document.getElementById('product_stat').style.display = 'block';
    document.getElementById('product_update').style.display = 'block';
}
function showproduct(divID) {
    document.getElementById('product_info').style.visibility = 'hidden';
    document.getElementById('product_info').style.display = 'none';
    document.getElementById('product_storage').style.visibility = 'hidden';
    document.getElementById('product_storage').style.display = 'none';
    document.getElementById('product_description').style.visibility = 'hidden';
    document.getElementById('product_description').style.display = 'none';
    document.getElementById('product_images').style.visibility = 'hidden';
    document.getElementById('product_images').style.display = 'none';
    document.getElementById('product_images2').style.visibility = 'hidden';
    document.getElementById('product_images2').style.display = 'none';
    document.getElementById('product_options').style.visibility = 'hidden';
    document.getElementById('product_options').style.display = 'none';
    document.getElementById('product_stat').style.visibility = 'hidden';
    document.getElementById('product_stat').style.display = 'none';

    document.getElementById(divID).style.visibility = '';
    document.getElementById(divID).style.display = 'block';

    document.getElementById('product_update').style.visibility = '';
    document.getElementById('product_update').style.display = 'block';
    
    if (divID == 'product_images') {
        document.getElementById('product_images2').style.visibility = '';
        document.getElementById('product_images2').style.display = 'block';
    }
    if (divID == 'product_stat') {
        document.getElementById('product_update').style.visibility = 'hidden';
        document.getElementById('product_update').style.display = 'none';
    }
}
