/**
    adding an onload event, if any others are unknown and should not be overwritten
*/

function addLoadEvent(func) {
    var nowOnload = window.onload; // Let's save the existing assignment, if any
    window.onload = function () {
        func();
        if(nowOnload != null && typeof(nowOnload) == 'function') {
            try{
                nowOnload();
            }
            catch(e){
//                alert(e);
            }
        }
    }
}

