function changeFAQImage(num) {
   document["mainpic"].src = faqImages[num].src;
}

function changeImage(imgName, imagePath) {
  document[imgName].src = imagePath;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

var galleryImages = new Array();
function preloadGalleryImages(galleryName, numImages) {
   var galleryName = imageRoot;
   var numImages = totalBoxes;
   var imageNum;

   for (var i = 1; i <= numImages; i++) {
       if (i < 10) {
	  imageNum = "00" + i;
       }
       else if (i < 100) {
	  imageNum = "0" + i;
       }      
       else {
          imageNum = i;
       }
       
       galleryImages[i-1] = new Image();
       galleryImages[i-1].src = galleryName  + imageNum + ".jpg";
   }
}

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

function showDogGalleryMenu() {
    document.images['gallery_menu'].src = 'images/gallery_menu.gif';
}

/*  
 *  This Function is used to work around an IE "feature" that causes
 *  a grey line to go around the edge of the flash video. Putting
 *  the object and embeded tags directly into html will result
 *  in the gray line. This is not a problem on firefox/mozilla
 */
function writeDogSlideshow() {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="761" height="447" id="homepage" align="middle"><param name="WMode" value="Transparent" /><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash/homepage.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="flash/homepage.swf" quality="high" bgcolor="#ffffff" width="761" height="447" name="homepage" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"/></object>');
}


