/*
Revised:  26 Dec 2007 to insert promo ad at top of main content
Revissed: 27 August 2008 to eliminate eBay ad
*/
<!-- Browser onload multiplier -->
function makeDoubleDelegate(function1, function2) {
    return function() {
        if (function1)
            function1();
        if (function2)
            function2();
    }
}
window.onload = makeDoubleDelegate(window.onload, externalLinks );
window.onload = makeDoubleDelegate(window.onload, prepmain );

<!-- Supporting Javascript for od_yui functions -->
var divek1 = document.getElementById('ekcontainer');
var divek2 = document.getElementById('ekparams');

var tmc = document.getElementById('topmiddlecontent');
var div3 = document.getElementById('tmcontainer');
div3.innerHTML = tmc.innerHTML;
tmc.innerHTML="";

function prepmain(){

	/* Move content of page to maincontent */

	var div2 = document.getElementById('maincontainer');
	var mc = document.getElementById('maincontent');

	div2.innerHTML = mc.innerHTML;
	mc.innerHTML="";

	/* Set up link to favicon.ico */

	link=document.createElement('link'); // create a <link> tag
	link.setAttribute('rel','shortcut icon');
	link.setAttribute('type','image/x-icon');
	link.setAttribute('href','<?php echo $odcache; ?>/favicon.ico'); 
	document.getElementsByTagName('head')[0].appendChild(link);

	return;

}

/* Replacement for non-XHTML1.0 target=_blank */
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"; 
 } 
} 
