// Find all link elements and add an onfocus attribte and value
function hideFocusBorders(){
  var theahrefs = document.getElementsByTagName("a");
  if (!theahrefs){return;}
  for(var x=0;x!=theahrefs.length;x++){
    theahrefs[x].onfocus = function stopLinkFocus(){this.hideFocus=true;};
  }
}
//event added using the addEvent() function above
/*addEvent(window, 'load', hideFocusBorders);*/
function chngHeader(){
	switch(parseInt(pgId)){
		case 0:
		document.getElementById("link0").innerHTML = '<a href="index.html" class="active">HOME</a>';
		break;
		case 1:
		document.getElementById("link1").innerHTML = '<a href="JavaScript:void(0);" class="active" rel="ddsubmenu1">ABOUT US</a>';
		break;
		case 2:
		document.getElementById("link2").innerHTML = '<a href="JavaScript:void(0);" class="active" rel="ddsubmenu2">SERVICES</a>';
		break;
		case 3:
		document.getElementById("link3").innerHTML = '<a href="clients.html" class="active">CLIENTS</a>';
		break;
		case 4:
		document.getElementById("link4").innerHTML = '<a href="portfolio.html" class="active">PORTFOLIO</a>';
		break;
		case 5:
		document.getElementById("link5").innerHTML = '<a href="subcontractors.html" class="active">SUBCONTRACTORS</a>';
		break;
		case 6:
		document.getElementById("link6").innerHTML = '<a href="contact.html" class="active">CONTACT</a>';
		break;
		
	}
}
//-->

function checkActive() {
	var tmp = window.location.href
	var loc = tmp.lastIndexOf("/");
	var urlstr= String(window.location.href.substring(loc, tmp.length)).toLowerCase();
		
	//switch(urlstr){
		//case "/starbucks.html":
			//document.getElementById("pg15").innerHTML= '<a href="#" class="sactive">+ Starbucks</a>';
		//break;
		
		
		
		
		//default:
			
		//break;
	//}
	
}


window.onload =  checkActive();

//window.onload =  function(){
	//checkActive();
	//chngHeader();
//}


