/************************************************
  
  Site Name: SALES MARKETING

************************************************/

function smartRollover() {
	if(document.getElementsByTagName) {
		var images = document.getElementsByTagName("img");
		for(var i=0; i < images.length; i++) {
			if(images[i].getAttribute("src").match("_def."))
			{
				images[i].onmouseover = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_def.", "_ovr."));
				}
				images[i].onmouseout = function() {
					this.setAttribute("src", this.getAttribute("src").replace("_ovr.", "_def."));
				}
			}
		}
		var images = document.getElementsByTagName("input");
		for(var n=0; n < images.length; n++) {
			if(images[n].getAttribute("type").match("image")) {
				if(images[n].getAttribute("src").match("_def.")) {
					images[n].onmouseover = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_def.", "_ovr."));
					}
					images[n].onmouseout = function() {
						this.setAttribute("src", this.getAttribute("src").replace("_ovr.", "_def."));
					}
				}						
			}
		}
	}
}

if(window.addEventListener) {
	window.addEventListener("load", smartRollover, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", smartRollover);
}

function randomImage(images) {
	var rdmNum=Math.floor(Math.random()*(images.length/3));
	document.write("<a href='"+images[rdmNum*3]+"'><img src='"+images[rdmNum*3+1]+"' alt='"+images[rdmNum*3+2]+"'></a>");
}