
// Image Functions
// changeImage() and preload() functions for rollovers and GIF animation
// 19990326

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/


preload('contact_off','../images/footer_contact.gif')
preload('contact_on','../images/footer_contact_on.gif')
preload('sitemap_off','../images/sitemap.gif')
preload('sitemap_on','../images/sitemap_on.gif')
preload('disclaimer_off','../images/disclaimer.gif')
preload('disclaimer_on','../images/disclaimer_on.gif')
preload('go_button_off','../images/go_button.gif')
preload('go_button_on','../images/go_button_on.gif')
preload('kidbox_off','../images/home_kidbox.gif')
preload('kidbox_on','../images/home_kidbox_on.gif')
preload('teenbox_off','../images/home_teenbox.gif')
preload('teenbox_on','../images/home_teenbox_on.gif')
preload('adultbox_off','../images/home_adultbox.gif')
preload('adultbox_on','../images/home_adultbox_on.gif')
preload('innerkids_off','../images/innernav_kids.gif')
preload('innerkids_on','../images/innernav_kids_on.gif')
preload('innerteens_off','../images/innernav_teens.gif')
preload('innerteens_on','../images/innernav_teens_on.gif')
preload('inneradults_off','../images/innernav_adults.gif')
preload('inneradults_on','../images/innernav_adults_on.gif')
preload('contact_us_off','../images/contact_us.gif')
preload('contact_us_on','../images/contact_us_on.gif')
preload('links_off','../images/links_off.gif')
preload('links_on','../images/links_on.gif')


function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}
function changeImage(layer,imgName,imgObj) {
	if (document.images) {
		if (document.layers && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src')
		else document.images[imgName].src = eval(imgObj+".src")
	}
}



// REMOVES THE LINK BORDER IN IE5/NS6
// original code by evil@chelu.ro
//
// USAGE:	getLinksToBlur();
// NOTES:	call it from within the preload function
// WORKS:	ie5+, ns6+, opera5+

	function unblur() {
		this.blur();
	}

	function getLinksToBlur() {
		if (!document.getElementById) return
		links = document.getElementsByTagName("a");
		for(i=0; i<links.length; i++) {
			links[i].onfocus = unblur
		}
	}


// THE NS CSS RELOAD
// original code from http://www.webmonkey.com/
//
// USAGE:	call it from within the html page
// NOTES:	place on frameset page if used on a frames-based website
// WORKS:	ns4

	function MM_reloadPage(init) {
		if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
			
	MM_reloadPage(true);


// PULLDOWN FORM GOTO
// 

      function goToSelectedUrl() {
          // get number of option that is currently selected
          var number = window.document.quicknav.next_url.selectedIndex;
          // assign the value of that option to the href property of the
          // navigator object
          if (number != 0) {
              window.location.href = window.document.quicknav.next_url.options[number].value;
          }
      }

