/* Browsers*/
var browser_version;
var browser_type;
var browser;
var timoutID;
var ie = navigator.appVersion;
browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;

if (browser_type == "Opera") {
	document.getElementsByTagName('html')[0].className = 'opera';
	}
else if (browser_type == "Netscape") {
	document.getElementsByTagName('html')[0].className = 'w3c';
	}

else if (ie.indexOf("MSIE 6") != -1){
	document.getElementsByTagName('html')[0].className = 'ie6';
	}
	else if (browser_type == "Microsoft Internet Explorer") {
	document.getElementsByTagName('html')[0].className = 'ie';
	}

else if (browser_type == "Safari") {
	document.getElementsByTagName('html')[0].className = 'safari';
	} 
	
function trim(txt) {
    return txt.replace(/^\s+|\s+$/g, '');
}

// ----------------------------------------
// MOSS Overrides
// ----------------------------------------

// -------------------------------------------------------------------------------------
// Original:   \12\TEMPLATE\LAYOUTS\1033\INIT.JS, Line: 2599
// Reason:     Produces JS error when trying to load Name.dll on IE7/8
// Ref:        http://www.katriendg.com/aboutdotnet/2007-9-moss-issue-activex-ie7-931509.aspx
// Modified:   2009-10-27
// By:         glen.somerville@logica.com
// -------------------------------------------------------------------------------------
function ProcessDefaultOnLoad(onLoadFunctionNames) {
    ProcessPNGImages();
    UpdateAccessibilityUI();

    // -------------------------------------------------------------------------------------
    // Disable the running of Name.dll, which causes JS error
    // -------------------------------------------------------------------------------------

    //ProcessImn();

    for (var i = 0; i < onLoadFunctionNames.length; i++) {
        var expr = "if(typeof(" + onLoadFunctionNames[i] + ")=='function'){" + onLoadFunctionNames[i] + "();}";
        eval(expr);
    }
    if (typeof (_spUseDefaultFocus) != "undefined")
        DefaultFocus();
}