IE_List = function() {
	if (document.all&&document.getElementById) {
		var ul_array = document.getElementsByTagName("ul");
		for (i=0; i<ul_array.length; i++) {
			if(ul_array[i].className == 'hover') {
				setList(ul_array[i]);
			}
		}
	}
}
addLoadListener(IE_List);

var setIEOvers = function(list) {
	listItems = list.getElementsByTagName("li");
	for(k=0; k<listItems.length; k++) {
		var node = listItems[k];
		node.onmouseover=function() {this.className+=" over";}
		node.onmouseout=function() {this.className=this.className.replace(" over", "");}
	}
}

/* 18/10/2006 - addLoadListener, PopupWindow, addClass, removeClass */
function addLoadListener(fn){if(typeof window.addEventListener!='undefined'){window.addEventListener('load',fn,false);}else if(typeof document.addEventListener!='undefined'){document.addEventListener('load',fn,false);}else if(typeof window.attachEvent!='undefined'){window.attachEvent('onload',fn);}else{var oldfn=window.onload;if(typeof window.onload!='function'){window.onload=fn;}else{window.onload=function(){oldfn();fn();};}}};
var win=null;function PopupWindow(url,n,w,h,sc){var sw=screen.availWidth;var sh=screen.availHeight;lp=(sw)?(sw-w)/2:0;tp=(sh)?(sh-h)/2:0;se='height='+h+',width='+w+',top='+tp+',left='+lp+',scrollbars='+sc+',resizable=no';win=window.open(url,n,se);win.focus();}
function addClass(t,c){var p=new RegExp("(^| )" + c + "( |$)");if(!p.test(t.className)){if(t.className == "")t.className=c;else t.className+=" "+c;}return true;}
function removeClass(t,c){var r=t.className;var p=new RegExp("(^| )"+c+"( |$)");r=r.replace(p,"$1");r=r.replace(/ $/,"");t.className=r;return true;}

sfHover = function() {
	if (document.getElementById("mainNavContainer") != null)
	{
	var sfEls = document.getElementById("mainNavContainer").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);

/* function for 1st level left nav*/
skHover = function() {
	if(document.getElementById("LeftNav") !=null)
	{
	var sfEls = document.getElementById("LeftNav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" skhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" skhover\\b"), "");
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", skHover);

/* function for left nav*/
slHover = function() {
	if(document.getElementById("secondLevel") !=null)
	{
	var sfEls = document.getElementById("secondLevel").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" slhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" slhover\\b"), "");
		}
	}
	}
}
if (window.attachEvent) window.attachEvent("onload", slHover);

/* function for "Our Expertise" nav*/
smHover = function() 
{
  if(document.getElementById("ourExpertiseTable") !=null)
  {
    var sfEls = document.getElementById("ourExpertiseTable").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) 
	{
	  sfEls[i].onmouseover=function() 
	  {
        // Class name of "more" is a speical case so take care of it
		if(this.className.indexOf("more") != -1)
		{
		  this.className+=" smhover";
		}
		else
		{
		  this.className+=" snhover";
		}
	  }
	  sfEls[i].onmouseout=function() 
	  {
	    this.className=this.className.replace(new RegExp(" smhover\\b"), "");
	    this.className=this.className.replace(new RegExp(" snhover\\b"), "");
	  }
	}
  }
}
if (window.attachEvent) window.attachEvent("onload", smHover);

/* Setting items in a dynamic list to active */
function mdynamicListActive(thisClass)
{
  if(document.getElementById("dynamicContainer") != null)
  {
    var sfEls = document.getElementById("dynamicContainer").getElementsByTagName("a");
	for (var i=0; i<sfEls.length; i++) 
	{
	    sfEls[i].className=sfEls[i].className.replace(new RegExp("dynamicListActive\\b"), "");
    }
    thisClass.className="dynamicListActive";
  }
}

/* IE6 underline on mouseover for dynamic anchor */
function displayUnderline(thisClass)
{
  thisClass.textDecoration = "underline";
}

/* Remvoe IE6 mouseout for dynamic anchor */

function removeUnderline(thisClass)
{
  thisClass.textDecoration = "none";
}

/* Random banners on the home page */
function randomBanners(thisArray)
{
  imageArray = new Array();
  totalBanners = 0;
  imgCt = thisArray.length;

  for(i=0; i< imgCt; i++)
  {
    if(thisArray[i] != "")
    {
      imageArray[totalBanners] = thisArray[i];
      totalBanners = totalBanners + 1;
    }
  }
  if(totalBanners != 0)
  {         
    ranNum= Math.floor(Math.random()*totalBanners);
    document.write("<img src='"+imageArray[ranNum]+"' border='0'>");
  }
}


/* Zebra Tables*/						   
$(document).ready(function(){
	$(".zebra tr:nth-child(odd)").addClass("odd");
});




$(document).ready(function() { 
					
/* Print - RSS - Email - Social Bookmarks flyout animation */			
		if (jQuery.tools){
			//Animate social bookmarking popout hover
			$(".strigger").tooltip('#socialpop') 
		}
		
/* Awards Animation on homepage*/
		if (jQuery.innerfade){
			
            $('#awards_animation').innerfade({ 
                                 speed: 'slow', 
                                 timeout: 7000, 
                                 type: 'sequence', 
                                 containerheight: '235' 
            }); 		
		}
});
	







