<!--
/*==========================================================================================*/
function addLoadEvent(func) {
	var oldonload=window.onload;
	if (typeof window.onload!="function") {
		window.onload=func;
	} else {
		window.onload=function() {
			oldonload();
			func();
		}//end function
	}//end if (typeof window.onload!="function")
}//end function
/*==========================================================================================*/
function SetHighlights() {
	xInputs=document.getElementsByTagName("input");
	for (i=0;i<xInputs.length;i++) {
		if (xInputs[i].type=="text") {
			xInputs[i].onfocus=function() {
					if (this.defaultValue==this.value) {
						this.select();
					}//end if ()
				}//end function
			xInputs[i].onmouseup=function(){return false};//because safari is special
		}//end if (xInputs[i].type=="text")
	}//next i<xInputs.length
	xTextAreas=document.getElementsByTagName("textarea");
	for (i=0;i<xTextAreas.length;i++) {
		xTextAreas[i].onfocus=function() {
				if (this.defaultValue==this.value) {
					this.select();
				}//end if ()
			}//end function
		xTextAreas[i].onmouseup=function(){return false};//because safari is special
	}//next i<xTextAreas.length
}//end function
/*==========================================================================================*/
function SetupMenu() {
	xMenuDiv=document.getElementById("menu");
	if (xMenuDiv) {
		xMenuUL=xMenuDiv.getElementsByTagName("ul")[0];
		if (xMenuUL) {
			xMenuLIs=xMenuUL.getElementsByTagName("li");
			if (xMenuLIs) {
				for (i=0;i<xMenuLIs.length;i++) {
					xMenuLIA=xMenuLIs[i].getElementsByTagName("a")[0];
					if (xMenuLIA) {
						xMenuLIArel=xMenuLIA.rel;
						if (xMenuLIArel) {
							xSubMenuUL=document.getElementById(xMenuLIArel);
							if (xSubMenuUL) {
								xSubMenuUL.style.marginLeft=((xMenuLIA.offsetLeft-xMenuDiv.offsetLeft)+20)+"px";
								xMenuLIA.onmouseover=function() {
									HideSubMenusExcept(this.rel);
									ShowSubMenu(this.rel);
								}//end function
							} else {
								xMenuLIA.onmouseover=function() {
									HideSubMenusExcept('nothing');
								}//end function
							}//end if (xSubMenuUL)
						}//end if (xMenuLIArel)
					}//end if (xMenuLIA)
				}//next i<xMenuLIs.length
				document.getElementById("header").onmouseover=function() {
					HideSubMenusExcept('nothing');
				}//end function
				document.getElementById("main").onmouseover=function() {
					HideSubMenusExcept('nothing');
				}//end function
			}//end if (xMenuLIs)
		}//end if (xMenuUL)
	}//end if (xMenuDiv)
}//end function
/*==========================================================================================*/
function SetupSubMenus() {
	xSubMenuDiv=document.getElementById("submenus");
	if (xSubMenuDiv) {
		xSubMenuULs=xSubMenuDiv.getElementsByTagName("ul");
		if (xSubMenuULs) {
			for (i=0;i<xSubMenuULs.length;i++) {
				xSubMenuULAs=xSubMenuULs[i].getElementsByTagName("a");
				w=0;
				if (xSubMenuULAs) {
					for (s=0;s<xSubMenuULAs.length;s++) {
						x=xSubMenuULAs[s].offsetWidth;
						if (x>w) {w=x};
					}//next s<xSubMenuULAs.length
					for (s=0;s<xSubMenuULAs.length;s++) {
						xSubMenuULAs[s].style.display="block";
						xSubMenuULAs[s].style.width=w+"px";
					}//next s<xSubMenuULAs.length
				}//end if (xSubMenuULAs)
				xSubMenuULs[i].style.width=w+6+"px";
			}//next i<xSubMenuULs.length
		}//end if (xSubMenuULs)
	}//end if (xSubMenuDiv)
}//end function
/*==========================================================================================*/
function HideSubMenusExcept(xMenuLIArel) {
	xSubMenuDiv=document.getElementById("submenus");
	if (xSubMenuDiv) {
		xSubMenuULs=xSubMenuDiv.getElementsByTagName("ul");
		if (xSubMenuULs) {
			for (i=0;i<xSubMenuULs.length;i++) {
				xSubMenuUL=xSubMenuULs[i];
				if (xSubMenuUL.id!=xMenuLIArel) {
					setMenuOpac(xSubMenuUL.id, 0);
					xSubMenuUL.style.visibility="hidden";
				}//end if (xSubMenuULs[i]!=xMenuLIArel)
			}//next i<xSubMenuULs.length
		}//end if (xSubMenuULs)
	}//end if (xSubMenuDiv)
}//end function
/*==========================================================================================*/
function ShowSubMenu(xMenuLIArel) {
	xSubMenuUL=document.getElementById(xMenuLIArel);
	setMenuOpac(xMenuLIArel, 0);
	xSubMenuUL.style.visibility="visible";
	for (n=0;n<100;n++) {
		setTimeout("setMenuOpac('"+xMenuLIArel+"', "+n+")", n*2.5);
	}//next n<100
}//end function
/*==========================================================================================*/
function setMenuOpac(xObject, xOpacity) {
	xObject=document.getElementById(xObject);
	xObject.style.opacity=(xOpacity/100);
	xObject.style.MozOpacity=(xOpacity/100);
	xObject.style.KhtmlOpacity=(xOpacity/100);
	xObject.style.filter='alpha(opacity='+xOpacity+')';
}//end function
/*==========================================================================================*/
function ShowDayEvents(xTDid, xDATE) {
	window.showModalDialog("/includes/calendarday.asp?"+xDATE, window);
}//end function
/*==========================================================================================*/
addLoadEvent(SetHighlights);
addLoadEvent(SetupMenu);
addLoadEvent(SetupSubMenus);
/*==========================================================================================*/
-->
