//
// Smart Rollover Class
//
SmartRollover = function()
{
	this.tags = ["img","input"];
}
SmartRollover.prototype = {
	create: function()
	{
		var t = this.tags;
		var over = function() { this.src = this.src.replace('_out.', '_over.'); };
		var out  = function() { this.src = this.src.replace('_over.', '_out.'); };
		//
		for(var i=0,l=t.length; i<l; i++)
		{
			var nl = document.getElementsByTagName(t[i]);
			for(var j=0,m=nl.length; j<m; j++)
			{
				var el = nl[j];
				var a = el.getAttribute("src");
				if (!el.src.match(/_out\./)&&a) continue;  
				el.onmouseover = over;  
				el.onmouseout  = out;  
			}
		}
	},
	setOnLoad: function(scope, callback)
	{
		if(window.addEventListener) window.addEventListener('load',function(e){ scope[callback](e); }, false);
		else if(window.attachEvent) window.attachEvent('onload',function(e){ scope[callback](e); });
	}
}
//
var sr = new SmartRollover();
sr.setOnLoad(sr, "create");