﻿
// Generic function that will open a popup
var win = null;
function newWindow(mypage,myname,w,h,features) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

// Clicks the Color list radio button
function clickRadioButton(id)
{
    document.getElementById('s' + id).firstChild.click();
    return void(0);
}

// Sets the Sale image overlay visibility
function SaleIsVisible(isSale) {
    var saleImage = $("img[id$=imgSale]")[0];
    if (saleImage != null) {
        if (isSale == "True") {
            saleImage.style.display = 'inline';
        }
        else {
            saleImage.style.display = 'none';
        }
    }
}