<!-- 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="hbaglr.swf" />\n');
	d.write('<PARAM name="quality" value="high" />\n');
	d.write('<PARAM name="bgcolor" value="#a5a5a5" />\n');
	d.write('<EMBED src="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');
}

function ValidateForm(myForm) {
	var validate = true;
	var el; var firstEl;
	
	for(i=0; i < myForm.length; i++) {
		el = myForm.elements[i];
		if (el.className.indexOf('required') != -1) {
			if(el.value == '') {
				// set the background color and set validate to false
				var old_color = el.style.backgroundColor;
				el.style.backgroundColor = '#FFFFCF';
				el.onblur = function() {
					if(this.value != '') {
						this.style.backgroundColor = old_color;
					}
				}
				validate = false;
				
				// if this is the first one, focus on it (later)
				if(firstEl == null) {firstEl = el;}
			}
		}
	}
	
	if(validate) {
		return true;
	} else {
		alert("Please fill in all required fields");
		firstEl.focus();
	}
	return false;
}


/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  *
  * Title : 		Preview Your Links with Unobtrusive JavaScript
  * Author : 		Chris Campbell
  * URL : 		http://particletree.com/features/preview-your-links
  *
  * Description :	Inspired by the TargetAlert Firefox extension that “provides visual cues for
  *			the destinations of hyperlinks” and Christian Heilmann’s Image previews with 
  *			DOM JavaScript, we wrote a simple set of unobtrusive JavaScript functions to 
  *			find links on a page that go to amazon product pages, pdfs, word documents or
  *			whatever destination that might slow down the browsing process and adds an 
  *			icon next to them to let you know what you might expect to find behind a link.
  *
  * Created : 	7/24/2005
  * Modified : 	7/27/2005
  *
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/


//code enters here
addEvent(window, 'load', linkPreview);

/*
  * Summary:	Attaches an event to the object passed in
  *			Script written by Christian Heilmann at http://www.onlinetools.org/articles/unobtrusivejavascript/chapter4.html
  * Parameters: 	Object to attach event to | type of event to attach | function call
  * Return: 		Boolean indicating success or failure
  */
function addEvent(obj, evType, fn){ 
	if (obj.addEventListener){ 
		obj.addEventListener(evType, fn, false); 
		return true; 
	} 
	else if (obj.attachEvent){ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	}
	else { 
		return false; 
	} 
}

/*
  * Summary:	Grabs all non-image links from the page and calls checkLinks() if amazon.com is not located in the link 
  */
function linkPreview(){
	var links = document.getElementsByTagName("a");

	for (i=0; i<links.length; i++){
		var currentLink = links[i];
		var	images = currentLink.getElementsByTagName("img");
		
	 	// Check if the link is an image. We don't want icons next to images.
		if (images.length == 0){
			var linkHref = currentLink.href;
			
			// Find all links directed to amazon.com 
			if (linkHref.match(/amazon.com/)){
				append(currentLink, "amazon");
			}
			else{
				checkLinks(linkHref, currentLink)
			}
		}
	}
}

/*
  * Summary:	Checks if the link goes to an external file (ie. .doc, .pdf) and calls append()
  * Parameters: 	The href of the link | the <a> object 
  */
function checkLinks(linkHref, currentLink){
	var linkHrefParts = linkHref.split(".");
	
	// extension is the last element in the LinkSplit array
	var extension = linkHrefParts[linkHrefParts.length - 1];
	
	// In some browsers there is a "/" placed after the link. removes the "/"
	extension = extension.replace("/","");
	
	if( extension in { doc:1, pdf:1, ppt:1, txt:1, xls:1, zip:1 } ){
		append(currentLink, extension );
	}
}

/*
  * Summary:	Creates a span after the object passed in and sets the class to the link type
  * Parameters: 	<a> object | external link type
  */
function append(currentLink, extension){
	var span = document.createElement('span');
	span.innerHTML = "&nbsp;";
	currentLink.parentNode.insertBefore(span,currentLink.nextSibling);
	span.className = extension;
}
