	// CHECK CLIENT BROWSER & PLATFORM
	var client = new IdentifyClient();
	

	// Check client browser & platform specifics
	function IdentifyClient() {
		this.agent = navigator.userAgent.toLowerCase();
		this.name = navigator.appName.toLowerCase();
		this.version = parseFloat(navigator.appVersion.slice(0, navigator.appVersion.indexOf(' ')));
		
		this.ie = (this.name.indexOf('microsoft internet explorer') >= 0);
		this.ns = (this.name.indexOf('netscape') >= 0);
		this.mac = (this.agent.indexOf('mac') >= 0);
		this.dom = (document.getElementById) ? true : false;
		
		if (this.agent.indexOf('msie') >= 0) { this.version = parseFloat(this.agent.slice(this.agent.indexOf('msie') + 5, this.agent.indexOf(';', this.agent.indexOf('msie') + 5))); }
		
		return this;
	}



	// Launch pop-up window
	// Requires:	IdentifyClient
	function LaunchWindow( psWindowURL, psWindowName, piWidth, piHeight, pbResizable, pbScrollbars, pbMenubar, pbToolbar, pbLocation, pbStatus ) {
		if (client.mac) {			
			if (client.ie && client.version >= 4 && client.version < 5) piHeight = parseInt(piHeight + 17);
		}
		var windowAttribs = 'width=' + piWidth + ',height=' + piHeight + ',resizable=' + Number(pbResizable) + ',scrollbars=' + Number(pbScrollbars) + ',menubar=' + Number(pbMenubar) + ',toolbar=' + Number(pbToolbar) + ',location=' + Number(pbLocation) + ',status=' + Number(pbStatus);
		var win = window.open(psWindowURL, psWindowName, windowAttribs);
		if (win != null) {
			if (win.opener == null) win.opener = self;
		}
		//win.focus();
		
		return win;
	}

	function PosLaunchWindow( psWindowURL, psWindowName, piWidth, piHeight, pbResizable, pbScrollbars, pbMenubar, pbToolbar, pbLocation, pbStatus, pbScreenX, pbScreenY,  pbTop, pbLeft) {
		if (client.mac) {			
			if (client.ie && client.version >= 4 && client.version < 5) piHeight = parseInt(piHeight + 17);
		}
		var windowAttribs = 'width=' + piWidth + ',height=' + piHeight + ',resizable=' + Number(pbResizable) + ',scrollbars=' + Number(pbScrollbars) + ',menubar=' + Number(pbMenubar) + ',toolbar=' + Number(pbToolbar) + ',location=' + Number(pbLocation) + ',status=' + Number(pbStatus) + ',screenX=' + (pbScreenX) + ',screenY=' + (pbScreenY) + ',top=' + (pbTop) + ',left=' + (pbLeft);
		var win = window.open(psWindowURL, psWindowName, windowAttribs);
		if (win != null) {
			if (win.opener == null) win.opener = self;
		}
		//win.focus();
		
		return win;
	}
	

	function CreateObject(imgName, imgSrc) {
		if (client.dom) {
			var tempImg = document.createElement("img");
			tempImg.src = imgSrc;
			tempImg.id = imgName;
			tempImg.style.visibility = 'hidden';
			tempImg.style.position = 'absolute';
			tempImg.style.top = 0;
			document.body.appendChild(tempImg);
		} else {
			eval(imgName+' = new Image()');
			eval(imgName+'.src = "'+imgSrc+'"');
		}
	}


	// Changes the image source
	// Requires:	IdentifyClient
	function ChangeImage( psImageRef, psImageVariable ) {
		var loImg = (client.dom) ? document.getElementById(psImageRef) : document.images[psImageRef];
		if (client.dom) {
			var loImageElement = document.getElementById(psImageVariable);
			if (loImg && loImageElement) loImg.setAttribute("src", loImageElement.getAttribute("src"));
		} else { loImg.src = eval(psImageVariable + ".src"); }
	}

	
	function ToggleCalendar( psCalendarID ) {
		var loCal = document.getElementById(psCalendarID);
		
		if (loCal) {
			loCal.style.display = (loCal.style.display != 'inline') ? 'inline' : 'none';
		} else {
			alert("calendar not found");
		}
	}
	
	
	function popupMovie(url) {
		remote = window.open(url,"movie","width=605,height=470,resizable=0,status=0,location=0,scrollbars=0,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	
	function ToggleVisibility(e)  {
		e.style.visibility = (e.style.visibility == "visible") ? "hidden" : "visible";
	}
	
	
	function toggleDisplay(e)  {
		e.style.display = (e.style.display == "none") ? "block" : "none";
	}
	
	
	function popupLaw(url) {
		remote = window.open(url,"movie","width=500,height=280,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	function popupFranCapStaff(url) {
		remote = window.open(url,"movie","width=500,height=480,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	function popupFranCapHC(url) {
		remote = window.open(url,"movie","width=500,height=480,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	function popupSureSteps(url) {
		remote = window.open(url,"SureSteps","width=790,height=630,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	
	function AddLoadEvent( func ) {
		var oldOnLoad = window.onload;
		
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldOnLoad) oldOnLoad();
				func();
			}
		}
	}

	
	function popupHSExamples() {
		remote = window.open("/homestyle/learning/examples.aspx","offices","width=640,height=345,resizable=1,status=1,location=0,scrollbars=1,toolbar=0,menubar=1");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	function PopupServices(url) {
		remote = window.open(url,"movie","width=500,height=480,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
	}
	
	function PopupLocations(url) {
		remote = window.open(url,"movie","width=970,height=620,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
		
		return false;
	}
	
	
	function LaunchChildSite( pObj ) {
		var lsURL = pObj.href;
		var lsWindow = (pObj.target = '') ? '_blank' : pObj.target;
		
		
		var liWidth;
		var liHeight;
		var liPosWidth;
		var liPosHeight;
		if (document.documentElement&&document.documentElement.clientHeight)
			{
		  		//alert('IE');
				liWidth=(document.documentElement.clientWidth + 10);
		  		liHeight=document.documentElement.clientHeight;
		 	}	
		else
			{
		  		liWidth=(document.all)?document.body.clientWidth:window.outerWidth;
		  		liHeight=(document.all)?document.body.clientHeight:window.outerHeight;
		 	}	
			
		if (window.screenLeft)
			{
		  		//alert('IE');
				liPosWidth=0;
		  		liPosHeight=0 ;
		 	}	
		else
			{
		  		liPosWidth=window.screenX;
		  		liPosHeight=window.screenY;
		 	}	
		//alert('liPosWidth' + liPosWidth);
		//alert('liPosHeight' + liPosHeight);
		PosLaunchWindow( lsURL, lsWindow, (liWidth), (liHeight), 1, 1, 1, 1, 1, 1 , liPosHeight, liPosWidth,  liPosHeight, liPosWidth);
		return false;
	}
	
	function PreloadGatewayImages() {
		//alert('start')
		preloadFlag = false;
		
		//alert(preloadFlag)	
	
		preloadFlag = true;
		//alert(preloadFlag)
	}
	
	function PreloadFranchiseImages() {
		preloadFlag = false;
		
		
		preloadFlag = true;
	}
	
	function PreloadFranchiseShannonImages() {
		preloadFlag = false;
		preloadFlag = true;
	}
	
	function PreloadFranchiseChristianneImages() {
		preloadFlag = false;
		preloadFlag = true;
	}
	
	function PreloadHomeCareImages() {
	}
	
	function PreloadHomeStyleImages() {
	}
	
	function PreloadMarketImages() {
		//alert('start')
		preloadFlag = false;
		//alert(preloadFlag)		
		preloadFlag = true;
		//alert(preloadFlag)
	}
	
	function PreloadPhysiciansImages() {
		//alert('start')
		preloadFlag = false;
		
		//alert(preloadFlag)
		// home middle nav
		preloadFlag = true;
		//alert(preloadFlag)
	}
		
	function PreloadStaffingImages() {
	}


//	CSSMenu Related Functions
	
	function CSSMenu() {}
	
	
	CSSMenu.Activate = function() {
		if (document.all && document.getElementById) {
			var navRoot = document.getElementById("imgMenu");
			
			if (navRoot) {
				for (var i = 0; i < navRoot.childNodes.length; i++) {
					var node = navRoot.childNodes[i];
					
					if (node) {
						if (node.nodeName == "LI") {
							node.onmouseover = CSSMenu.MouseOver;
							node.onmouseout = CSSMenu.MouseOut;
						}
					}
				}
			}
		}
	}
	
	CSSMenu.MouseOver = function() {
		this.className += " over";
	}
	
	
	CSSMenu.MouseOut = function() {
		this.className = this.className.replace(" over", "");
	}
	
	function popupDownload(url) {
		remote = window.open(url,"movie","width=970,height=640,resizable=1,status=0,location=0,scrollbars=1,toolbar=0,menubar=0");
		if (remote != null ) { if (remote.opener == null) { remote.opener = self; } }
		remote.focus();
		
		//return false;
	}