

		var b1 = new Image();

		b1.src = "http://www.cbri.com/images/b1.jpg";

	  var b1a = new Image();

	  b1a.src = "http://www.cbri.com/images/b1a.jpg";



		var b2 = new Image();

		b2.src = "http://www.cbri.com/images/b2.jpg";

	  var b2a = new Image();

	  b2a.src = "http://www.cbri.com/images/b2a.jpg";



		var b3 = new Image();

		b3.src = "http://www.cbri.com/images/b3.jpg";

	  var b3a = new Image();

	  b3a.src = "http://www.cbri.com/images/b3a.jpg";

	  	  

	  var b4 = new Image();

		b4.src = "http://www.cbri.com/images/b4.jpg";

	  var b4a = new Image();

	  b4a.src = "http://www.cbri.com/images/b4a.jpg";

	  

		var b5 = new Image();

		b5.src = "http://www.cbri.com/images/b5.jpg";

	  var b5a = new Image();

	  b5a.src = "http://www.cbri.com/images/b5a.jpg";

	    

    function changeImage(imgDocID,imgObjName) {

    //  manages mouse click image behaviours

    //   imgDocID - the name of the document image to be replaced

    //   imgObjName - the name of the image object to be swapped in

    	document.images[imgDocID].src = eval(imgObjName + ".src");

    }

    





//Contents for menu 1 (HR Outsourcing)

var menu1=new Array()
menu1[0]='<a href="http://www.cbri.com/why_outsource_hr.php">Why Outsource HR?</a>'
menu1[1]='<a href="http://www.cbri.com/faqs.php">FAQs</a>'
menu1[2]='<a href="http://www.cbri.com/video.php">Watch the Video</a>'
menu1[3]='<a href="http://www.cbri.com/what_is_a_peo.php">What is a PEO?</a>'
menu1[4]='<a href="http://www.cbri.com/traditional_vs_peo_models.php">Traditional vs PEO Models</a>'
menu1[5]='<a href="http://www.cbri.com/clients.php">Testimonials</a>'
menu1[6]='<a href="http://www.cbri.com/success_stories.php">Case Studies</a>'
menu1[7]='<a href="http://www.cbri.com/hr-outsourcing-guidelines.php">PEO Shopping Help</a>'
menu1[8]='<a href="http://www.cbri.com/peo-glossary.php">PEO Glossary of Terms</a>'


//Contents for menu 2, (Services)

var menu2=new Array()
menu2[0]='<a href="http://www.cbri.com/phoenix_human_resources.php">Human Resources</a>'
menu2[1]='<a href="http://www.cbri.com/phoenix_payroll_services.php">Payroll Services</a>'
menu2[2]='<a href="http://www.cbri.com/phoenix_employee_benefits.php">Employee Benefits</a>'
menu2[3]='<a href="http://www.cbri.com/phoenix_workers_compensation.php">Workers\' Compensation & Risk Solutions</a>'
menu2[4]='<a href="http://www.cbri.com/az-immigration-law-services.php">Immigration Compliance Services</a>'
menu2[5]='<a href="http://www.cbri.com/phoenix_timekeeping_solutions.php">Timekeeping Solutions</a>'

//Contents for menu 3, (Free Resources)

var menu3=new Array()
menu3[0]='<a href="http://www.cbri.com/free_hr_newsletter.php">HR Tips & Newsletter</a>'
menu3[1]='<a href="http://cbri.com/hrconsultants/hroutsourcing">Discussions on HR Blog</a>'
menu3[2]='<a href="http://www.cbri.com/archives-safety-risk-articles.php">Safety Tips</a>'
menu3[3]='<a href="free_hr_tips.php">Human Resources Tools</a>'
menu3[4]='<a href="http://www.cbri.com/free_small_business_tools.php">Small Business Tools</a>'

//Contents for menu 4, (About Us)

var menu4=new Array()
menu4[0]='<a href="http://www.cbri.com/how_cbr_started.php">How CBR Started</a>'
menu4[1]='<a href="http://www.cbri.com/newsroom.php">Newsroom</a>'
menu4[2]='<a href="http://www.cbri.com/community.php">Community Involvement</a>'
menu4[3]='<a href="http://www.cbri.com/awards.php">Awards</a>'
menu4[4]='<a href="http://www.cbri.com/team.php">Meet Our Team</a>'
menu4[5]='<a href="http://www.cbri.com/employment-opportunities.php">Career Opportunities</a>'

//Contents for menu 5, (My CBR)

var menu5=new Array()
menu5[0]='<a href="http://www.cbri.com/web_clock.php">Web Clock</a>'
menu5[1]='<a href="http://www.cbri.com/online_payroll.php">Online Payroll / HR</a>'
menu5[2]='<a href="http://www.cbri.com/benefits_online.php">Benefits Online</a>'
menu5[3]='<a href="http://www.cbri.com/client_forms.php">Client Forms/Training</a>'
menu5[4]='<a href="http://www.cbri.com/safety_resource_page.php">Safety Resources</a>'


//Contents for menu 6, (Login)

var menu6=new Array()
menu6[0]='<a href="https://d3.darwinet.com/dnet086/client.asp" target="_blank">Payroll/HR (Client)</a>'
menu6[1]='<a href="https://d3.darwinet.com/dnet086/employee.asp" target="_blank">Payroll/HR (Employee)</a>'
menu6[2]='<a href="https://www.swipeclock.com/sc/cookie.asp?SiteAlias=70000215&Redirect=http://www.cbri.com/wc-superlogin.htm" target="_blank">Webclock (Supervisor)</a>'
menu6[3]='<a href="http://www.cbri.com/employ-webclock.htm" target="_blank">Webclock (Employee)</a>'


var menuwidth='165px' //default menu width
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}

return totaloffset;
}



function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}


function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}


function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
}
return edgeoffset
}


function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth, add_x, add_y){

	//alert((window.opera || (!ie4 && !window.opera))?true:false);

	if(window.opera || (!ie4 && !window.opera)) { //if opera or firefox
		add_y -= 3;
	}

	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
	clearhidemenu()
	dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
	populatemenu(menucontents)

	
	if (ie4||ns6){
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"


		//adjust left and top
		var lval = dropmenuobj.style.left;
		lval=parseInt(lval)+add_x;
		dropmenuobj.style.left=lval;
		var tval = dropmenuobj.style.top;
		tval=parseInt(tval)+add_y;
		dropmenuobj.style.top=tval;

	}

	return clickreturnvalue()
}


function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}



function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}



function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))

delayhidemenu()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

delayhidemenu()

}



function hidemenu(e){

if (typeof dropmenuobj!="undefined"){

if (ie4||ns6)

dropmenuobj.style.visibility="hidden"

}

}



function delayhidemenu(){

if (ie4||ns6)

delayhide=setTimeout("hidemenu()",disappeardelay)

}



function clearhidemenu(){

if (typeof delayhide!="undefined")

clearTimeout(delayhide)

}



if (hidemenu_onclick=="yes")

document.onclick=hidemenu





//pull object location

function findPos(obj) {

	var curleft = curtop = 0;

	if (obj.offsetParent) {

		curleft = obj.offsetLeft

		curtop = obj.offsetTop

		while (obj = obj.offsetParent) {

			curleft += obj.offsetLeft

			curtop += obj.offsetTop

		}

	}

	return [curleft,curtop];

}

