// dealer_menu.js
// image preload and manipulation for dealer pages

function open_pop(url) {
	jpegwindow = window.open(url,"jpegwindow",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=680,height=300');
}

// IMG Preloader
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
	
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		Cry300 = newImage("images/fac_m_magnum2.jpg");
		
		// ----------------------------------------------
		// ADD ALL NEW MOUSEOVER IMAGES
		
		preloadFlag = true;
	}
}
// End IMG Preloader


function gotosite(site) {
	if (site != "") {
		self.location=site;
	}
}

bName = navigator.appName;

bVer = parseInt(navigator.appVersion);
if ((bName == "Netscape" && bVer >= 3) ||
        (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3";

else br = "n2";

// Create image objects, preload all active and inactive images.

if (br== "n3") {

        img1on = new Image();
        img1on.src = "images/but1on.gif";
        img2on = new Image();
        img2on.src = "images/but2on.gif";
        img3on = new Image();
        img3on.src = "images/but3on.gif";
        img4on = new Image();
        img4on.src = "images/but4on.gif";
        img5on = new Image();
        img5on.src = "images/but5on.gif";
        img6on = new Image();
        img6on.src = "images/but6on.gif";
        img7on = new Image();
        img7on.src = "images/but7on.gif";
        img8on = new Image();
        img8on.src = "images/dea_but1on.gif";
	    img9on = new Image();
        img9on.src = "images/dea_but2on.gif";
	    img10on = new Image();
        img10on.src = "images/dea_but3on.gif";	
	    img11on = new Image();
        img11on.src = "images/dea_but4on.gif";	
	    img12on = new Image();
        img12on.src = "images/dea_but5on.gif";	
	    img13on = new Image();
        img13on.src = "images/cor_but9on.gif";		
		
        img1off = new Image();
        img1off.src = "images/but1.gif";
        img2off = new Image();
        img2off.src = "images/but2.gif";
        img3off = new Image();
        img3off.src = "images/but3.gif";
        img4off = new Image();
        img4off.src = "images/but4.gif";
        img5off = new Image();
        img5off.src = "images/but5.gif";
        img6off = new Image();
        img6off.src = "images/but6.gif";
        img7off = new Image();
        img7off.src = "images/but7.gif";
        img8off = new Image();
        img8off.src = "images/dea_but1.gif";
	    img9off = new Image();
        img9off.src = "images/dea_but2.gif";
	    img10off = new Image();
        img10off.src = "images/dea_but3.gif";	
	    img11off = new Image();
        img11off.src = "images/dea_but4.gif";	
	    img12off = new Image();
        img12off.src = "images/dea_but5.gif";
	    img13off = new Image();
        img13off.src = "images/cor_but9.gif";
	
	// Shop Boston button
	imgshopoff = new Image();
	imgshopoff.src = "images/index_shopboston.gif";
	imgshopon = new Image();
	imgshopon.src = "images/index_shopboston_on.gif";
}

function imgAct(imgName) {
        if (br == "n3") {
                document[imgName].src = eval(imgName + "on.src");
        }
}

function imgInact(imgName) {
        if (br == "n3") {
                document[imgName].src = eval(imgName + "off.src");
        }
}

