var puppy = {};

var ie = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
var ns = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5));
var x, y;

function getRandom() { return Math.round(Math.random() * arguments[0]); };
function obj(id) { return document.getElementById(id) };

//function CGIPages(query) {
//  var link = "bin-cgi/puppy.cgi?action="+query;
//  document.location = link/
//}

var doTrans;

function showsales( incomming, url ) {
  // This function is to stop the images from rolling.
  clearTimeout(doTrans);

  incomming = incomming.replace(/['"]/g, "`");
  var N_salesProducts = incomming.split(/\r|\n/g);

  var N_html = [];
  N_html.push("<table style='width: 610px; height: 400px;'>");
  N_html.push("  <tr><th height='10'></th></tr>");
  N_html.push("  <tr>");
  N_html.push("    <td align='center' width='610' valign='top'>");
  N_html.push("      <table cellpadding='0' cellspacing='0' bordercolor='#396e8e' border='2' style='border-collapse: collapse;' width='98%'>");

  for (var i = 0; i < N_salesProducts.length; i++) {
    if (!N_salesProducts[i].match("~")) {
      continue;
    }

    var dog_info = N_salesProducts[i].split(/[~:]/);
    N_html.push("        <tr>");
    N_html.push("          <td><img id=\"salesID_"+i+"_image\" src='../../images/puppy/sales/"+dog_info[2]+"' width='220' /></td>");
    N_html.push("          <td valign='top' style='width: 390px; padding:10px;'>");
    N_html.push("            <span id=\"salesID_"+i+"_name\" class='mainheader' align='center'>"+dog_info[1]+"</span><br><br>"); // dogname
    //N_html.push("            <p id=\"salesID_"+i+"_desc\" align='justify'>"+dog_info[4]+"</p>"); // Sdiscription
    N_html.push("            <p id=\"salesID_"+i+"_desc\" align='justify'>"+dog_info[5]+"</p>"); // discription
    N_html.push("            <p id=\"salesID_"+i+"_price\" style='font: bold 9pt tahoma;'>$"+dog_info[3]+"</p>"); // price
    N_html.push("            <img id=\"salesID_"+i+"\" src='../../images/cat-cart/cart_up.jpg' style='cursor: pointer;' onmouseover=\"puppy.cart(event)\" onmouseout=\"puppy.cart(event)\" onclick=\"puppy.cart(event)\" />");
    N_html.push("          </td>");
    N_html.push("        </tr>");
  }

  N_html.push("      </table>");
  N_html.push("    </td>");
  N_html.push("  </tr>");
  N_html.push("</table>");

  obj("dogShow").innerHTML = N_html.join("");
};

puppy.cart = function( e ) {
  if (!e) try{e=event;}catch(e){};
  //e = e || event;
  var srcElement = e.srcElement || e.target;

  switch(e.type) {
    case "mouseover": {
      srcElement.src = "../../images/cat-cart/cart_up_mo.jpg";
      break;
    }
    case "mouseout": {
      srcElement.src = "../../images/cat-cart/cart_up.jpg";
      break;
    }
    case "click": {
      if (Cache.data.CART.ordertype != "generic") {
        Cache.data.general.email = "";
        Cache.data.general.email_string = "";
        Cache.data.general.registerinfo = "||||||||||||||||||||||||||||||";
      }
      var p_name = obj(srcElement.id + "_name").innerHTML;
      var p_desc = obj(srcElement.id + "_desc").innerHTML;
      var p_image = obj(srcElement.id + "_image").src;
      var p_price = obj(srcElement.id + "_price").innerHTML.replace(/\$/, "");
      var A_pageContent = {
        industry: 5000,
        prodNumb: p_name,
        qty: 1,
        price: p_price,
        description: "Dog Products" + p_desc,
        image: p_image,
        productCode: p_name
      };

      A_pageContent = puppy.cleanObjects(A_pageContent);
      var productKey = new Date().getTime();
      Cache.data.CART.products[productKey] = A_pageContent;
      Cache.data.CART.ordertype = "generic";
      Cache.data.general.lastProductURL = document.location.href;
      setTimeout(function(){index_default.goToCart()}, 1000);
      break;
    }
  }
};

puppy.cleanObjects = function( A_ ) {
  for (var KEY in A_) {
    A_[KEY] = A_[KEY].toString().replace(/\r*\n/g, "");
    A_[KEY] = A_[KEY].toString().replace(/^\s+/g, "");
    A_[KEY] = A_[KEY].toString().replace(/\s+$/g, "");
    A_[KEY] = A_[KEY].toString().replace(/\<br>/ig, ", ");
    A_[KEY] = A_[KEY].toString().replace(/\$/g, "");
  }
  return A_;
};

function dogShow ( v ) {
  clearTimeout(doTrans);

  var showDogInfo = function( data ) {
    obj("dogShow").style.display = "";
    var disc, avi, file, dogtype;
    file = "doginfo";
    data = data.replace(/'/g, "`");
    data = data.replace(/"/g, "``");
    var dogInfo = data.split("|");

    var textInfo = "";
    textInfo += "<table style='width:610' height=400 border=0>";
    textInfo += "<tr><th height=10></th></tr>";
    textInfo += "<tr><td align=center width=610 valign=top >";
    if (!data.length) {
      textInfo += "<tr><td align=center width=610 valign=top >There is no information at this time.  Please try again later!</td></tr>";
    }

    var cellcount = 1;
    textInfo += "<table cellpadding=0 cellspacing=0  style='border:solid 1px #396e8e' width=98%>";
    dogInfo = dogInfo.sort();

    for (var i = 0; i < dogInfo.length; i++) {
      var tmp = dogInfo[i].split("~")[1];
      if (tmp) {
        var dog_info = tmp.split(":")
        var img = (dog_info[1]) ? dog_info[1] : "Space-holder.jpg";
          shortdisc = (dog_info[2]) ? dog_info[2] : "Sorry no info at this time.";
          disc = (dog_info[3]) ? dog_info[3] : "Sorry no info at this time.";
          avi = (dog_info[4]) ? dog_info[4] : "";
          dogtype = (dog_info[5]) ? dog_info[5] : "";
        var dogName = dog_info[0].split(" ")[0];
        if (dogtype == "companion") {
          textInfo += "<tr><td  align=center valign=bottom style='border:solid 1px #396e8e;width:220'>";
          textInfo += "<span class=mainheader align=center>"+dogName+"</span><br><br><img width90  src=../../images/puppy/"+img+" /></td>";
          textInfo += "<td style='border:solid 1px #396e8e'>";
          textInfo +=  "<p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10' ><b>"+shortdisc+"</b><br><br>"+disc+"<br><br>"+dog_info[0]+"</p>";
          if (avi) {
            textInfo += "<input type=button class=largButton onclick=showAvi('"+avi+"') value='Movie Clip' onmouseover=\"this.style.border='double 3px #396e8e'\" onmouseout=\"this.style.border='double 3px #FFFFFF'\" style='border:double 3px #ffffff;height:25;'''>";
          }
          textInfo +=  "</td></tr>";
        } else if (dogtype == "working") {
          textInfo += "<tr><td  align=center valign=bottom style='border:solid 1px #396e8e;width:220'>";
          textInfo += "<span class=mainheader align=center>"+dogName+"</span><br><br><img width90  src=../../images/puppy/"+img+" /></td>";
          textInfo += "<td style='border:solid 1px #396e8e'>";
          textInfo +=  "<p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10' ><b>"+shortdisc+"</b><br><br>"+disc+"<br><br>"+dog_info[0]+"</p>";
          if (avi) {
            textInfo += "<input type=button class=largButton onclick=showAvi('"+avi+"') value='Movie Clip' onmouseover=\"this.style.border='double 3px #396e8e'\" onmouseout=\"this.style.border='double 3px #FFFFFF'\" style='border:double 3px #ffffff;height:25;'''>";
          }
          textInfo +=  "</td></tr>";
        } else if (dogtype == "assistance") {
          textInfo += "<tr><td  align=center valign=bottom style='border:solid 1px #396e8e;width:220'>";
          textInfo += "<span class=mainheader align=center>"+dogName+"</span><br><br><img width90  src=../../images/puppy/"+img+" /></td>";
          textInfo += "<td style='border:solid 1px #396e8e'>";
          textInfo +=  "<p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10' ><b>"+shortdisc+"</b><br><br>"+disc+"<br><br>"+dog_info[0]+"</p>";
          if (avi) {
            textInfo += "<input type=button class=largButton onclick=showAvi('"+avi+"') value='Movie Clip' onmouseover=\"this.style.border='double 3px #396e8e'\" onmouseout=\"this.style.border='double 3px #FFFFFF'\" style='border:double 3px #ffffff;height:25;'''>";
          }
          textInfo +=  "</td></tr>";
        } else if (dogtype == "success") {
         textInfo += "<tr><td align=center valign=bottom style='border:solid 1px #396e8e'><p style='font:bold 10pt tahoma;color:#396e8e;text-align:center;'><br>"+dog_info[0]+"</p><img   src=../../images/puppy/"+img+" /></td>";
         textInfo += "<td style='border:solid 1px #396e8e'><p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10;' >"+disc+"</p></td></tr>";
        } else if (dogtype == "training") {
         textInfo += "<tr><td align=center valign=bottom style='border:solid 1px #396e8e'><p style='font:bold 10pt tahoma;color:#396e8e;text-align:center;'><br>"+dog_info[0]+"</p><img   src=../../images/puppy/"+img+" /></td>";
         textInfo += "<td style='border:solid 1px #396e8e'><p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10;' >"+disc+"</p></td></tr>";
        }
      }//end of tmp
    }//end for loop

    textInfo += "</table></td></tr></table>";

    obj("dogShow").innerHTML = textInfo;
  }

  var A_POST = {"action":v+"~doginfo"};
  SpecialHTTP("POST", docRoot + "serviceproviders/puppy/bin-cgi/showDogs.cgi", A_POST, showDogInfo);
};

/*
//Display of Success Dogs
function showSuccessdogs (v,url) {
    for (var i = 0; i < dogInfo.length; i++) {
      var tmp = dogInfo[i].split("~")[1];
      if (tmp) {
        var dog_info = tmp.split(":")
        var img = (dog_info[1]) ? dog_info[1] : "Space-holder.jpg";
          shortdisc = (dog_info[2])?dog_info[2] : "Sorry no info at this time.";
          disc = (dog_info[3])?dog_info[3] : "Sorry no info at this time.";
          avi = (dog_info[4])?dog_info[4] : "";
          dogtype = (dog_info[5])?dog_info[5] : "";
        var dogName = dog_info[0].split(" ")[0];
        if (dogtype == "success") {
         textInfo += "<tr><td align=center valign=bottom style='border:solid 1px #396e8e'><p style='font:bold 10pt tahoma;color:#396e8e;text-align:center;'><br>"+dog_info[0]+"</p><img   src=../../images/puppy/"+img+" ></td>";
         textInfo += "<td style='border:solid 1px #396e8e'><p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10;' >"+disc+"</p></td></tr>";
        }
      }//end of tmp
    }//end for loop

}

//Display of Training Dogs
function showTrainingdogs (v,url) {
    for (var i = 0; i < dogInfo.length; i++) {
      var tmp = dogInfo[i].split("~")[1];
      if (tmp) {
        var dog_info = tmp.split(":")
        var img = (dog_info[1]) ? dog_info[1] : "Space-holder.jpg";
          shortdisc = (dog_info[2])?dog_info[2] : "Sorry no info at this time.";
          disc = (dog_info[3])?dog_info[3] : "Sorry no info at this time.";
          avi = (dog_info[4])?dog_info[4] : "";
          dogtype = (dog_info[5])?dog_info[5] : "";
        var dogName = dog_info[0].split(" ")[0];
        if (dogtype == "training") {
         textInfo += "<tr><td align=center valign=bottom style='border:solid 1px #396e8e'><p style='font:bold 10pt tahoma;color:#396e8e;text-align:center;'><br>"+dog_info[0]+"</p><img   src=../../images/puppy/"+img+" /></td>";
         textInfo += "<td style='border:solid 1px #396e8e'><p align=justify style='overflow: auto; height: 320px; width: 390px;padding:10;' >"+disc+"</p></td></tr>";
        }
      }//end of tmp
    }//end for loop

}
  */
/****************************************************************/
 /****************    END OF THE FILE FUNCTION  ***********************/
/****************************************************************/

/******** THIS IS FOR THE NEW SINGLE LINE DISPLAY OF THE DOGS *********/
/********       RAM OUT IF GOING BACK TO THE NEW FUNCTION           *********/
function showAvi( avi ) {
  parent.main.scroll(0,0);
  var w = 250, h = 300;
  var movieClip = "<img dynsrc=../../images/puppy/" + avi + " start='fileopen' />";
  var removeButton = "<span style='position:absolute;top:280;left:70;background-color:#dfe4e8;color:#396e8e;font:bold 8pt tahoma;border: solid 1px#396e8e;padding: 5px '>! Click To Close !</span>";
  var imgs = "<div style=width:250;height:180;cursor:hand onclick=hideit('avi')>" + removeButton + "" + movieClip + "</div>";
  document.getElementById("theimg").innerHTML = imgs;
  document.getElementById("theimg").style.display = "block";
};

function doImage() {
  obj("theIMG").src = "../../../images/puppy/" + arguments[0];
  obj("div_theimg").style.display = "block";
};

function moveObj( myId, x, y ) {
  obj(myId).style.left = x - .5 * obj(myId).offsetWidth;
  obj(myId).style.top = y - .5 * obj(myId).offsetHeight;
  event.returnValue = false;
  event.cancelBubble = true;
};

function tog( aStr ) {
  var obj = document.getElementById(aStr);
  if (obj.style.display == "none") {
    obj.style.display = "";
  } else {
    obj.style.display = "none";
  }
};

function doBmov() {
  document.getElementById(arguments[0]).style.backgroundColor = "gold";
  document.getElementById(arguments[0] + "b").style.backgroundColor = "white";
};

function doBmot() {
  document.getElementById(arguments[0]).style.backgroundColor = "white";
  document.getElementById(arguments[0] + "b").style.backgroundColor = "#3b5a6f";
};

function hideit( v ) {
  document.getElementById("theimg").style.display = "none";
  document.location = "index.html?companionDogs";
  if (v != "avi") {
    history.go(0)
  }
};

/*FOR SINGLE INDEX PAGE AND DOGS.CGI PAGE AND NO FRAMES

function toggle( v, b, thidId,file){

    if (file == "doginfo" && (file != "sales")) var avi = obj("rawdata"+thidId).value.split(":")[4];
    else if ((file == "adpdoginfo") || (file == "agilitydoginfo") && (file != "sales")) var avi = obj("rawdata"+thidId).value.split(":")[3];
    if (avi) alert("This will take several minutes depending on the speed of your connection. Sorry clip is up to 5 megs.")
    if (avi) avi = "Movie Clip<br><img dynsrc=../../../images/puppy/"+avi+" start='fileopen' width=275 />"
    parent.pupmain.scroll(0,0);
    var w=250, h=300;
    var removeButton = "<span style='position:absolute;top:280;left:70;background-color:#dfe4e8;color:#3b5a6f;font:bold 8pt arial;border: solid 1px#3b5a6f;padding: 5px '>! Click To Close !</span>";
    //if (v.match(/Space-holder.jpg/)) var imgs = "<div style=width:600;cursor:hand onclick=hideit()>"+removeButton+"<img src= "+v+" onclick=hideit() align=left />&nbsp;&nbsp;&nbsp;&nbsp;<span style='overflow: auto; height: 220px; width: 300px;' valign=top >"+ b +"</span></div>";
    if (file == "sales") imgs = "<div style=width:600;cursor:hand onclick=hideit()>"+removeButton+"<img src="+v+" onclick=hideit() align=left /><div style='padding-left:20px; overflow: auto; height: 280px; width: 300px;' valign=top >"+ b +"</div></div>";
    else  var imgs = "<div style=width:600;cursor:hand onclick=hideit()>"+removeButton+"<img src="+v+" onclick=hideit() align=left /><div style='padding-left:20px; overflow: auto; height: 280px; width: 300px;' valign=top >"+avi+"<p>"+ b +"</div></div>";
    document.getElementById('theimg').innerHTML = imgs
    document.getElementById('theimg').style.display = 'block'
*/

function toggle( img, disc, avi, file ) {
  if (file == "sales") {
    avi = "";
  }
  disc = disc.replace(/'/g, "`");
  parent.main.scroll(0,0);
  var w = 250, h = 300;
  if (avi) {
    alert("This will take several minutes depending on the speed of your connection. Sorry clip is up to 5 megs.")
    var movieClip = "Movie Clip<br><img dynsrc=../../images/puppy/" + avi + " start='fileopen' width=250 />"
  }

  var removeButton = "<span style='position:absolute;top:280;left:70;background-color:#dfe4e8;color:#396e8e;font:bold 8pt tahoma;border: solid 1px#396e8e;padding: 5px '>! Click To Close !</span>";
  if ((!avi) || (avi == "") ||(avi == 0)) {
    var imgs = "<div style=width:580;cursor:hand onclick=hideit()>" + removeButton + "<img src=../../images/puppy/" + img + " onclick=hideit() align=left />&nbsp;&nbsp;&nbsp;&nbsp;<span style='overflow: auto; height: 220px; width: 308px;' valign=top >" + disc + "</span></div>";
  }
  if (avi)  {
    var imgs = "<div style=width:580;cursor:hand onclick=hideit()>" + removeButton + "<img src=../../images/puppy/" + img + " onclick=hideit() align=left /><div style='padding-left:20px; overflow: auto; height: 280px; width: 308px;' valign=top >" + movieClip + "<p>" + disc + "</div></div>";
  }

  document.getElementById("theimg").innerHTML = imgs;
  document.getElementById("theimg").style.display = "block";
};

var array1 = new Array();
var array2 = new Array();
var data = "";
var yes = 0;
var array2Count = 0;
var i;

function doSound() {
  if (!obj("sound")) {
    var O_ = document.createElement("div");
    document.body.appendChild(O_);
    soundByte.setAttribute("id", "sound");
  }
  obj("sound").innerHTML = "<embed src='../../images/puppy/dog4.wav' autostart=true hidden=true loop=false></embed>";
};

function checkform( v, s, Id ) {
  if (obj(Id).value == "Info required!" || obj(Id).value == "Email required!") {
    return false;
  }

  if (s == "nonumb") {
    if (v == "" || v == "Info required!" || !v.match(/[a-z]/ig)) {
      obj(Id).value = "";
      obj(Id).style.background = "#f00010";
      obj(Id).focus(obj(Id).value = "Info required!");
    } else {
      obj(Id).style.background = "white";
    }
  } else if (s == "required") {
    if (v == "" || v == "Info required!") {
      obj(Id).value = "";
      obj(Id).style.background = "#f00010";
      obj(Id).focus(obj(Id).value = "Info required!");
    } else {
      obj(Id).style.background = "white";
    }
  } else if (s == "email") {
    if (
      (v == "")
      || (v == "Email required!")
      || (!v.match(/[a-z]+@[a-z]+\./ig))
      && (!v.match(/[0-9]+@[a-z]+\./ig))
      && (!v.match(/[a-z]+[0-9]+@[a-z]+\./ig))
      && (!v.match(/[0-9]+[a-z]+@[a-z]+\./ig))
      && (!v.match(/[0-9]+[a-z]+[0-9]+@[a-z]+\./ig))
      && (!v.match(/[a-z]+[0-9]+[a-z]+@[a-z]\./ig))
      && (!v.match(/[a-z]+[0-9]+[a-z]+[0-9]+[a-z]+@[a-z]+\./ig))
      && (!v.match(/[0-9]+[a-z]+[0-9]+[a-z]+[0-9]+@[a-z]+\./ig))
    ) {
      obj(Id).value = "";
      obj(Id).style.background = "f00010";
      obj(Id).focus(obj(Id).value = "Email required!");
    } else {
      obj(Id).style.background = "white";
    }
  } else if (s == "numbers") {
    if (v == "" || v == "Info required!" || v.match(/[a-z]/ig)) {
      obj(Id).value = "";
      obj(Id).style.background = "f00010";
      obj(Id).focus(obj(Id).value = "Info required!");
    } else {
      obj(Id).style.backgroundColor = "white";
    }
  }
};

/********************************************************************************************************
******** FORM INFO COLLECTOR
********************************************************************************************************/

SpecialHTTP = function( method, URL, values, callback ) {
  index_default.HTTP(method, URL, values, callback);
};

function collectInfo( emailform, v ,dogForms ) {
  /**********************
  * Function to loop through the checkboxes and
  * assign a value.
  **********************/
  for (var i = 1; i < 16; i++) {
    if (obj("cb" + i)) {
      if (obj("cb" + i).checked) {
        obj("cb" + i).value = "YES";
      } else {
        obj("cb" + i).value  = "NO";
      }
    }
  }

  if (obj("sitter") || obj("boarded")){
    if (obj("sitter").checked) var boarded = "sitter";
    if (obj("boarded").checked) boarded = "boarded";
  }

  if (obj("email").value == "" || obj("email").value == null && obj("appName").value == "" ) {
    return false;
  }

  var txtboxes;
  if (emailform == "emailmessage") {
    txtboxes = new Array(obj("appName").value,obj("email").value,obj("state").value);
  } else if (emailform == "dogForm") {
    txtboxes = new Array(
      obj("appName").value,obj("email").value,obj("address").value,
      obj("city").value,obj("state").value,obj("zip").value,obj("day").value,
      obj("evening").value,obj("cell").value,obj("fax").value,obj("cb3").value,
      obj("cb4").value,obj("cb5").value,obj("cb6").value,obj("cb7").value,
      obj("cb8").value,obj("cb9").value,obj("cb10").value,obj("cb11").value,
      boarded,obj("cb12").value,obj("cb13").value,obj("dogBreed").value,
      obj("dogWanted").value,obj("cb14").value,obj("cb1").value,obj("childAge").value
    );
  } else if (emailform == "agreement") {
    txtboxes = new Array(
      obj("appName").value,obj("email").value,obj("address").value,obj("city").value,
      obj("state").value,obj("zip").value,obj("day").value,obj("evening").value,
      obj("cell").value,obj("fax").value,obj("dogName").value,obj("dogBreed").value,
      obj("dateVaccinated").value,obj("MultiVaccine").value,obj("bordatella").value,
      obj("rabies").value,obj("vetsName").value,obj("cb1").value,obj("aggressive").value
    );
  }

  var textboxes = txtboxes.join(":");
  if (v == "save") {
    var actions = "save";
  }
  if ((obj("removal")) && (obj("removal").checked)) {
    var actions = "remove";
  }

  var DB = "boardingApp";
  if (emailform == "dogForm") {
    DB = "dogapp";
  } else if (emailform == "emailmessage") {
    DB = "emailmessage";
  }

  var tables = "boardReply";
  if (dogForms == "dogForm") {
    tables = "dogformReply";
  } else if (dogForms == "emailmessage") {
    tables = "mailListReply";
  }

  var A_POST = {"action":textboxes+"~"+actions+"~"+DB+"~"+tables+"~"+obj("email").value+"~"+obj("appName").value+"~"+obj("state").value}

  var reply = function(data){eval(data)};
  SpecialHTTP("POST", docRoot + "serviceproviders/puppy/bin-cgi/puppy.cgi", A_POST,reply);
};


function emailForms( v ) {
  if (v == "dogForm" || v == "agreement") {
    var textInfo= " <tr>";
    textInfo += "  <td align=justify>Each dog that has been adopted into this program has filled a special place in an offender's life. Therefore, we do the very best we can to place each dog in the appropriate home.<br>We ask you to answer each question honestly.<br>We also ask you to realize the responsibilities involved in dog ownership.<br> Thank you for your interests in this program.</td>";
    textInfo += "</tr>";
    textInfo += "<tr>";
    textInfo += "  <td><marquee loop=10 height=10  width=605 scrolldelay=150 style='font-family:bold 10pt Arial;color:red'>All individuals 18 and over dropping off or interviewing dogs at Denver Women\'s Correctional Facility, Sterling Correctional Facility, High Plains Correctional Facility, or Buena Vista Correctional Facility must consent to a background check.  Please provide the full name, date of birth, and driver\'s license number for each person attending.  Submit this information to:  Gabriella.Licano\@doc.state.co.us by email or telephone 719 269 4536 to submit this information by telephone.  Ask for Gabriella, if she is not there ask for another Dog Program Staff member. \&nbsp; No children under 18 are allowed in a \"Go Home Class\" which is held in a facility.  Children under 18 are allowed to interview a dog at DWCF with prior notice of their presence for the interview.  Therefore please provide your child\'s name and age for an interview.  Saturday interviews and \"Go Home Classes\" are held at the facility in Canon City where children are allowed to attend.  Alumni Training Classes are held outside of the facility and are open to children.</marquee></td>";
    textInfo += "</tr>";
    textInfo += "<tr>";
    textInfo += "  <td>";
    textInfo += "   <table cellpadding=0 cellspacing=0 width=605 align=center border=0 >";
    textInfo += "     <tr><th class=thirdheader style='border:1px solid #396e8e;background-color:#eeeeee'>Personal Information</th></tr>";
    textInfo += "     <tr><td class=forthheader>&nbsp;Full Name:&nbsp;<input type=text size=74 id=appName name=appName  onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
  /*
    textInfo += "     <tr>";
    textInfo += "       <td>";
    textInfo += "         <table >";
    textInfo += "           <td class=forthheader>&nbsp;Drivers Licenses #:&nbsp;<input type=password id=DLNumb name=DLNumb  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td>";
    textInfo += "           <td class=forthheader>&nbsp;DOB:&nbsp;<input type=text id=DOB name=DOB  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "         </table>";
    textInfo += "       </td>";
    textInfo += "     </tr>";
  */

    textInfo += "     <tr>";
    textInfo += "        <td>";
    textInfo += "          <table  border=0  cellpadding=2 cellspacing=5 width=100% >";
    textInfo += "           <tr>";
    textInfo += "             <td width=50%>";
    textInfo += "               <table cellpadding=1 cellspacing=0 width=100% border=0 >";
    textInfo += "                 <tr><td class=forthheader>Email:</td><td><input type=text size=30 id=email name=email value=''onKeyPress=\"return chkKey('email',event)\" onblur=\"checkform(this.value,'email',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr><td class=forthheader>Address:</td><td><input type=text size=30 id=address  onblur=\"checkform(this.value,'required', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr><td class=forthheader>City:</td><td><input type=text size=30 id=city onKeyPress=\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr>";
    textInfo += "                   <td colspan=2>";
    textInfo += "                     <table width=96%>";
    textInfo += "                       <tr>";
    textInfo += "                         <td width=20% class=forthheader>State:</td><td width=25%><input type=text size=2 id=state onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td>";
    textInfo += "                         <td width=20% class=forthheader align=right>Zip:&nbsp;</td>";
    textInfo += "                         <td width=25%><input type=text size=10 id=zip onKeyPress=\"return chkKey('zip',event)\" onblur=\"checkform(this.value,'numbers',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td>";
    textInfo += "                       </tr>";
    textInfo += "                     </table>";
    textInfo += "                   </td>";
    textInfo += "                 </tr>";
    textInfo += "               </table>";
    textInfo += "             </td>";
    textInfo += "             <td width=50%>";
    textInfo += "               <table cellpadding=0 cellspacing=0 width=100% >";
    textInfo += "                 <tr><td class=forthheader>Day Time :</td><td><input type=text size=25 id=day onKeyPress=\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr><td class=forthheader>Evening :</td><td><input type=text size=25 id=evening onKeyPress=\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr><td class=forthheader>Cell Phone :</td><td><input type=text size=25 id=cell onKeyPress=\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></tr>";
    textInfo += "                 <tr><td class=forthheader>Fax:</td><td><input style=text size=25  id=fax onKeyPress=\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "               </table>";
    textInfo += "             </td>";
    textInfo += "           </tr>";
    textInfo += "         </table>";
    textInfo += "       </td>";
    textInfo += "     </tr>";
  }

  if (v == "dogForm") {
    textInfo += "     <tr>";
    textInfo += "       <td>";
    textInfo += "         <table  border=0  cellpadding=0 cellspacing=0 width=605 align=center >";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>1.</td>";
    textInfo += "             <td width=90% class=underlinedText>Do you have children?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center ><input type=checkbox id=cb1 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>2.</td>";
    textInfo += "             <td width=90% class=underlinedText>What are the ages of your children?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center ><input type=text size=10 id=childAge style=width:50></span></td>";
    textInfo += "           </tr>";

    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>3.</td>";
    textInfo += "             <td width=90% class=underlinedText>Do you have a fenced yard?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center ><input type=checkbox id=cb3 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>4.</td>";
    textInfo += "             <td width=90% class=underlinedText>Will this dog be an indoor dog?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb4 > </span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>5.</td>";
    textInfo += "             <td width=90% class=underlinedText>Will this dog be only outdoors?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb5></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>6.</td>";
    textInfo += "             <td width=90% class=underlinedText>Are you willing to provide shelter and food for an adopted dog?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb6 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td colspan=3 style='font-family:tahoma;font-size: 8.5pt;border:solid 1px #336600;text-align:center;padding:5px;background-color:#eeeeee'>Your new dog comes  complete with current multiple vaccines, rabies vaccine, heart worm test, and heart worm preventative. All of these items are considered regular veterinary care. There are  also other health care considerations your vet may recommend to you.</td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers valign=top>7.</td>";
    textInfo += "             <td width=90% class=underlinedText>Are you willing to provide regular veterinary care for your new adopted dog?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb7 ></span></td></tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers valign=top>8.</td>";
    textInfo += "             <td width=90% class=underlinedText>Your new adopted dog has been trained to perform certain basic obedience behaviors. Are you willing to watch a training video, read written instructions, attend a &quot;Go Home Class&quot;, and maintain these behaviors in your dog?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb8 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td colspan=3 style='font-family:tahoma;font-size: 8.5pt;border:solid 1px #336600;text-align:center;padding:5px;background-color:#eeeeee'>The first month your new adopted dog is in your home you will need to continue your dog's training while the dog is learning your expectations in their new environment.</td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>9.</td>";
    textInfo += "             <td width=90% class=underlinedText>Are you willing to take on this responsibility?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb9 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers valign=top>10.</td>";
    textInfo += "             <td width=90% class=underlinedText>Your new adopted dog has been through many transitions in their life. Do you realize it will take a period of time for your dog to bond with you and accept you as the &quot;alpha&quot; character in their life? This time can be anything from a few minutes to a month or more. Are you willing to &quot;hang in there&quot; until this occurs?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb10 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>11.</td>";
    textInfo += "             <td width=90% class=underlinedText>Do all the adult family members in this home hold a full time job?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb11 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers valign=top>12.</td>";
    textInfo += "             <td width=90% class=underlinedText>If so, can arrangements be made so the dog is comfortable all day when you are away at work or on vacation?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb12 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td colspan=3 >";
    textInfo += "               <table>";
    textInfo += "                 <tr>";
    textInfo += "                   <td width=5% class=numbers>13.</td>";
    textInfo += "                   <td width=73% class=underlinedText>When you are away will you have a pet sitter or have the animal boarded?</td>";
    textInfo += "                   <td width=22% class=underlinedText>";
    textInfo += "                     <table>";
    textInfo += "                       <tr>";
    textInfo += "                         <td width=50% align=center>Sitter &nbsp;<input type=checkbox id=sitter value=sitter onclick=\"if(this.checked) obj('boarded').checked = false\"></span></td>";
    textInfo += "                         <td width=50% align=center>Boarded &nbsp;<input type=checkbox id=boarded value=boarded onclick=\"if(this.checked)obj('sitter').checked = false\"></span></td>";
    textInfo += "                       </tr>";
    textInfo += "                     <table>";
    textInfo += "                   </td>";
    textInfo += "                 </tr> ";
    textInfo += "               </table> ";
    textInfo += "             </td> ";
    textInfo += "           </tr> ";
    textInfo += "           <tr>";
    textInfo += "             <td colspan=3 style='font-family:tahoma;font-size: 8.5pt;color:red;border:solid 1px #336600;text-align:center;padding:5px;background-color:#eeeeee'>(The Prison Trained Dog Program does offer boarding-in training for longer periods of time.)</td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers>14.</td>";
    textInfo += "             <td width=90% class=underlinedText>Have you had a dog before?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb13 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td width=5% class=numbers valign=top>15.</td>";
    textInfo += "             <td width=90% class=underlinedText>Have you seen the pictures of the adoptable dogs on our web site (www.coloradoci.com)?</td>";
    textInfo += "             <td width=5% class=underlinedText align=center><input type=checkbox id=cb14 ></span></td>";
    textInfo += "           </tr>";
    textInfo += "           <tr>";
    textInfo += "             <td colspan=3 >";
    textInfo += "               <table>";
    textInfo += "                 <tr>";
    textInfo += "                   <td width=5% class=numbers>16.</td>";
    textInfo += "                   <td width=70% class=underlinedText>What kind of dog are you interested in?</td>";
    textInfo += "                   <td width=25% class=underlinedText align=right><input type=text size=25 id=dogBreed onblur=\"if (this.value) this.style.background='white'; else this.style.background='ffffcc'\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "                 <tr>";
    textInfo += "                   <td width=5% class=numbers>17.</td>";
    textInfo += "                   <td width=70% class=underlinedText>Which dog are you interested in adopting?</td>";
    textInfo += "                   <td width=25% class=underlinedText align=right><input type=text  size=25 id=dogWanted onblur=\"if (this.value) this.style.background='white'; else this.style.background='ffffcc'\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "               </table>";
    textInfo += "             </td>";
    textInfo += "           </tr>";
    textInfo += "         </table>";
    textInfo += "       </td>";
    textInfo += "     </tr>";
    textInfo += "   </table>";
    textInfo += " </td>";
    textInfo += "</tr>";
    textInfo += "     <tr><td>&nbsp;</td></tr>";
    textInfo += "     <tr>";
    textInfo += "       <td align=justify >Children under the age of 18 are not allowed to attend the &quot;Go Home Class&quot; that takes place inside the visiting room of a facility. This usually occurs at the Denver Women's Correctional Facility, Sterling Correctional Facility, Buena Vista Correctional Facility, and the Fort Lyon Correctional Facility. This is in accordance with CDOC AR 300-1. Children are allowed at dog interviews and drop offs, as these are all held in public accessible areas. &quot;Go Home Classes&quot; are held on Saturday mornings at Colorado Women's Correctional Facility and are open to children.<br></td>";
    textInfo += "     </tr>";
    textInfo += "     <tr><td>&nbsp;</td></tr>";
    textInfo += "     <tr>";
    textInfo += "       <td colspan=3 height=30 style=padding-left:10px>";
    textInfo += "         <table cellpadding=\"4\" cellspacing=\"2\" style=\"width: 100%; background-color: #396e8e;\">";
    textInfo += "           <tr>";
    textInfo += "             <td></td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onclick=\"collectInfo('dogForm','save','dogForm');this.disabled=1\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Submit";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Clear";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "           </tr>";
    textInfo += "         </table>";
    textInfo += "       </td>";
    textInfo += "     </tr>";
    textInfo += "   </table>";
    textInfo += " </td>";
    textInfo += "</tr>";

  }

  if (v == "agreement") {

    //<!--Boarding Agreement -->
  /*
    var textInfo = "<table cellpadding=0 cellspacing=0 width=610 align=center border=0 >";
    textInfo += "<tr><th class=thirdheader style='border:1px solid #396e8e;background-color:#eeeeee'>Personal Information</th></tr>";
    textInfo += "<tr><td class=forthheader>&nbsp;Full Name:&nbsp;<input type=text size=74 id=appName name=appName  onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td><table  border=0  cellpadding=2 cellspacing=5 width=100% >";
    textInfo += "<tr><td width=50%>";
    textInfo += "<table cellpadding=1 cellspacing=0 width=100% border=0 >";
    textInfo += "<tr><td class=forthheader>E-mail:</td><td><input type=text size=30 id=email name=email onKeyPress\"return chkKey('email',event)\" onblur=\"checkform(this.value,'email',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader>Address:</td><td><input type=text size=30 id=address  onblur=\"checkform(this.value,'required', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader>City:</td><td><input type=text size=30 id=city onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";

    textInfo += "<tr><td colspan=2 >";
    textInfo += "<table width=96% border=0 >";
    textInfo += "<tr><td class=forthheader width=20%>State:</td><td width=25% ><input type=text size=2 id=state onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td>";
    textInfo += "<td class=forthheader align=right width=20%>Zip:&nbsp;</td><td align=right width=25%><input type=text size=10 id=zip onKeyPress\"return chkKey('3',event)\" onblur=\"checkform(this.value,'numbers',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "</table></td></tr>";
    textInfo += "</table></td>";
    textInfo += "<td width=50%>";
    textInfo += "<table cellpadding=0 cellspacing=0 width=100% >";
    textInfo += "<tr><td class=forthheader>Day Time :</td><td><input type=text size=25 id=day onKeyPress\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader>Evening :</td><td><input type=text size=25 id=evening onKeyPress\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader>Cell Phone :</td><td><input type=text size=25 id=cell onKeyPress\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></tr>";
    textInfo += "<tr><td class=forthheader>Fax:</td><td><input style=text size=25  id=fax onKeyPress\"return chkKey('phone',event)\" onblur=\"checkform(this.value,'numbers', this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "</table></td></tr>";
    textInfo += "</table>";
  */
    textInfo += "</td></tr>";
    textInfo += "<tr><td><table  border=0  cellpadding=0 cellspacing=0 width=605 align=center >";
    textInfo += "<tr><th  class=thirdheader style='border:1px solid #3b5a6f;background-color:#eeeeee'>Dog's Information</th></tr>";
    textInfo += "<tr><td>";

    textInfo += "<table cellpadding=1 cellspacing=0 width=100% border=0 >";
    textInfo += "<tr><td class=forthheader width=28% align=left>Dog's Name:</td><td width=72% align=left><input type=text size=60 id=dogName  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader width=28% align=left>Breed:</td><td width=72% align=left><input type=text size=60 id=dogBreed  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader width=28% align=left>Dates of Vaccinations:</td><td width=72% align=left><input type=text size=60 id=dateVaccinated   style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td class=forthheader width=28% align=left>Multiple Vaccines:</td><td width=72% align=left><input type=text size=60 id=MultiVaccine  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td  class=forthheader width=28% align=left>Bordatella:</td><td width=72% align=left><input type=text size=60 id=bordatella  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td  class=forthheader width=28% align=left>Rabies:</td><td width=72% align=left><input type=text size=60 id=rabies  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td  class=forthheader width=28% align=left>Veterinarian's name:</td><td width=72% align=left><input type=text size=60 id=vetsName  style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "</table></td>";
    textInfo += "</tr>";
    textInfo += "<tr><td>&nbsp;</td></tr>";
    textInfo += "<tr><td><p align=justify>The undersigned represents the above aforementioned dog as healthy, and current on its vaccinations. By signing below the owner hereby releases the Department of Corrections and the State of Colorado from all liability for any losses or damages arising from the Agreement. Understanding that by nature animals are prone to injury, should said dog become injured or ill the owner understands the dog will be taken to the veterinarian at the OWNER'S EXPENSE";
    textInfo += "<input type=checkbox id=cb1 ></span>";
    textInfo += "(checkbox indicates acceptance by owner).  If said dog escapes and is to be lost, the owner shall not hold the department of Corrections ar the State of Colorado Responsible for any liability.</td></tr>";
    textInfo += "<tr><td  class=forthheader>Does your dog have aggressive tendencies?&nbsp;&nbsp;<br><input type=text size=80 id=aggressive onblur=\"if (this.value) this.style.background='white'; else this.style.background='ffffcc'\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><th >&nbsp;</th></tr>";
    textInfo += "<tr><th  class=thirdheader style='border:1px solid #3b5a6f;background-color:#eeeeee'>To be completed on delivery of the Dog.</th></tr>";
    textInfo += "<tr><td>&nbsp;</td></tr>";
    textInfo += "<tr><td  class=forthheader>Owner's Signature and Date:<br>__________________________________________________</td></tr>";
    textInfo += "<tr><td><br>Training Goals: Basic obedience</td></tr>";
    textInfo += "<tr><td>&nbsp;</td></tr>";
    textInfo += "<tr><td>Boarding and Training: \$450\.00 first 4 weeks, $50 a week thereafter.<br>Deposit required</td></tr>";
    textInfo += "<tr><td>Date and Time checked in:&nbsp;&nbsp;______________________________________</td></tr>";
    textInfo += "<tr><td>Expected return: &nbsp;&nbsp;_______________________________________________</td></tr>";
    textInfo += "<tr><td>Date and time checked out:&nbsp;&nbsp;____________________________________</td></tr>";
    textInfo += "<tr><td>Charges:&nbsp;&nbsp;________________________</td></tr>";
    textInfo += "<tr><td><p></td></tr>";
    textInfo += "<tr><td>&nbsp;</td></tr>";
    textInfo += "<tr><th class=forthheader>Please plan on attending a &quot;Go Home Class&quot; (1 1/2 hours) on the day you come for your dog! </th></tr>";
    textInfo += "</table>";
    textInfo += "</td>";
    textInfo += "</tr>";
    textInfo += "<tr><td>&nbsp;</td></tr>";
    textInfo += "<tr><td><p align=justify>Children under the age of 18 are not allowed to attend the &quot;Go Home Class&quot; that takes place inside the visiting room of a facility. This usually occurs at the Denver Women's Correctional Facility, Sterling Correctional Facility, Buena Vista Correctional Facility, and the Fort Lyon Correctional Facility. This is in accordance with CDOC AR 300-1. Children are allowed at dog interviews and drop offs, as these are all held in public accessible areas. &quot;Go Home Classes&quot; are held on Saturday mornings at Colorado Women's Correctional Facility and are open to children.</p></td></tr>";
    textInfo += "<tr><td colspan=3 height=30>";
    textInfo += "         <table cellpadding=\"4\" cellspacing=\"2\" style=\"width: 100%; background-color: #396e8e;\">";
    textInfo += "           <tr>";
    textInfo += "             <td></td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onclick=\"collectInfo('agreement','save','agreement');this.disabled=1\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Submit";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 type=\"reset\"";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Clear";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "           </tr>";
    textInfo += "         </table>";
    textInfo += "</table>";
  }

  if (v == "emailmessage") {
    //<!-- Mailing List -->
    var textInfo = "<table cellpadding=0 cellspacing=0 width=605 align=center border=0 >";
    textInfo += "<tr><th class=thirdheader style=\"border:1px solid #396e8e;background-color:#eeeeee\">Personal Information</th></tr>";
    textInfo += "<tr><td class=forthheader>&nbsp;Full Name:&nbsp;<input type=text size=74 id=appName name=appName  onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td><table  border=0 cellpadding=2 cellspacing=5 width=100% >";
    textInfo += "<tr><td width=50%>";
    textInfo += "<table cellpadding=1 cellspacing=0 width=100% border=0 >";
    textInfo += "<tr><td class=forthheader>Email:</td><td><input type=text size=30 id=email name=email onKeyPress\"return chkKey('email',event)\" onblur=\"checkform(this.value,'email',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td></tr>";
    textInfo += "<tr><td width=20% class=forthheader>State:</td><td width=25%><input type=text size=2 id=state onKeyPress\"return chkKey('1',event)\" onblur=\"checkform(this.value,'nonumb',this.id)\" style='background:ffffcc;border:none;border-bottom:solid 1px #336699'></td>";
    textInfo += "</table></td>";
    textInfo += "<td width=50%>&nbsp;</td>";
    textInfo += "</tr>";
    textInfo += "<tr><td class=underlinedText colspan=3>Do you you wish to be removed from our mailing list?<input type=checkbox id=removal value=remove)></td></tr>";
    textInfo += "<tr><td colspan=3 height=30 style=padding-left:10px>";
    textInfo += "         <table cellpadding=\"4\" cellspacing=\"2\" style=\"width: 100%; background-color: #396e8e;\">";
    textInfo += "           <tr>";
    textInfo += "             <td></td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onclick=\"collectInfo('emailmessage','save','emailmessage');this.disabled=1\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Submit";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "             <td height=\"24\" width=\"90\" bgcolor=\"white\" align=\"center\">";
    textInfo += "               <button";
    textInfo += "                 type=\"reset\"";
    textInfo += "                 style=\"font: normal 9pt tahoma; width: 100%; height: 18px; border: double 1px #0f3e5b; text-align: center; color: #0f3e5b; cursor: pointer;\"";
    textInfo += "                 onmouseover=\"this.style.borderColor='#ffcc33';this.style.fontWeight='bold';\"";
    textInfo += "                 onmouseout=\"this.style.borderColor='#0f3e5b';this.style.fontWeight='normal';\">";
    textInfo += "                 Reset";
    textInfo += "               </button>";
    textInfo += "             </td>";
    textInfo += "           </tr>";
    textInfo += "         </table>";
    textInfo += "</table>";
  }

  obj("emailContent").innerHTML = textInfo;
};
