
function init(){

	var li_imgs = $ES('li a img'); // grab text graphic images
	li_imgs.merge($ES('a.object img')); // append above with other similar rollovers (the center graphic within a link)

	// Roll over effect
	li_imgs.each(function(el){
		// This used to set the image 'position' to 'relative'
		// then shift the 'left' declaration
		// but the 'relative' somehow broke IE6 when we increased the width with new graphics
		// So we can just keep it as absolute and use margin-left
		el.addEvent('mouseover', function(){
			this.setStyle('margin-left', (parseInt(this.offsetWidth)/2)*-1);
		});
		el.addEvent('mouseout', function(){
			this.setStyle('margin-left', 0);
		});
	});

	search_link = $E('#top_nav_search a'); // grab search link
	inputs = $ES('#top_nav_search input'); // grab search field and submit buttons

	 //attach onclick function
	search_link.addEvent('click', function(){
		this.setStyle('display', 'none'); // Hide 'Search' image link
		// Show Search field and submit button
		inputs.each(function(el){
			el.setStyle('display', 'inline');
		});
		this.removeEvents('click'); // Remove onclick events
		return false; // Don't go anywhere
	})


	// Grab flash content holders and fill them in with the flash objects
	var flash_objs = $ES('div.object');
	flash_objs.each(function(el){
		var n = el.id.charAt('5');
   	var so = new SWFObject('/images/home/0'+n+'.swf', 'flash-'+el.id, "138", "138", "5", "#ffffff");
	   so.useExpressInstall('/scripts/expressinstall.swf');
	   so.setAttribute("style", ";"); // minor SWFObject bug fix
	   so.write(el.id)
	});

};

window.addEvent('domready', init);
