<!--

function preload(howmany,whichone) {
// gets the number of rollover images from the array (at navarray.js)
var imglength=eval(whichset+"nav").length;

// If browser supports dynamicimages, preloads them
if (document.images && howmany=="one") {

for (i=0; i<imglength; i++) {
eval("var imgsrc"+i+"="+whichset+"nav ["+i+"]");
}

// Active Images

eval("img"+whichone+"bright = new Image();");
eval("img"+whichone+"bright.src=\"images/th_"+eval('imgsrc'+whichone)+"_bright.gif\";");



// Selected Images
eval("img"+whichone+"dimplus = new Image();");
eval("img"+whichone+"dimplus.src=\"images/th_"+eval('imgsrc'+whichone)+"_dim1.gif\";");


// Inactive Images   
eval("img"+whichone+"dim = new Image();");
eval("img"+whichone+"dim.src=\"images/th_"+eval('imgsrc'+whichone)+"_dim.gif\";");

}

// If browser supports dynamicimages, preloads them
else if (document.images) {

for (i=0; i<imglength; i++) {
eval("var imgsrc"+i+"="+whichset+"nav ["+i+"]");
}

// Active Images
for (i=0; i<imglength; i++) {

eval("img"+i+"bright = new Image();");
eval("img"+i+"bright.src=\"images/th_"+eval('imgsrc'+i)+"_bright.gif\";");

}

// Selected Images
for (i=0; i<imglength; i++) {
eval("img"+i+"dimplus = new Image();");
eval("img"+i+"dimplus.src=\"images/th_"+eval('imgsrc'+i)+"_dim1.gif\";");
}

// Inactive Images   
for (i=0; i<imglength; i++) {
eval("img"+i+"dim = new Image();");
eval("img"+i+"dim.src=\"images/th_"+eval('imgsrc'+i)+"_dim.gif\";");
}
}





}

// Preloads bookmark/favorites

if (document.images) {

	// Deactivated Images
		bookmarkdim = new Image();
		bookmarkdim.src = "images/bookmark_off.gif";
		favoritesdim = new Image();
		favoritesdim.src = "images/favorites_off.gif";

	// Activated Images
		bookmarkbright = new Image();
		bookmarkbright.src = "images/bookmark_on.gif";	
		favoritesbright = new Image();
		favoritesbright.src = "images/favorites_on.gif";
				
	}     
     

var checkboxselected="nope";
// Simple select images
function simpleClick(imgName,divId) {
	alert (checkboxselected);
	if (document.images && checkboxselected=="yes") {
	var checkboxselected="nope";
	if (window.innerHeight) document[divId].document[imgName].src = eval(imgName + "dim.src");
	if (document.all) document[imgName].src = eval(imgName + "dim.src");


	}	
	else {
	var checkboxselected="yes";
	if (window.innerHeight) document[divId].document[imgName].src = eval(imgName + "bright.src");
	if (document.all) document[imgName].src = eval(imgName + "bright.src");


	}
}





// Function to 'activate' images.
function imgOn(imgName,divId) {
        if (document.images){
		

        if (floater == imgName) {
			if (document.layers) document[divId].document[imgName].src = eval(imgName + "dimplus.src");
			else document[imgName].src = eval(imgName + "dimplus.src");
			} 
        else {
            if (document.layers) document[divId].document[imgName].src = eval(imgName + "bright.src");
            else document[imgName].src = eval(imgName + "bright.src");
            }       
		}
}

// Function to 'deactivate' images.
function imgOff(imgName,divId) { 
        if (document.images) {
        if (floater == imgName) { 
			if (document.layers) document[divId].document[imgName].src = eval(imgName + "dimplus.src");
			else document[imgName].src = eval(imgName + "dimplus.src");
			}
		else {
			if (document.layers) document[divId].document[imgName].src = eval(imgName + "dim.src");
			else document[imgName].src = eval(imgName + "dim.src");
			}
        }       
}

// Function to 'change floater' 
function imgClick(imgName,divId) {
      if (document.images){
                if (document.layers) document[divId].document[floater].src = eval(floater + "dim.src");
            	else document[floater].src = eval(floater + "dim.src");
                floater = (imgName);       
				
                if (document.layers) document[divId].document[imgName].src = eval(imgName + "dimplus.src");
                else document[imgName].src = eval(imgName + "dimplus.src");
                }
}


// Dynamic Image functions for pages without CSS layers
// Function to activate images
function imgBright(imgName) {
     if (document.images) {
     document[imgName].src = eval(imgName + "bright.src");
     }
}

// Function to deactivate images
function imgDim(imgName) {
     if (document.images) {
     document[imgName].src = eval(imgName + "dim.src");
     }
}

// Function to activate images
function imgSelect(imgName) {
     if (document.images) {
     document[imgName].src = eval(imgName + "dimplus.src");
     }
}



// -->
