function isEmptyString(strValue)
{
    var strTestString = new String(strValue);
    if ( strValue == null || strTestString.length == 0 )
        return true;
    for (i = 0; i < strTestString.length; i++)
        if ( strTestString.charAt(i) != ' '  && strTestString.charAt(i) != '\t' &&
             strTestString.charAt(i) != '\n' && strTestString.charAt(i) != '\r' )
            return false;
    return true;
}

function swapImage(image_id, image_file)
{
    var image;

    image = document.getElementById(image_id);
    image.src = image_file;
}

function openWindow(url, width, height, scroll)
{
    var hWnd;

    hWnd = window.open(url,"Window","resizable=no,scrollbars=" + ( scroll == true ? "yes" : "no" ) + ",width=" + width + ",height=" + height);
}

function bookmarkPage(title, url)
{
    if ( navigator.appName === "Microsoft Internet Explorer" ) // Internet Explorer
    {
        window.external.AddFavorite(url, title);
    }
    else
    {
        if ( window.opera && window.print ) // Opera Browser
        {
            var elem = document.createElement('a');
            
            elem.setAttribute('href',url);
            elem.setAttribute('title',title);
            elem.setAttribute('rel','sidebar');
            elem.click();
        }
        else // Other Browsers
        {
            window.sidebar.addPanel(title,url,'');
        }
    }
}

