<!-- Begin

// This is the image mouseover script
function msover(doc_item,textimage){
	document[doc_item].src=textimage;
}

function openEmail() {
		var winL = (screen.width - 700) / 2;
		var winT = (screen.height - 500) / 2;
		window.open('http://www.hospicehomecare.net:81','email','toolbar=no,left='+winL+',top='+winT+',location=no,directories=no,status=no,menubar=yes,resizable=yes,copyhistory=no,scrollbars=yes,width=700,height=500');
	}
    
//  End -->


<!-- Begin
// This is the navigation slide menu
//Smart Folding Menu tree- By Dynamic Drive (rewritten 03/03/02)
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var head="display:''"
img1=new Image()
img1.src="images/nav_arrow_right.jpg"
img2=new Image()
img2.src="images/nav_arrow_down.jpg"

var ns6=document.getElementById&&!document.all
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1

function checkcontained(e){
var iscontained=0
cur=ns6? e.target : event.srcElement
i=0
if (cur.id=="foldheader")
iscontained=1
else
while (ns6&&cur.parentNode||(ie4&&cur.parentElement)){
if (cur.id=="foldheader"||cur.id=="foldinglist"){
iscontained=(cur.id=="foldheader")? 1 : 0
break
}
cur=ns6? cur.parentNode : cur.parentElement
}

if (iscontained){
var foldercontent=ns6? cur.nextSibling.nextSibling : cur.all.tags("UL")[0]
if (foldercontent.style.display=="none"){
foldercontent.style.display=""
cur.style.listStyleImage="url(images/nav_arrow_down.jpg)"
}
else{
foldercontent.style.display="none"
cur.style.listStyleImage="url(images/nav_arrow_right.jpg)"
}
}
}

if (ie4||ns6)
document.onclick=checkcontained

//  End -->

//This is the popup menu script
                var intnumofmenuitems=5;
                var visibleVar="null";  

        //if (navigator.appName == "Netscape") {
        //        layerStyleRef="layer.";
        //       layerRef="document.layers";
        //        styleSwitch="";
        //        visibleVar="show";
        //}

        //else{
                layerStyleRef="layer.style.";
                layerRef="document.all";
                styleSwitch=".style";
                visibleVar="visible";
               // }

        function menu(layerName){
        var vers = navigator.appVersion;
                if (vers >= '4'){
                        showLayer(layerName);
                }
                //else if (vers > '4'){
                //        showLayer(layerName);
                //}
                //else if (vers < '4'){
                //}

        }
        function hideLayer(layerName){
                eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
                        removeothermenus(layerName);
        }       

        function showLayer(layerName){
                eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
                        removeothermenus(layerName);
        }
        function removeothermenus(layerName){

                intmenunumber=intnumofmenuitems;                
                while (intmenunumber>0){
                intcountdown="Submenu"+intmenunumber;
                        if (intcountdown!=layerName){
                                eval(layerRef+'["'+intcountdown+'"]'+styleSwitch+'.visibility="hidden"');
                        }
                intmenunumber-=1;
                intcountdown="Submenu"+intmenunumber;
                }
        }
//  End -->
function index() {
	var d = document;
	d.write('<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="492" height="202" id="hbaglr" align="middle" style="position: absolute; top:30">\n');
	d.write('<PARAM name="allowScriptAccess" value="sameDomain" />\n');
	d.write('<PARAM name="movie" value="/public/flash/hbaglr.swf" />\n');
	d.write('<PARAM name="quality" value="high" />\n');
	d.write('<PARAM name="bgcolor" value="#a5a5a5" />\n');
	d.write('<EMBED src="/public/flash/hbaglr.swf" quality="high" bgcolor="#a5a5a5" width="492" height="202" name="hbaglr" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	d.write('</OBJECT>\n');
}

var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
	if(pos=="random"){
			myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center"){
			myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!='center' && pos!="random") || pos==null){
			myleft=0;mytop=20
	}
	settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
	win.focus();
}

// Member Search Form Switching
	$(document).ready(function () {
		if( $('#search_dropdown') ){
			$('#search_dropdown').change(function() {
				if( $('#search_dropdown').val() == 'Associates'){
					$('#associate_search_form').show();
					$('#builder_search_form').hide();
				}
				else{
					$('#builder_search_form').show();
					$('#associate_search_form').hide();				
				}
			});
		}
	});
	
	// New
	$(document).ready(function () {
		if( $('#membership_group_name') ){
			$('#membership_group_name').change(function() {
				if( $('#membership_group_name').val() == 'associate,affiliate'){
					$('#assoc_type_of_work_1').show();
					$('#industry_header').show();
				}
				else{
					$('#assoc_type_of_work_1').hide();
					$('#industry_header').hide();
					$('#assoc_type_of_work_1').val(0);
				}
			});
		}
	});	
	
// End Member Search Form Switching




// Events Calendar
$(document).ready(function () {
	$('.date_has_event').each(function () {
		// options
		var distance = 10;
		var time = 250;
		var hideDelay = 100;

		var hideDelayTimer = null;

		// tracker
		var beingShown = false;
		var shown = false;

		var trigger = $(this);
		var popup = $('.events ul', this).css('opacity', 0);

		// set the mouseover and mouseout on both element
		$([trigger.get(0), popup.get(0)]).mouseover(function () {
			// stops the hide event if we move from the trigger to the popup element
			if (hideDelayTimer) clearTimeout(hideDelayTimer);

			// don't trigger the animation again if we're being shown, or already visible
			if (beingShown || shown) {
				return;
			} else {
				beingShown = true;

				// reset position of popup box
				popup.css({
					bottom: 20,
					left: -76,
					display: 'block' // brings the popup back in to view
				})

				// (we're using chaining on the popup) now animate it's opacity and position
				.animate({
					bottom: '+=' + distance + 'px',
					opacity: 1
				}, time, 'swing', function() {
					// once the animation is complete, set the tracker variables
					beingShown = false;
					shown = true;
				});
			}
		}).mouseout(function () {
			// reset the timer if we get fired again - avoids double animations
			if (hideDelayTimer) clearTimeout(hideDelayTimer);

			// store the timer so that it can be cleared in the mouseover if required
			hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				popup.animate({
					bottom: '-=' + distance + 'px',
					opacity: 0
				}, time, 'swing', function () {
					// once the animate is complete, set the tracker variables
					shown = false;
					// hide the popup entirely after the effect (opacity alone doesn't do the job)
					popup.css('display', 'none');
				});
			}, hideDelay);
		});
	});
});

// End Events Calendar