/*function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {this.className+=" over";}
				node.onmouseout=function() {this.className=this.className.replace(" over", "");}
			}
		}
		navRoot = document.getElementById("nav2");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {this.className+=" over";}
				node.onmouseout=function() {this.className=this.className.replace(" over", "");}
			}
		}
	}
}
window.onload=startList;
*/
arrTabs = new Array("services","peo","about");
arrContactTabs = new Array("contact1","contact2","contact3");
for (i=0;i<arrTabs.length;i++) { //preload the onstates
	img = new Image();
	img.src = "images/tab_"+ arrTabs[i] +"_on.gif"
}
for (i=0;i<arrContactTabs.length;i++) { //preload the contact tabs
	img = new Image();
	img.src = "images/tab_"+ arrTabs[i] +"_on.gif"
}
prevId = 0;
function swapDiv(id) {
	document.images["tab"+prevId].src = "images/tab_"+ arrTabs[prevId] +"_off.gif";
	document.getElementById("div"+prevId).style.display = "none";
	document.images["tab"+id].src = "images/tab_"+ arrTabs[id] +"_on.gif";
	document.getElementById("div"+id).style.display = "inline";	
	prevId = id;
}
function swapContactDiv(id) {
	document.images["tab"+prevId].src = "images/tab_"+ arrContactTabs[prevId] +"_off.gif";
	document.getElementById("div"+prevId).style.display = "none";
	document.images["tab"+id].src = "images/tab_"+ arrContactTabs[id] +"_on.gif";
	document.getElementById("div"+id).style.display = "inline";	
	prevId = id;
}
function jumpPage(newLoc) {
	newPage = newLoc.options[newLoc.selectedIndex].value
		if (newPage != "") {
			window.location = newPage
		}
}	

function openWin(URL) {
newWindow=window.open(URL,"window","width=400,height=310,status=no,scrollbars=auto,resizable=no,location=0,menubar=0,toolbar=no");
newWindow.focus();
}

function page(){
  if (document.Links.Link_select.options[document.Links.Link_select.selectedIndex].value != "none") { 
	URL = document.Links.Link_select.options[document.Links.Link_select.selectedIndex].value;        
	newWindow=window.open(URL,"window","width=600,height=375,status=yes,scrollbars=yes,resizable=yes,location=1,menubar=1,toolbar=yes");
	newWindow.focus();
   }           
}

function login(url,host){
	var hrefString = url;
	var hostString = host;
			if( (hostString.indexOf("adptotalsource") != -1) || (hostString.indexOf("totaleconnect") != -1) || (hostString.indexOf("mytotalsource") != -1))
				{
				if(hostString.indexOf("demo") != -1)
				  {
					document.write("<a href='https://totalsource-demo.adp.com/ts/login.do'>");
				 }
				else
				{
				document.write("<a href='https://totalsource.adp.com/ts/login.do'>");
				}
				}
				else
				{
				document.write("<a href='/ts/login.do'>");
				}
	}

