// Copyright (c) 1999-2003 Cyber-dynamics Inc. All Rights Reserved

 
var img = new Array(),imgs = new Array(),iReady=false;

function supportsSwapping() {
	var appname= navigator.appName;
	var appversion = navigator.appVersion;
	var majorver = appversion.substring(0, 1);
	if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;
	if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
	return 0;
}

function getImages(){
	if (supportsSwapping()) {
		imgs[0] = "images/CreatureMontho.gif";
		imgs[1] = "images/CreatureMonth.gif";
		imgs[2] = "images/AnimalGalleryo.gif";
		imgs[3] = "images/AnimalGallery.gif";
		imgs[4] = "images/InterestingFactso.gif";
		imgs[5] = "images/InterestingFacts.gif";
		imgs[6] = "images/homeo.gif";
		imgs[7] = "images/home.gif";
		imgs[8] = "images/aboutuso.gif";
		imgs[9] = "images/aboutus.gif";
		imgs[10] = "images/zooso.gif";
		imgs[11] = "images/zoos.gif";
		imgs[12] = "images/wildlifeo.gif";
		imgs[13] = "images/wildlife.gif";
		imgs[14] = "images/joinuso.gif";
		imgs[15] = "images/joinus.gif";
		imgs[16] = "images/supportuso.gif";
		imgs[17] = "images/supportus.gif";
		imgs[18] = "images/newso.gif";
		imgs[19] = "images/news.gif";
		imgs[20] = "images/contactuso.gif";
		imgs[21] = "images/contactus.gif";
		imgs[22] = "images/donationso.gif";
		imgs[23] = "images/donations.gif";
		imgs[24] = "images/sponsoro.gif";
		imgs[25] = "images/sponsor.gif";
		imgs[26] = "images/subscribeo.gif";
		imgs[27] = "images/subscribe.gif";
		imgs[28] = "images/i_addfo.gif";
		imgs[29] = "images/i_addf.gif";
		imgs[30] = "images/i_emailpo.gif";
		imgs[31] = "images/i_emailp.gif";
		imgs[32] = "images/i_makeh2o.gif";
		imgs[33] = "images/i_makeh2.gif";
		imgs[34] = "images/i_printpo.gif";
		imgs[35] = "images/i_printp.gif";
		for (var i = 0; i < imgs.length; i++) {
			img[i] = new Image();
			img[i].src = imgs[i];
		}
		iReady=true;
	}
}

function sw(i,imgn){
	if(iReady){
		
	document[imgn].src=img[i].src;
	
} }

function init() {
	getImages();
}

function bookM(){if (document.all){var uRL=self.location.href,txt=self.document.title;window.external.AddFavorite(uRL,txt);}else{alert("Please click OK then press CTRL-D");}}

function homeP(){if (document.all){document.all[0].style.behavior='url(#default#homepage)';document.all[0].setHomePage(self.location.href);}else{alert("Please click OK then View/Options or Parameters and set Current Page as Home Page");}}

function printP(){if (parseInt(navigator.appVersion)>=4){window.print();}else{alert("This action is not supported by your browser\nPlease select File/Print");}}

/* FROM MANAGING THE NUMBERS */

function showH(iName,iShow) {
 var oDiv,oDiz,sCon="#990000", sCoff="#666666"; 
 if(document.layers){oDiz=document.all[iName+"z"].style;oDiv=document.all[iName].style;}
 else{if(document.all){oDiz=document.all[iName+"z"].style;oDiv=document.all[iName].style;}
 else{if(document.getElementById){oDiz=document.getElementById(iName+"z").style;oDiv=document.getElementById(iName).style;}}}
 oDiz.visibility=iShow?"visible":"hidden";oDiv.background=iShow?sCon:sCoff;
}
function clickClear(oMe,sVal) {if (oMe.value==sVal){oMe.value='';}}



function submitSub() {
var f=document.newsletterActions,sErr='';
 if ((badEmail(f.Email.value))||(f.Email.value=='youremail@host.com')){sErr += ', Email'}
 if(sErr){alert('Please check the following entries and resubmit:\n'+sErr.substr(2));
 }else{
  if (popper) {if (! popper.closed) {popper.close();}}
  popUp('MYZdownload.html',100,100,220,350);
  tellWait();
  f.title.value=document.title;
  f.target="popper";
  f.submit();
  }
  return false;
}

function tellWait() {var s="<html><head><title>Downloading - please wait</title></head><body bgcolor='#99CC99'><p style='text-align:center;font-family:Arial,Helvetica,sans-serif;font-size:11px;'><br /><br /><b>D O W N L O A D I NG</b><br /><br />Please Wait</p></body></html>";
popper.document.open;popper.document.write(s);popper.document.close;}
function sStatus(sStr) {window.status=sStr;document.returnValue=true;}
function badEmail(str){if (isBlank(str)||(str.indexOf("@")==-1)||(str.indexOf(".")==-1)||(str.length<6)){return true}else{return false}}	  
function isBlank(str){if(str.length==0){return true};for(i=0;i<=str.length-1;i++){if(str.charAt(i)!=" "){return false}}return true;}
var popper; function popUp(url,pLeft,pTop,pWidth,pHeight){var str='left='+pLeft+',top='+pTop+',width='+pWidth+',height='+pHeight+',resizable=no,scrollbars=no';url=url; 
popper=window.open(url,"popper",str);if (!popper.opener){popper.opener = self;}if (popper.focus != null) {popper.focus();}return false;}

window.defaultStatus=document.title;
function mSt(s) {window.status=s;document.returnValue=true;}