﻿// JScript File

function addToLightbox(assetID)
{
    //switch to lightbox if not already (not needed but looks better).
    window.frames.lbox.setLBCTab(0);

    frames['lbox'].addtoLB(assetID);
}

function addToCart(assetID)
{
    //switch to cart if not already (not needed but looks better).
    window.frames.lbox.setLBCTab(1);
    
    frames['lbox'].addtoCart(assetID);
    
}

function highlightCell(cellID)
{
    if (document.getElementById(cellID))
    {
        document.getElementById(cellID).className = "highlightedTD";
    }

}

function normalCell(cellID)
{
    if (document.getElementById(cellID))
    {
        document.getElementById(cellID).className = "standardTD";
    }
}

function cleartextbox(object,defaulttext)
{
    if (object.value == defaulttext){
        object.value = "";
        object.style.color = "#333333";
        }
}

  //string trim function  
  String.prototype.trim = function () {
        return this.replace(/^\s*/, "").replace(/\s*$/, "");
    }  