/* MAIN NAV FUNCTION - LETS IE UNDERSTAND HOVER STATE FOR DROPDOWNS*/
function startList() {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("navList");
			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", "");
   					}
   				}
  			}
 		}
	}
/* END MAIN NAV FUNCTION */

if (!document.getElementById)
    document.getElementById = function() { return null; }

function initializeExpandMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    actuator.onclick = function() {
		var display = menu.style.display;
		for (i=0; i<expandMenuArray.length;i++){
				var closeMenuRef = expandMenuArray[i] + "ExpandMenu";
				if (closeMenuRef != this){
					var closeMenu = document.getElementById(closeMenuRef);
					closeMenu.style.display = "none";
					closeMenu.parentNode.style.backgroundImage = "url(/images/sideNav_plus.gif)"
				}
			}
        this.parentNode.style.backgroundImage =
            (display == "block") ? "url(/images/sideNav_plus.gif)" : "url(/images/sideNav_minus.gif)";
        menu.style.display = (display == "block") ? "none" : "block";
				
        return false;
    }
}

/* STRIPED TABLE FUNCTIONS
 * Thank You Dave Bowman (http://www.stopdesign.com/) for your help!
 */
 
function createStripedTable(idArray) {
	// if this browser doesn't have this function, then just bail out
	if (document.getElementById == null) return;
	
	// for each table ID that we're given, stripe all the rows.
	for (var indx = 0; indx < idArray.length; indx++) {
		var id = idArray[indx];
		// get the table that corresponds to this ID
		var oTable = document.getElementById(id);
		if (oTable == null) 
			return;
		
		// get its table head, and color it
		var aTHEAD = oTable.getElementsByTagName("thead");
		var aTRhead = aTHEAD[0].getElementsByTagName("tr");
		var lastItem = aTRhead.length - 1;
		aTRhead[lastItem].className = "stripeHead";

		// get its table body, which contains all the TR tags
		var aTBODY = oTable.getElementsByTagName("tbody");

		// set the CSS class for each one of the TR tags 
		for (var i = 0; i < aTBODY.length; i++) {
			// get an array of all the TR tags in the TBODY
			var aTR = aTBODY[i].getElementsByTagName("tr");

			for (var j = 0; j < aTR.length; j++) {	
				// the % operator divides the given number by another
				// and returns the remainder. This is how we alternate the
				// rows. If you want to alternate every third row, change
				// the 2 to a 3.
				aTR[j].className = (j % 2 == 1) ? "stripe1" : "stripe2";
			}
		}
	}
}


var currentTR = null; // if the user clicks on a row, we store it aside so we can unhilite it later.

function createAutoHiliteTableRows(idArray)
{
	// check for DOM-capable browser. If this method isn't available, don't do anything.
	if (document.getElementById != null)
	{
		for (var indx = 0; indx < idArray.length; indx++) {
			var id = idArray[indx];
		
			// get each table that has the ID that we were given
			var oTable=document.getElementById(id);
			if (oTable != null)
			{
				// get all the TR tags in the table.
				var aTRs=oTable.getElementsByTagName('tr');
				for(var j=0;j<aTRs.length;j++)
				{
					// only highlight those TRs that are children of the TBODY.
					// remove this "if" statement if you want to highlight ALL rows.
					if(aTRs[j].parentNode.nodeName=='TBODY')
					{
						// add event handlers for each TR to handle mouseover, mouseout,
						// and mousedown events. For each event, set the inline style
						// of the tag to whatever you want to happen when that event occurs.
						// Using inline styles instead of classes makes it easy to combine
						// this code with other functions, like the table striping example,
						// since when the inline style is removed, the class applied by
						// the striping code won't be affected.
						aTRs[j].onmouseover=function() {
							if (currentTR == this) return false;
							this.style.backgroundColor="#ffc";
							this.style.fontWeight="";
							return false;}
						aTRs[j].onmouseout=function(){
							if (currentTR == this) return false;
							this.style.backgroundColor="";
							this.style.fontWeight="";
							return false;}
						//aTRs[j].onmousedown=function(){
							// if there is already another row that the user clicked on,
							// remove its style before highlighting the one that was clicked.
							//if (currentTR != null) {
								//currentTR.style.backgroundColor="";
								//currentTR.style.fontWeight="";
								// if the row the user clicked on was already highlighted, then
								// just remove the styling and return.
								//if (currentTR == this) {
									//currentTR = null;
									//return false;
								//}
							//}
							//currentTR = this; // remember which row was clicked
							// highlight the row
							//this.style.backgroundColor="#B1C2EB";
							//this.style.fontWeight="bold";
							//return false;}
					}
				}
			}
		}
	}
}
/* END STRIPED TABLE FUNCTIONS */

