 var url ='http://oas.oxfordjournals.org/RealMedia/ads/';
 var listpos = 'Top,Bottom';
 var query = '?';
 var sitepage = location.hostname + location.pathname;
 var rn = '001234567890'; OAS_rns = '1234567890';
 var rn = new String (Math.random()); 
 var rns = rn.substring (2, 11);
 if (isHomePage(sitepage)) { sitepage = location.hostname + 'index.dtl'; }
 
 function getObj(name) {
  if (document.getElementById)
   this.obj = document.getElementById(name);
  else if (document.all)
   this.obj = document.all[name];
  else if (document.layers)
   this.obj = document.layers[name];
  if (this.obj)
   this.style = this.obj.style;
 }
 
 function addLoad(func) {
  if (window.addEventListener)
   window.addEventListener("load", func, false);
  else if (document.addEventListener)
   document.addEventListener("load", func, false);
  else if (window.attachEvent)
   window.attachEvent("onload", func);
  else if (typeof window.onload != "function")
   window.onload = func;
  else {
   var oldonload = window.onload;
   window.onload = function() {
	oldonload();
	func();
   };
  }
 }
 
 function init() {
  var apos = listpos.split(',');
  var olddocwrite = document.write;
  for(var i = 0; i < apos.length; i++) {
   var object_togo = new getObj('Pub'+apos[i]);
   var object_tomove = new getObj('HiddenPub'+apos[i]);
   html = "";
   if (typeof(object_togo.obj) != "undefined" && typeof(object_tomove.obj) != "undefined") {
    try {
     object_togo.obj.innerHTML="";
     object_togo.obj.appendChild(object_tomove.obj);
     object_tomove.style.visibility = "visible";
    } catch(e) {}
   }
  }
 }
 
 function isHomePage(MyURL) {
  var HomePage = false;
  if((MyURL.indexOf("http://www.") == -1) && (MyURL.indexOf("https://") == -1) && (MyURL.indexOf("http://test.") == -1)) { 
    if((MyURL.indexOf("/?code") != -1) || (MyURL.lastIndexOf('/') == (MyURL.length-1))) {
      HomePage = true;
	}
  }
  return HomePage;
 }

document.write('<'+'script type="text/javascript" src="' + url + 'adstream_mjx.ads/' + sitepage + '/1' + rns + '@' + listpos + query + '"><\/script>');

if (document.getElementById && document.createTextNode) addLoad(init);
 