var imgLoc = "images/"
var imgExt = ".jpg";
var fileExt = ".htm";

function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}
    
function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

//IFrame Height Calculator

function calcHeight1()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('the_iframe1').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('the_iframe1').height=
      the_height;
}

function calcHeight2()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('the_iframe2').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('the_iframe2').height=
      the_height;
}

function newWin(url) {
  // url of this function should have the format: "target,URL".
  if (url == "")
    return;
  window.open(url.substring(url.indexOf(",") + 1, url.length), 
	url.substring(0, url.indexOf(",")));
}

function setupDescriptions() {
  var x = navigator.appVersion;
  y = x.substring(0,4);
  if (y>=4) setVariables();
}

var x,y,myValue,n;

function setVariables(){
  if (navigator.appName == "Netscape") {
    h=".left=";
    v=".top=";
    dS="document.";
    sD="";
    }
  else 
    {
    h=".pixelLeft=";
    v=".pixelTop=";
    dS="";
    sD=".style";
    }
}

var isNav = (navigator.appName.indexOf("Netscape") !=-1);

function popLayer(myValue){
  desc = '<TABLE CELLPADDING=1 WIDTH="100%" ';

  if (myValue==1) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Start!</b></TD></TR>';
  if (myValue==2) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==3) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==4) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==5) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==6) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==7) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==8) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==9) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==10) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Hot!</b></TD></TR>';
  if (myValue==11) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Warm</b></TD></TR>';
  if (myValue==12) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Warm</b></TD></TR>';
  if (myValue==13) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Warm</b></TD></TR>';
  if (myValue==14) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>COLD</b></TD></TR>';
  if (myValue==15) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>COLD</b></TD></TR>';
  if (myValue==16) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>COLD</b></TD></TR>';
  if (myValue==17) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>COLD</b></TD></TR>';
  if (myValue==18) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>COLD</b></TD></TR>';
  if (myValue==19) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Gonna Do It!</b></TD></TR>';
  if (myValue==20) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>You Did It!</b></TD></TR>';
  if (myValue==21) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Sophie & Woody</b> are the absent-minded adoptive parents of Cricket.  Despite being adults, they are always one step behind Cricket and Dingo&#39;s plan to help a homeless pet.  Sophie is the quintessential housewife with simple tastes when it comes to fashion.  Woody is the all-American, squared-jaw dad, who is rarely seen, but often heard…especially, when he belts out his signature one-liner "Criiiiiiiiiiiick-etttt!!!!"  In the end, Sophie & Woody&#39;s unconditional love for Cricket, Dingo, and Trixie serve as the backdrop of this on-going story.</TD></TR>';
  if (myValue==22) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Sophie & Woody</b> are the absent-minded adoptive parents of Cricket.  Despite being adults, they are always one step behind Cricket and Dingo&#39;s plan to help a homeless pet.  Sophie is the quintessential housewife with simple tastes when it comes to fashion.  Woody is the all-American, squared-jaw dad, who is rarely seen, but often heard…especially, when he belts out his signature one-liner "Criiiiiiiiiiiick-etttt!!!!"  In the end, Sophie & Woody&#39;s unconditional love for Cricket, Dingo, and Trixie serve as the backdrop of this on-going story.</TD></TR>';
  if (myValue==23) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Cricket</b> is an eternal optimist.  This precocious 6 year-old is the adopted daughter of Sophie & Woody.  Cricket loves nothing more than helping animals and is often involved in Dingo&#39;s elaborate plans to help out a homeless pet.  Cricket is the only one who can communicate with Dingo although we never hear him speak.  Despite Sophie & Woody&#39;s perpetual skepticism of Cricket&#39;s passion for pet rescue, she always finds a way in the end.</TD></TR>';
  if (myValue==24) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Trixie</b> is a cranky, old Siamese cat, who serves as Dingo&#39;s close friend and travel companion.  She can only communicate through her angry meows and body language... ironically, her meows and actions often confuse Dingo more than anyone else.  Trixie&#39;s neurotic behavior is best exemplified by her constant need for affection by rubbing up against Dingo…but also her need to control him with the swipe of a claw.</TD></TR>';
  if (myValue==25) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> <b>Dingo</b> the dog is a 4-year old blond lab-chow mix that loves long walks and traveling around the world helping homeless pets find a home…you can usually find him hanging out with his sidekick, Trixie, a cranky, old Siamese cat. Dingo the Dog lives with a little girl named Cricket and her absent-minded, pet-loving parents, Woody and Sophie.  Dingo has a "love/hate" relationship with Trixie, who constantly rubs against Dingo for affection but occasionally keeps him "in-check" with the swipe of a claw.</TD></TR>';
  if (myValue==998) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> Welcome to the Dingo the Dog Family Page. Mouseover an image to receive a complete description of each character.</TD></TR>';
  if (myValue==999) desc += 'BORDER=0 BGCOLOR="#FFFFFF"><TR><TD class="news4" WIDTH="100%"><img src="images/pawprint_sm.jpg" WIDTH=25 HEIGHT=26> Help Dingo find Cricket!</TD></TR>';

  desc += "</TABLE>";

  if(isNav) {
    document.object1.document.write(desc);
    document.object1.document.close();
    }
  else 
    {
    object1.innerHTML=desc;
    }
}

