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

//original SonofSuckerfish below - changed on 1/20/2009
//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);

//modified SonofSuckerfish found at http://blog.netweblogic.com/css/suckerfish-drop-down-menu-improved/ - doesn't affect IE7 or Firefox
sfHover = function() {
			var sfEls = document.getElementById("nav").getElementsByTagName("ul");
			for (var i=0; i<sfEls.length; i++) {
				sfEls[i].parentNode.onmouseover= function() {
					this.lastChild.className+=" soasfhover";
				}
				sfEls[i].parentNode.onmouseout=function() {
					this.lastChild.className=this.lastChild.className.replace(new RegExp(" soasfhover\\b"), "");
				}
			}
		}
		if (window.attachEvent) window.attachEvent("onload", sfHover);	


//preload images
/*
Preload images script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}


//Enter path of images to be preloaded inside parenthesis. Extend list as desired.
preloadimages("images/feature_Manhattan.jpg","images/feature_copenhagen.jpg","images/feature_columbus.jpg","images/carrollton.jpg","images/neworleans.jpg")

//end preload images


//Random Images with Links for Home Page FeatureGraphic
function randImgLinks()
{
var pic = new Array();
pic[0] = "images/feature_Manhattan.jpg";
pic[1] = "images/feature_copenhagen.jpg";
pic[2] = "images/feature_columbus.jpg";
pic[3] = "images/feature_carrollton.jpg";
pic[4] = "images/feature_neworleans.jpg";


var links = new Array();
links[0] = "manhattan.html";
links[1] = "copenhagen.html";
links[2] = "columbus.html";
links[3] = "carrollton.html";
links[4] = "neworleans.html";

var alt = new Array();
alt[0] = "HTS Triax Manhattan";
alt[1] = "HTS Triax Copenhagen";
alt[2] = "HTS Triax Columbus";
alt[3] = "HTS Triax Carrollton";
alt[4] = "HTS Triax New Orleans";

random = Math.floor(Math.random() * pic.length);
document.getElementById('randImg').src = pic[random];
document.getElementById('randLink').href = links[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;
	
// }
