/* --------------------------------------------------------------
FILE: Skin.js
DESCRIPTION: ExtJS Javascript extension for LSMS Private Label.  
TEMPLATE VERSION: 2.0  - Includes defaulting of company name field, and initially making the content invisible before changing it.
CUSTOMER: bna
LOCATION: /Content/skin/company
PROJECT: LMS Private Label Migration
CREATED:  
AUTHOR: 

Mod Date    Rev #   Author      Description
--------    ------  ----------- ---------------------------------

(c) Copyright 2010 PureSafety
----------------------------------------------------------------- */

(function() {

    /* perform the page manipulations ONLY IF this is the login page */
    if (Ext && Ext.getDom('View_root_Login_Index') ) {
        var el = Ext.getDom('CompanyName');

        if (((el && el.value) || "").match(/^\s*$/)) {           // is the value empty? (zero or more spaces; only comprised of spaces)
            el.value = '';
        }

        /* Suppress the default PureSafety graphic on the login page */
        var pics= Ext.query('.graphicCol');
        if (pics && pics[0]) {
            pics[0].innerHTML = '&nbsp;'; // keeps the element from collapsing
            pics[0].style.visibility = 'visible';
    }

        /* Change the default PureSafety Title and Intro Copy on the login page */
        var elems= Ext.query('.bodyCol');
        if (elems && elems[0]) {
            elems[0].innerHTML   = '&nbsp;'; // keeps the element from collapsing
            elems[0].style.visibility = 'visible';
    }

    }

})();
