function showHide() {
    if (document.getElementById('stillDetails').style.visibility == 'hidden' || document.getElementById('compDetails').style.visibility == 'hidden') {
        document.getElementById('stillDetails').style.visibility = 'visible';
        document.getElementById('compDetails').style.visibility = 'visible';
    }
    else if (document.getElementById('stillDetails').style.visibility == 'visible' || document.getElementById('compDetails').style.visibility == 'visible') {
        document.getElementById('stillDetails').style.visibility = 'hidden';
        document.getElementById('compDetails').style.visibility = 'hidden';
    }
}

  
  //watch videos pop up
  function watchvideo(videoID) {

        return GB_showCenter('Watch Videos', '/play.aspx?videoID=' + videoID)
  }

  //read reviews pop up
  function reviewpopup(prodID) {

        return GB_showCenter('Review a Product', '/productReviewsDetails_popup.aspx?prodID=' + prodID)

    }

 // product request pop up
    function makerequest(prodID, techID, clickID) {

        if (clickID == "" || clickID == null || clickID == 0) {

            return GB_showCenter(' ', '/inquirypop.aspx?goType=r&fromList=1&itemID=' + prodID + '&techID=' + techID + '&itemTypeID=3')

        } else {
            return GB_showCenter(' ', '/inquirypop.aspx?goType=r&fromList=1&itemID=' + prodID + '&techID=' + techID + '&itemTypeID=3&clickID=' + clickID)
        }
    }

//login in pop up
    function makeloginrequest(prodID, techID, clickID) {
        if (clickID == "" || clickID == null || clickID == 0) {

            return GB_showCenter('Request Info', '/inquirypop.aspx?goType=r&fromList=1&itemID=' + prodID + '&techID=' + techID + '&itemTypeID=3')

        } else {

            return GB_showCenter('Request Info', '/inquirypop.aspx?goType=r&fromList=1&itemID=' + prodID + '&techID=' + techID + '&itemTypeID=3&clickID=' + clickID)
        }
    }


    // expended function

    function toggle(id, triggerId, triggerTxt) {
        e = document.getElementById(id);
        trigger = document.getElementById(triggerId);

        if (e.style.display == 'block' || e.style.display != 'none') {
            e.style.display = 'none'
            trigger.innerHTML = triggerTxt + "";
        }
        else {
            e.style.display = 'block'
            trigger.innerHTML = "<u>Click to close</u><br>";
        }
    }
    
    // compare products

    function checkCheckBoxes() {
        var c = document.prodlist.Product;
        var toCheck = ""
        if (c.length) { for (var i = 0; i < c.length; ++i) { if (c[i].checked) { toCheck += c.value + "," } } }
        if (toCheck.split(',').length < 3) {
            alert('Please choose at least 2 products to compare'); return false;
        }
        else {
            document.prodlist.submit();
        }
    }
