/* 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
// ----------------------------------------

// Created by: Randy Drisgill (The Mossman)
// August 17, 2007
//
// THIS OVERRIDES THE OOTB SHAREPOINT FUNCTION WHICH CAUSES ACTIVEX INSTALL ISSUES
//
// Essentially it overrides the ootb sharepoint function which calls the activex object
// See http://support.microsoft.com/default.aspx/kb/931509 for info on the issue
//
// To use in masterpage use this syntax in the <head>:
//  	<asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>
//   	<script type="text/javascript" src="/_catalogs/masterpage/custom_activex_override.js"></script>


function ProcessDefaultOnLoad(onLoadFunctionNames) {
    //** Uncomment this to see when this runs
    //alert('Fixing the Issue');

    ProcessPNGImages();
    UpdateAccessibilityUI();

    //** We comment out the offending ootb function
    //** and leave the rest of the functions as they were
    //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();
}

/*
function OpenPrintWindow(printText) {
    var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=yes,";
    disp_setting += "scrollbars=yes,width=800, height=600, left=100, top=25";
    var content_vlue = document.getElementById("printArea").innerHTML;

    var docprint = window.open("", "", disp_setting);
    docprint.document.open();
    docprint.document.write('<html><head><title>Ajovarma</title>');
    docprint.document.write('</head><body>');
    
    docprint.document.write('<div><a href="#" onclick="window.print()">' + printText + '</a></div><hr><br>');
    docprint.document.write(content_vlue);
    docprint.document.write('<br><hr><div><a href="#" onclick="window.print()">' + printText + '</a></div>');
    
    docprint.document.write('</body></html>');
    docprint.document.close();
    docprint.focus();
}
*/
