
// Set the relative path for use later
var path = '';
function setPath(path_arg) {
    path = path_arg;
}


function newImage(arg) {
	rslt = new Image();
	rslt.src = arg;
	return rslt;
}


function preloadImages() {
	if (document.images) {
		about_over = newImage(path+"images/about-over.gif");
		news_over = newImage(path+"images/news-over.gif");
		events_over = newImage(path+"images/events-over.gif");
		clinics_over = newImage(path+"images/clinics-over.gif");
		certification_over = newImage(path+"images/certification-over.gif");
		eapd_over = newImage(path+"images/eapd-over.gif");
		video_over = newImage(path+"images/video-over.gif");
		forum_over = newImage(path+"images/forum-over.gif");		
		store_over = newImage(path+"images/store-over.gif");
		contact_over = newImage(path+"images/contact-over.gif");
	}
}


function setupNav() {
    setupNavListItem('about');
    setupNavListItem('news');
    setupNavListItem('events');
    setupNavListItem('clinics');
    setupNavListItem('certification');
    setupNavListItem('eapd');
	setupNavListItem('video');
	setupNavListItem('forum');
    setupNavListItem('store');
    setupNavListItem('contact');    
	
}

function setupNavListItem(item) {
	o = document.getElementById("li_"+item);
	o.onmouseover=function() {
        document[item].src = path+'images/'+item+'-over.gif';
	    this.className="over";
        return true;
	    
	}
	o.onmouseout=function() {
        document[item].src = path+'images/'+item+'.gif';
	    this.className="";
        return true;
	}
}