function viewEvents(url, name) {
	var win = window.open(url,name,'width=640,height=550,resizable=no,scrollbars=no');
	win.focus();
     }

//Event0 functions

function changeImage()
{
  mainimage.src = imgLoc + list.options[list.selectedIndex].value + imgExt;
}

function prevImage()
{
	if(list.selectedIndex == 0)
	{
		list.selectedIndex = list.options.length-1;
	}
	else
	{
		list.selectedIndex--;
	}
	changeImage();
}

function nextImage()
{
	if(list.selectedIndex == list.options.length-1)
	{
		list.selectedIndex = 0;
	}
	else
	{
		list.selectedIndex++;
	}
	changeImage();
}

//Event1 functions

function changeImage1()
{
  mainimage1.src = imgLoc + list1.options[list1.selectedIndex].value + imgExt;
}

function prevImage1()
{
	if(list1.selectedIndex == 0)
	{
		list1.selectedIndex = list1.options.length-1;
	}
	else
	{
		list1.selectedIndex--;
	}
	changeImage1();
}

function nextImage1()
{
	if(list1.selectedIndex == list1.options.length-1)
	{
		list1.selectedIndex = 0;
	}
	else
	{
		list1.selectedIndex++;
	}
	changeImage1();
}

//Event2 functions

function changeImage2()
{
  mainimage2.src = imgLoc + list2.options[list2.selectedIndex].value + imgExt;
}

function prevImage2()
{
	if(list2.selectedIndex == 0)
	{
		list2.selectedIndex = list2.options.length-1;
	}
	else
	{
		list2.selectedIndex--;
	}
	changeImage2();
}

function nextImage2()
{
	if(list2.selectedIndex == list2.options.length-1)
	{
		list2.selectedIndex = 0;
	}
	else
	{
		list2.selectedIndex++;
	}
	changeImage2();
}

//Event3 functions

function changeImage3()
{
  mainimage3.src = imgLoc + list3.options[list3.selectedIndex].value + imgExt;
}

function prevImage3()
{
	if(list3.selectedIndex == 0)
	{
		list3.selectedIndex = list3.options.length-1;
	}
	else
	{
		list3.selectedIndex--;
	}
	changeImage3();
}

function nextImage3()
{
	if(list3.selectedIndex == list3.options.length-1)
	{
		list3.selectedIndex = 0;
	}
	else
	{
		list3.selectedIndex++;
	}
	changeImage3();
}

//Event4 functions

function changeImage4()
{
  mainimage4.src = imgLoc + list4.options[list4.selectedIndex].value + imgExt;
}

function prevImage4()
{
	if(list4.selectedIndex == 0)
	{
		list4.selectedIndex = list4.options.length-1;
	}
	else
	{
		list4.selectedIndex--;
	}
	changeImage4();
}

function nextImage4()
{
	if(list4.selectedIndex == list4.options.length-1)
	{
		list4.selectedIndex = 0;
	}
	else
	{
		list4.selectedIndex++;
	}
	changeImage4();
}