//preload images

/* MX-DEV code

var hover_dir = "javascript/images/nav/hover/";
var off_dir = 	"javascript/images/nav/off/";
var tooldir = "javascript/images/";

*/

/* WWW code */
var hover_dir = "http://michaelmarcotte.com/javascript/images/nav/hover/";
var off_dir = 	"http://michaelmarcotte.com/javascript/images/nav/off/";
var tooldir = "javascript/images/";
/* 
*/



    if (document.images) 
    {
	
		bluebg = new Image(1,10000);
	//	bluebg.src = "javascript/images/whitebackground.gif";
		bluebg.src = "http://michaelmarcotte.com/javascript/images/whitebackground.gif";
	
	
        home1 = new Image(153,22);
        home1.src = hover_dir + "home.gif";
        home2 = new Image(153,22);
        home2.src = off_dir + "home.gif";

        family1 = new Image(153,22);
        family1.src = hover_dir + "family.gif";
        family2 = new Image(153,22);
        family2.src = off_dir + "family.gif";

      	blank21 = new Image(153,22);
        blank21.src = hover_dir + "blank.gif";
        blank22 = new Image(153,22);
        blank22.src = off_dir + "blank.gif"; 

        blank31 = new Image(153,22);
        blank31.src = hover_dir + "blank.gif";
        blank32 = new Image(153,22);
        blank32.src = off_dir + "blank.gif";

        blank4 = new Image(153,22);
        blank41.src = hover_dir + "blank.gif";
        blank42 = new Image(153,22);
        blank42.src = off_dir + "blank.gif";
       
		
 }

    // simple image replacement

    function swapImg(imgDocID,imgObjName){ 
//	window.alert(imgDocID);
//	window.alert(imgObjName);	
//  window.alert(eval(imgObjName + ".src"));		
	
	if (document.images){ 
        document.images[imgDocID].src = eval(imgObjName + ".src"); 
	   }
    }
	
	function ClearField (thefield) {
		thefield.value = "";
	}

	
    // functions to show and hide quotes in sidebar

    function showQuote(id){
        if (quote = document.getElementById(id))
        {
            //quote.style.top = document.body.scrollTop + 200;
            quote.style.top = document.body.scrollTop + (document.body.clientHeight / 2) - 100;			
            //quote.style.left = document.body.clientWidth - 187;
            quote.style.visibility = "visible";
        }
    }

    function hideQuote(id)
    {
        if (quote = document.getElementById(id))
        {
            quote.style.visibility = "hidden";
        }
    }	
