document.write('<div id="wg_frame"></div>');function loadJs(filename) {var loadedJS = document.createElement('script');     loadedJS.src = filename;       loadedJS.type = "text/javascript";     loadedJS.language = "javascript";     var head = document.getElementsByTagName('head')[0];     head.appendChild(loadedJS);}function setGlobalOnLoad(f) {   var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null;   if (root){      if(root.addEventListener) root.addEventListener("load", f, false);      else if(root.attachEvent) root.attachEvent("onload", f);   } else {      if(typeof window.onload == 'function') {         var existing = window.onload;         window.onload = function() {            existing();            f();         }      } else {         window.onload = f;      }   }}