// for navicon text
var navicon_text = new Array(3);
navicon_text[0] = "HOME";
navicon_text[1] = "ABOUT US";
navicon_text[2] = "OUR TOURS";
navicon_text[3] = "PHOTO GALLERY";

/* navicon images code*/
navicon_home_off = new Image();
navicon_home_off.src = "images/navicon.tent.off.gif";
navicon_home_on = new Image();
navicon_home_on.src = "images/navicon.tent.on.gif";

navicon_aboutus_off = new Image();
navicon_aboutus_off.src = "images/navicon.flag.off.gif";
navicon_aboutus_on = new Image();
navicon_aboutus_on.src = "images/navicon.flag.on.gif";

navicon_gallery_off = new Image();
navicon_gallery_off.src = "images/navicon.gallery.off.gif";
navicon_gallery_on = new Image();
navicon_gallery_on.src = "images/navicon.gallery.on.gif";

navicon_tours_off = new Image();
navicon_tours_off.src = "images/navicon.footprint.off.gif";
navicon_tours_on = new Image();
navicon_tours_on.src = "images/navicon.footprint.on.gif";


function naviconOver(imgName, newStateImage, text_id){
  // swap image
  document.getElementById(imgName).src = eval(newStateImage+".src");
  
  var caption = navicon_text[text_id];
  var caption_span = document.getElementById("navicons_text");
  var oldText = caption_span.childNodes.item(0);
  var newText = document.createTextNode(caption);
  var replaced = caption_span.replaceChild(newText,oldText);
}

function naviconOut(imgName, newStateImage){
  // swap image
  document.getElementById(imgName).src = eval(newStateImage+".src");
  
  var caption = "GREAT EARTH EXPEDITIONS";
  var caption_span = document.getElementById("navicons_text");
  var oldText = caption_span.childNodes.item(0);
  var newText = document.createTextNode(caption);
  var replaced = caption_span.replaceChild(newText,oldText);
}

/* icon images code*/
// for icon text
var icon_text = new Array(3);
icon_text[0] = "RESERVATION FORM";
icon_text[1] = "BOOKMARK THIS SITE";
icon_text[2] = "JOIN OUR DATABASE";
icon_text[3] = "EMAIL A FRIEND";
icon_text[4] = "USEFUL LINKS";


/* icon images code*/

icon_info_off = new Image();
icon_info_off.src = "images/icon.info.off.gif";
icon_info_on = new Image();
icon_info_on.src = "images/icon.info.on.gif";

icon_contact_off = new Image();
icon_contact_off.src = "images/icon.contact.off.gif";
icon_contact_on = new Image();
icon_contact_on.src = "images/icon.contact.on.gif";

icon_mail_off = new Image();
icon_mail_off.src = "images/icon.email.off.gif";
icon_mail_on = new Image();
icon_mail_on.src = "images/icon.email.on.gif";

icon_signup_off = new Image();
icon_signup_off.src = "images/icon.joindb.off.gif";
icon_signup_on = new Image();
icon_signup_on.src = "images/icon.joindb.on.gif";

icon_links_off = new Image();
icon_links_off.src = "images/icon.links.off.gif";
icon_links_on = new Image();
icon_links_on.src = "images/icon.links.on.gif";

function iconOver(imgName, newStateImage, text_id){
  // swap image
  document.getElementById(imgName).src = eval(newStateImage+".src");
  
  var caption = icon_text[text_id];
  var caption_span = document.getElementById("icons_text");
  var oldText = caption_span.childNodes.item(0);
  var newText = document.createTextNode(caption);
  var replaced = caption_span.replaceChild(newText,oldText);
}

function iconOut(imgName, newStateImage){
  // swap image
  document.getElementById(imgName).src = eval(newStateImage+".src");
  
  var caption = "";
  var caption_span = document.getElementById("icons_text");
  var oldText = caption_span.childNodes.item(0);
  var newText = document.createTextNode(caption);
  var replaced = caption_span.replaceChild(newText,oldText);
}
  
function popwindow(imageurl, winname, winfeatures) {
  window.open(imageurl,winname,winfeatures); 
}
function setLocation(url) {
  window.location=url; 
}
function setPhoto(imgName, newStateImage){
  document.getElementById(imgName).src = eval(newStateImage+".src");
}
function addBookmark(page_url, page_title) {
  if (window.sidebar) {
     // firefox
  	window.sidebar.addPanel(page_title, page_url, "");
  }
  else if(window.opera && window.print){ // opera
  	var elem = document.createElement('a');
  	elem.setAttribute('href',page_url);
  	elem.setAttribute('title',page_title);
  	elem.setAttribute('rel','sidebar');
  	elem.click();
  }
  else if(document.all) {
  	window.external.AddFavorite(page_url,page_title);
  }
}








