﻿//
// js class used to hold common methods through out the website
//


/**
 * Selects all items in a list selection box
 */
function listBoxSelectAll(controlID)
{
    $("#" + controlID + " option").attr("selected","selected");
}

/**
 * Clears the selection of all items in a list selection box
 */
function listBoxClearAll(controlID)
{
    $("#" + controlID + " option").removeAttr("selected");
}



/**
 * Selects all items in a checkbox list
 */
function cbListSelectAll(listID)
{
    $("#" + listID + " input").attr("checked","checked");
}

/**
 * Clears the selection of all items in a checkbox list
 */
function cbListClearAll(listID)
{
    $("#" + listID + " input").removeAttr("checked");
}

$.fn.preload = function() {
    this.each(function() {
        $('<img/>')[0].src = this;
    });
}


