function goButtonON(cellObj){
    cellObj.imgOld = cellObj.src;
    cellObj.src = "/images/searchbox_button_on.jpg";
}

function goButtonOFF(cellObj){
    cellObj.src = cellObj.imgOld;
}

function cellON(cellObj){
    cellObj.imgOld = cellObj.style.backgroundImage;
    cellObj.style.backgroundImage = "url(/images/menu_button_on.jpg)";
}

function cellOFF(cellObj){
    cellObj.style.backgroundImage = cellObj.imgOld;
}

function cartON( ){
    var cart = document.getElementById("cartimage");
    cart.src = "/images/cart_on.gif";
}

function cartOFF( ){
    var cart = document.getElementById("cartimage");
    cart.src = "/images/cart_off.gif";
}

function toHex(num){
     hexChars = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
     return hexChars[Math.floor(num / 16)] + hexChars[num % 16];
}

function openWindow(url, name, w, h) {
  popupWin = window.open(url, name, 'left=50,top=50,screenx=50,screeny=50,resizable,scrollbars=no,width=' + w +',height=' + h);
  return false;
}

//These functions are for the back end package, do not change them.
function imageSelectPopUp(pwinvar){
    imgSelectPopUp = window.open("/admin/imageselectform.php?pwinVar=" + pwinvar, "ImageSelector", "width=600,height=600, scrollbars=1, status=no,toolbar=no,resizable=yes");
    imgSelectPopUp.focus( );
}

function openCoupon( ){
  popupWin = window.open('/coupon.html', 'coupon', 'left=50,top=50,screenx=50,screeny=50,resizable=no,scrollbars=no,width=440,height=240');
  return false;
}

function openFUploader( ){
    var imgSelectPopUp = window.open("./fileselect.php", "FileSelector", "width=780,height=480, scrollbars=0, status=no,toolbar=no,resizable=no");
    imgSelectPopUp.focus( );

    if(document.all){
        window.event.cancelBubble = true;
    }
    else{
        e.stopPropagation( );
        e.preventDefault( );
    }
    return false;
}