function init() {
  setDocumentDomain();
  //changeBackground();
  //externalLinks();
  cleanUp('provinces', clean_prov);
  cleanUp('cities', clean_cities);
  cleanUp('models', clean_models);
  // test if parser exists
  sndReq('/xml/test.xml');
  enable_output_escaping();
  enable_output_static();
  if(window.loadGoogleMap)
  {
     loadGoogleMap();
  }
  if (printit || pivprintit) window.print();

  if(ie)
  {
    if (getIEVersionNumber() < 7)
    {
        document.getElementById('column0').style.height = document.body.offsetHeight-2+'px';
    }
  }
  
    if (document.getElementById('description'))
    {
        collapseDescription()
    }
}

function getIEVersionNumber() {
    var ua = navigator.userAgent;
    var MSIEOffset = ua.indexOf("MSIE ");

    if (MSIEOffset == -1) {
        return 0;
    } else {
        return parseFloat(ua.substring(MSIEOffset + 5, ua.indexOf(";", MSIEOffset)));
    }
}

/*
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
*/

function enable_output_static() {
  if(!ie) {
    if (document.getElementById('static_content')) {
      document.getElementById('static_content').innerHTML = htmlDecode(document.getElementById('static_content').innerHTML);
    }
  }
}
