Moved inlinecode from xul to js-file. Window init code now uses setTimeout()