function init(){

	var siteNavLi = document.getElementById("site-nav").getElementsByTagName("li");
	for(var i=0; i<siteNavLi.length; i++){
		siteNavLi[i].id = "site-nav-" + (i+1);
		siteNavLi[i].firstChild.innerHTML = '<span>' + siteNavLi[i].firstChild.innerHTML + '</span>';
	}

	var divs = document.getElementsByTagName("div");
	for(var i=0; i<divs.length; i++){
		if(divs[i].id){
			var extra1 = document.createElement("div");
			extra1.className = "extra-1";
			var extra2 = document.createElement("div");
			extra2.className = "extra-2";
			divs[i].appendChild(extra1);
			divs[i].appendChild(extra2);
		}
	}

	if(document.body.id == "home") document.getElementById("main").insertBefore(document.getElementById("order"), document.getElementById("provide"));

}
// enhanced onload funtioin modified from http://dean.edwards.name/weblog/2006/06/again/
if(/MSIE/.test(navigator.userAgent)){          // for Internet Explorer
	document.write('<script id="ie-onload" src="javascript:void(0)" defer><\/script>');
	document.getElementById("ie-onload").onreadystatechange = function(){
		if(this.readyState == "complete") init();
	}
}
else if(document.addEventListener){            // for Mozilla and Opera 9
	document.addEventListener("DOMContentLoaded", init, false);
}
else if(/WebKit/.test(navigator.userAgent)){   // for WebKit
	var _timer = setInterval(function(){
		if(/loaded|complete/.test(document.readyState)){
			init();
		}
	}, 10);
}
else window.onload = init;                     // for other browsers


var lightBoxLeft = (document.documentElement.clientWidth - 17 - 1000) / 2;
if(/Safari/.test(navigator.userAgent)) lightBoxLeft += 1;
document.write('<style type="text/css">html { overflow-x: hidden }  #jquery-overlay, #jquery-lightbox { left: -' + lightBoxLeft + 'px }</style>');

if(/MSIE 6/.test(navigator.userAgent)){
	document.styleSheets[0].addRule("#content #main #more", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content .extra-1", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content .extra-2", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #guidelines", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #howtocontact", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main .testimonial", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main .contactform", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #whatyouget", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main .project", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #callus", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #nda", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #info", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #howweuse", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #security", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #myinformation", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main .service", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #other", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #employmentform", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #jobform", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.styleSheets[0].addRule("#content #main #orderform", "behavior: url(js/iepngfix.htc)");   // make IE 6 supports translucent PNG
	document.createElement("abbr");   // make IE 6 supports <abbr> tags
	try{ document.execCommand("BackgroundImageCache", false, true); } catch(e){};   // fix the IE 6 background flicker
}
if(/Firefox\/2/.test(navigator.userAgent)) document.styleSheets[0].insertRule("#supp-nav ul li a { display: -moz-inline-box; }", 0)