  function checkSpeciesDog() {
    if (document.forms[2].elements[16].checked != true ) {
      promptBreedChangeToDog()
    }
  }

  function checkSpeciesCat() {
    if (document.forms[2].elements[13].checked != true ) {
      promptBreedChangeToCat()
    }
  }

  function checkBreed() {
    if (document.forms[2].elements[16].checked == true ) {
      if(document.forms[2].elements[18].options[0].selected != true) {
        promptBreedChangeToCat()
      }
    }
    if (document.forms[2].elements[13].checked == true ) {
      if(document.forms[2].elements[20].options[0].selected != true) {
        promptBreedChangeToDog()
      }
    }

  }

  function promptBreedChangeToCat() {
    if (confirm("You have described your pet as a dog, but you selected a cat breed. Would you like to change this pet to a cat?")) {
      document.forms[2].elements[13].checked = true
      document.forms[2].elements[20].options[0].selected = true;
      document.forms[2].elements[18].focus();
    }
    else {
      document.forms[2].elements[18].options[0].selected = true;
      document.forms[2].elements[20].focus();
    }
  }

  function promptBreedChangeToDog() {
    if (document.forms[2].elements[13].checked == true) {
      if (confirm("You have described your pet as a cat, but you selected a dog breed. Would you like to change this pet to a dog?")) {
        document.forms[2].elements[16].checked = true
        document.forms[2].elements[18].options[0].selected = true;
        document.forms[2].elements[20].focus();
      }
      else {
        document.forms[2].elements[20].options[0].selected = true;
        document.forms[2].elements[18].focus();
      }
    }
  }

  function openWin(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no, width=425, height=250");
  }

  function openWin2(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, width=500, height=500");
  }

  function openWin3(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
  }

  function openWin4(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, width=650, height=800");
  }

  function openWin5(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, width=600, height=750");
  }

  function openWin6(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes, width=425, height=550");
  }

  function openWin700(page) {
    OpenWin = this.open(page, "NewWin", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no, width=700, height=650");
  }

  function printpage() {
    window.print();  
  }

  function embedFlash( classid, movie, width, height, id, flashVars, requiredVersion ) {
  	document.write('<object classid="'+classid+'" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="'+id+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+movie+'" />');
	document.write('<param name="loop" value="false" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="salign" value="lt" />');
	document.write('<param name="bgcolor" value="#ffffff" />');
	document.write('<param name="flashVars" value="'+flashVars+'"/>');
	document.write('<embed src="'+movie+'" flashvars="'+flashVars+'" loop="false" menu="false" quality="high" salign="lt" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+id+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
  }