// JavaScript Document
//Son of Suckerfish Dropdown Javascript for ie

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//Random Images with Links for Home Page FeatureGraphic
function randImgLinks()
{
var pic = new Array();
pic[0] = "images/feature_4.jpg";
pic[1] = "images/feature_1.jpg";

var links = new Array();
links[0] = "newsletter/ra_january2009.html#article2";
links[1] = "enews.html";

var alt = new Array();
alt[0] = "ProLogic Welcomes New Customers";
alt[1] = "The Retailer Advocate ProLogics monthly eNewsletter";

random = Math.floor(Math.random() * pic.length);
document.getElementById('randImg').src = pic[random];
document.getElementById('randLink').href = links[random];
document.getElementById('randAlt').alt = alt[random];
/***Note in the 2 lines above I left a space before the first ( -just so yahoo would not drop the code, should take that space out***/
}

//array of images for random masthead
var aFeatures = new Array();
var m = 0;

aFeatures[0] = "<a href=\"enews.html\"><img src=\"images/feature_1.jpg\"></a>"; ///inc/57.htm
m += 1;

aFeatures[1] = "images/feature_2.jpg"; ///inc/57.htm
m += 1;

aFeatures[2] = "images/feature_3.jpg"; ///inc/46.htm
m += 1;




//randomly selects an image from seven sequentially
//numbered .jpg's every time the page reloads
function splashpic (){
    var length = m;
    var ran_num = Math.round((length-1)*Math.random())-1;
    ran_num=ran_num+1;
    var source = aFeatures[ran_num];
	document.images['feature'].src = source;
	
}