/* ONLOAD FUNCTION THAT CALLS THE ABOVE FUNCTIONS AS NECESSARY */
var showSubmenu, tableArray, expandMenuArray;

window.onload = function(){
	/* initialize header (main) nav */
	startList();
	/* initialize side nav */
	if (showSubmenu){
		var submenu = document.getElementById(showSubmenu);
		submenu.style.display = "block";
	}
	/* initialize expandNav if necessary */
	if (expandMenuArray){
		for (i=0; i<expandMenuArray.length;i++){
				var menuRef = expandMenuArray[i] + "ExpandMenu";
				var actuatorRef = expandMenuArray[i] + "Expander";
            	initializeExpandMenu(menuRef, actuatorRef);
			}
	}
	/* stripe tables if necessary */
	if (tableArray){
		createStripedTable(tableArray);
		createAutoHiliteTableRows(tableArray);
	}
}
/* END ONLOAD FUNCTION */

/* POP UP WINDOW FUNCTIONS */
function popUpResize(path,w,h,r) {
	w = w + 50
	h = h + 50
	if (r == "") {
		r = "no"
	}
	var popUpResized=window.open(path,"popUpResized","height="+h+",width="+w+",scrollbars=yes,resizable="+r+",menubar=no,toolbar=no,location=no,status=no,screenx=40,screeny=40,left=40,top=40");
	popUpResized.focus();
}

function returnToOpener(path) {
	var popUpReturn=window.opener.location.href(path);
	this.blur();
}
/* END POP UP WINDOW FUNCTIONS */
/* POP UP WINDOW FUNCTIONS 2 */
function popUpResize2(path,w,h,r) {
	w = w + 50
	h = h + 50
	if (r == "") {
		r = "no"
	}
	var popUpResized2=window.open(path,"popUpResized","height="+h+",width="+w+",scrollbars=yes,resizable="+r+",menubar=yes,toolbar=yes,location=no,status=no,screenx=40,screeny=40,left=40,top=40");
	popUpResized2.focus();
}

function popUpResize3(path,w,h,r) {
	w = w + 50
	h = h + 50
	if (r == "") {
		r = "no"
	}
	var popUpResized3=window.open(path,"popUpResized","height="+h+",width="+w+",scrollbars=no,resizable="+r+",menubar=no,toolbar=no,location=no,status=no,screenx=40,screeny=40,left=40,top=40");
	popUpResized.focus();
}

function returnToOpener(path) {
	var popUpReturn=window.opener.location.href(path);
	this.blur();
}
/* END POP UP WINDOW FUNCTIONS 2 */

/* TABLES */
function alternate(id){ 
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);   
   var rows = table.getElementsByTagName("tr");   
   for(i = 0; i < rows.length; i++){           
 //manipulate rows 
     if(i % 2 == 0){ 
       rows[i].className = "even"; 
     }else{ 
       rows[i].className = "odd"; 
     }       
   } 
 } 
}
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

      
/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["images/sponsor-EdJones.gif", "http://www.edwardjones.com/en_US/fa/index.html&CIRN=503806", ""] //plain image syntax
fadeimages[1]=["images/sponsors-1stbank.gif", "https://www.efirstbank.com/", ""] //image with link and target syntax
fadeimages[2]=["images/sponsors-Mattress.gif", "https://www.urbanmattress.com", "_new"] //image with link and target syntax
fadeimages[3]=["images/sponsors-ortho.gif", "https://www.stapletonorthodontics.com", ""] //image with link and target syntax
fadeimages[4]=["images/sponsors-design.gif", "http://www.dianegordondesign.com", ""] //image with link and target syntax
fadeimages[5]=["images/sponsors-tafoya.gif", "http://www.farmersagent.com/ktafoya/", ""] //image with link and target syntax
fadeimages[6]=["images/sponsors-speech.gif", "http://www.lowryspeechtherapy.com/", ""] //image with link and target syntax
 
