//addEvent(window, 'load', Initialize);

if (window.attachEvent) {
    window.attachEvent("onload", Initialize);
    //window.attachEvent("onunload", Page_Unload);
} else {
    window.addEventListener("DOMContentLoaded", Initialize, false);
    //window.addEventListener("unload", Page_Unload, false);
}

function Initialize(){
	DetectBrowser();
}
function DetectBrowser() {
    var br = new Array(4);
    br = getBrowser();
    if (((br[0] == "msie" && getMajorVersion(br[1]) == "8") || br[0] == "msie" && getMajorVersion(br[1]) == "7") || (br[0] == "msie" && getMajorVersion(br[1]) == "6")) {
        //adaptAllIE();
    }
    else {
        adaptNonIE();
    } 
    if ((br[0] == "msie" && getMajorVersion(br[1]) == "7") || (br[0] == "msie" && getMajorVersion(br[1]) == "6")) {
        adapt2OldVerIE();
    }
    /*
    if ((br[0] == "msie" && getMajorVersion(br[1]) == "6")) {
        adapt2Ver6IE();
    }	
    if (br[0] == "firefox" || br[0] == "safari") {
		adapt2Firefox();
    }
    */
}
function adapt2Ver6IE(){

}
function adapt2OldVerIE(){
    Reclass("container", "container_oldIE");
}
function adaptAllIE() {

}
function adaptNonIE() {
    ReclassFF("container", "container_modern"); 
}
function adapt2Firefox(){

}
function Reclass(id, newClassName)			{
	obj = document.getElementById(id);
	if(obj){
		obj.setAttribute("className", newClassName);
	}
}
function ReclassFF(id, newClassName)			{
	obj = document.getElementById(id);
	if(obj){
		obj.setAttribute("class", newClassName);
	}
}