if (document.images) {

	homeon = new Image();
	homeon.src = "/images/nav/abf-home-over.gif";
	fivestaron = new Image();
	fivestaron.src = "/images/nav/abf-nav_featured_franchises-over.gif";
	pickson = new Image();
	pickson.src = "/images/nav/abf-nav_franchises_just_added-over.gif";
	popularon = new Image();
	popularon.src = "/images/nav/abf-popular-over.gif";
	risingon = new Image();
	risingon.src = "/images/nav/abf-rising-over.gif";
	abouton = new Image();
	abouton.src = "/images/nav/abf-about-over.gif";
	contacton = new Image();
	contacton.src = "/images/nav/abf-contact-over.gif";

	homeoff = new Image();
	homeoff.src = "/images/nav/abf-home.gif";
	fivestaroff = new Image();
	fivestaroff.src = "/images/nav/abf-nav_featured_franchises.gif";
	picksoff = new Image();
	picksoff.src = "/images/nav/abf-nav_franchises_just_added.gif";
	popularoff = new Image();
	popularoff.src = "/images/nav/abf-popular.gif";
	risingoff = new Image();
	risingoff.src = "/images/nav/abf-rising.gif";
	aboutoff = new Image();
	aboutoff.src = "/images/nav/abf-about.gif";
	contactoff = new Image();
	contactoff.src = "/images/nav/abf-contact.gif";
}

function Highlight(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + 'on.src');
	}
}

function Regular(imageName) {
	if (document.images) {
		document[imageName].src = eval(imageName + 'off.src');
	}
}

//=====================================================================
//  DOM Image Rollover v3 (hover)
//
//  Demo: http://chrispoole.com/scripts/dom_image_rollover_hover
//  Script featured on: Dynamic Drive (http://www.dynamicdrive.com)
//=====================================================================
//  copyright Chris Poole
//  http://chrispoole.com
//  This software is licensed under the MIT License 
//  <http://opensource.org/licenses/mit-license.php>
//=====================================================================

function domRollover() {
    if (navigator.userAgent.match(/Opera (\S+)/)) {
        var operaVersion = parseInt(navigator.userAgent.match(/Opera (\S+)/)[1]);
    }
    if (!document.getElementById || operaVersion < 7) return;
    var imgarr = document.getElementsByTagName('img');
    var imgPreload = new Array();
    var imgSrc = new Array();
    var imgClass = new Array();
    for (i = 0; i < imgarr.length; i++) {
        if (imgarr[i].className.indexOf('domroll') != -1) {
            imgSrc[i] = imgarr[i].getAttribute('src');
            imgClass[i] = imgarr[i].className;
            imgPreload[i] = new Image();
            if (imgClass[i].match(/domroll (\S+)/)) {
                imgPreload[i].src = imgClass[i].match(/domroll (\S+)/)[1]
            }
            imgarr[i].setAttribute('xsrc', imgSrc[i]);
            imgarr[i].onmouseover = function () {
                this.setAttribute('src', this.className.match(/domroll (\S+)/)[1])
            }
            imgarr[i].onmouseout = function () {
                this.setAttribute('src', this.getAttribute('xsrc'))
            }
        }
    }
}
domRollover();