var fadeimages2=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["images/sponsors_showcase.gif", "http://www.showcaselandscaping.com/", ""] //plain image syntax
fadeimages2[1]=["images/sponsors-baldwin.gif", "http://bmrpc.com", ""] //image with link syntax
fadeimages2[2]=["images/sponsors-ColoradoSki.gif", "http://coloradoskiacademy.com", ""] //image with link and target syntax
fadeimages2[3]=["images/sponsors-hmServices.gif", "http://www.stapletonhomeservices.com", ""] //image with link syntax
fadeimages2[4]=["images/sponsors-levin.gif", "http://www.levinorthodontics.com", "_new"] //image with link syntax
fadeimages2[5]=["images/sponsors-mountain.gif", "http://www.mountaindaycamp.com", ""] //image with link syntax
fadeimages2[6]=["images/sponsors-tjcman.gif", "http://www.tjcmanagement.com", ""] //image with link syntax


var fadeimages3=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages3[0]=["images/sponsors-CPDental.gif", "", ""] //plain image syntax
fadeimages3[1]=["images/sponsors-wealth.gif", "http://www.wfafinet.com/", ""] //image with link syntax
fadeimages3[2]=["images/sponsors-familyDentist.gif", "http://www.qsfamilydentistry.com//", ""] //image with link and target syntax
fadeimages3[3]=["images/sponsors-dentistry.gif", "http://www.stapletonkids.com/", ""] //image with link syntax
fadeimages3[4]=["images/sponsors-dance.gif", "http://www.danceinstitutedenver.com", "_new"] //image with link syntax
fadeimages3[5]=["images/sponsors-kidspired.gif", "http://www.kidspiredart.com/", ""] //image with link syntax
fadeimages3[6]=["images/sponsors-dardano.gif", "http://www.4denverrealestate.com/", ""] //image with link syntax



var fadeimages4=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages4[0]=["images/sponsors-forestcity.gif", "http://www.forestcity.net", ""] //image with link syntax
fadeimages4[1]=["images/sponsors-tjc.gif", "http://www.stapletonforrent.com", ""] //image with link and target syntax
fadeimages4[2]=["images/sponsors-kentwood.gif", "http://www.denverrealestate.com/our_brokers/info/GinaLorenzen", ""] //image with link and target syntax
fadeimages4[3]=["images/sponsors-sentry.gif", "www.sentry.com/CPS/CindyAckerman.aspx", ""] //image with link and target syntax
fadeimages4[4]=["images/sponsors-stateFarm.gif", "http://online2.statefarm.com/b2c/sf/agent/06/2394", ""] //image with link syntax
fadeimages4[5]=["images/sponsors-adco.gif", "http://www.adcogen.com", ""] //image with link and target syntax


var fadeimages5=new Array() //2nd array set example. Remove or add more sets as needed.
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages5[0]=["images/sponsors-tucc.gif", "http://www.tucc.com", ""] //image with link and target syntax
fadeimages5[1]=["images/sponsors-allsport.gif", "http://stapletonallsports.com", "_new"] //image with link and target syntax
fadeimages5[2]=["images/sponsors-universal-lending.gif", "http://www.ulc.com/mattackerman", ""] //image with link and target syntax
fadeimages5[3]=["images/sponsors-lowrydentist.gif", "http://www.lowryfamilydentistry.com", ""] //image with link syntax
fadeimages5[4]=["images/sponsors-npre.gif", "http://npreco.com", ""] //image with link syntax
fadeimages5[5]=["images/sponsors-farm.gif", "http://www.nicksgardencenter.com/", ""] //image with link syntax
fadeimages5[6]=["images/sponsor-sweet-william.gif", "http://www.sweetwilliammarket.com/", ""] //image with link syntax


 
var fadebgcolor="white"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}

//-->