//brian's javascript
//I don't know what I am doing
//2003

/* ========  NAVIGATION FUNCTIONS  =======================*/
if (document.images) {

// load the images and assign it the file sources

	// Load the home navigation images
   var home = new Image();
   home.src =  "../img/nav_home.gif"; 
   var home_o = new Image();
   home_o.src =  "../img/nav_home_o.gif";
   
   // Load the parts navigation images
   var parts = new Image();
   parts.src =  "../img/nav_parts.gif"; 
   var parts_o = new Image();
   parts_o.src =  "../img/nav_parts_o.gif"; 
   
   // Load the SERVICE navigation images
   var service = new Image();
   service.src =  "../img/nav_service.gif"; 
   var service_o = new Image();
   service_o.src =  "../img/nav_service_o.gif"; 
   
   // Load the CONTACT navigation images
   var contact = new Image();
   contact.src =  "../img/nav_contact.gif"; 
   var contact_o = new Image();
   contact_o.src =  "../img/nav_contact_o.gif"; 
    
   // Load the COMMUNITY navigation images
   var community = new Image();
   community.src =  "../img/r_nav_comm.gif"; 
   var community_o = new Image();
   community_o.src =  "../img/r_nav_comm_o.gif"; 
   
   // Load the CLASSIFIED navigation images
   var classified = new Image();
   classified.src =  "../img/r_nav_class.gif"; 
   var classified_o = new Image();
   classified_o.src =  "../img/r_nav_class_o.gif"; 
   
   // Load the ADVENTURES navigation images
   var adventures = new Image();
   adventures.src =  "../img/r_nav_adv.gif"; 
   var adventures_o = new Image();
   adventures_o.src =  "../img/r_nav_adv_o.gif"; 
   
}
function swap_home(state) {
	if (state) {
		document["home"].src = home_o.src;
	} else {
		document["home"].src = home.src;
	}
}
function swap_parts(state) {
	if (state) {
		document["parts"].src = parts_o.src;
	} else {
		document["parts"].src = parts.src;
	}
}
function swap_service(state) {
	if (state) {
		document["service"].src = service_o.src;
	} else {
		document["service"].src = service.src;
	}
}

function swap_contact(state) {
	if (state) {
		document["contact"].src = contact_o.src;
	} else {
		document["contact"].src = contact.src;
	}
}

function swap_community(state) {
	if (state) {
		document["community"].src = community_o.src;
	} else {
		document["community"].src = community.src;
	}
}

function swap_classified(state) {
	if (state) {
		document["classified"].src = classified_o.src;
	} else {
		document["classified"].src = classified.src;
	}
}
function swap_adventures(state) {
	if (state) {
		document["adventures"].src = adventures_o.src;
	} else {
		document["adventures"].src = adventures.src;
	}
}
/*  =========== OTHER FUNCTIONS ======================*/
function add_part(url){
//this opens a new window to add a part
	window.open(url);
}

function openwindow(url,x,y)
{
	/*window.open(url,"part_picture","toolbar=yes,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,copyhistory=yes,width=400,height=400")*/
  window.open(url,"part_picture","toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width="+y+",height="+x);
}
/* =========----------------------------------------------------------------
Document History:
8/18		Added adventures roll over

*/
