//alert("include j_APPLICATIONS.js");
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
//						    fnAPPLICATION(appTYPE) - builds the application form
//												     [submit] calls fnSUBMIT
//												  	 [cancel] goes p_HOME
//		   						 fnSUBMIT(appTYPE) - called by fnAPPLICATION [submit]
//													 calls fnVALIDATEs,
//													 displays application terms
//												     [agree]  submits and goes p_HOME?page=appTHANKS
//												  	 [cancel] goes p_HOME
//						   	   fnVALIDATE(appTYPE) - called by fnSUBMIT 
//												     checks required fields & field types
//													 if error, displays message and returns false (-1)
//										appTYPE	= 1	 ADOPTION APPLICATION
//									    appTYPE = 2  FOSTER APPLICATION
//									    appTYPE = 3  DONATION INFORMATION
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
//									ADOPTION			FOSTER				DONATION
// Q1	My Name						Req'd				Req'd				Req'd
// Q2	Address						Opt					Opt					Opt
// Q3	City						Opt					Opt					Opt
// Q4	Province					Opt					Opt					Opt
// Q5	Postal Code					Opt					Opt					Opt
// Q6	Day Phone					Req'd \				Req'd \				Req'd \
// Q7	Eve Phone					Req'd |- one of		Req'd |- one of		Req'd |- one of if #31 or #34
// Q8	Email						Req'd /				Req'd /				Req'd /	
// Q9	(Preferred contact)			Opt					Opt					Opt
// Q10  Pet is for					Req'd				 - 				 	- 
// Q11  #Adults						Req'd				Req'd			 	- 
// Q12  #Teenagers					Req'd				Req'd			 	- 
// Q13	#Children					Req'd				Req'd			 	- 
// Q14	#Dogs						Req'd				Req'd			 	- 
// Q15	Dogs spayed/neutered		Req'd(if>0)			Req'd(if>0)			- 
// Q16	#Cats						Req'd				Req'd			 	- 
// Q17	Cats spayed/neutered		Req'd(if>0)			Req'd(if>0)			- 
// Q18	Vet Name					Opt*reference 		Opt*reference		- 
// Q19	Vet Address					Opt					Opt			 		-
// Q20	Vet City					Opt					Opt				 	- 
// Q21	Vet Phone					Opt					Opt				 	- 
// Q22	Reference to a vet			Opt					 - 				 	- 
// Q23	Pet Name					Req'd				 - 				 	- 
// Q24	Purpose(s) for dog 			Req'd				 - 				 	- 
// Q25	Purpose(s) for cat			Req'd				 - 				 	- 
// Q26	Inside/outside				Req'd				Req'd			 	- 
// Q27	Apartment/Townhouse/Home...	Req'd				Req'd			 	- 
// Q28	Rent/Own					Req'd				Req'd			 	- 
// Q29	Fence/Run/Yard...			Req'd				Req'd			 	- 
// Q30	Pet alone time				Req'd				Req'd			 	- 
// Q31	Monitary Donation			-					-					Opt
// Q32	Cheque/Visa/MC/Amex			-					-					Req'd if Q31
// Q33	Tax Receipt Request			-					-					Opt
// Q34	Donation					-					-					Opt
// Q35	Donation Description		-					-					Opt
// Q36	How did you hear about us?	Opt					Opt					Opt
// Q37	Anything else to tell us?	Opt					Opt					Opt
//                                       1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3
//		    		 0,1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7

var app1 = new Array(0,2,1,1,1,1,2,2,2,1,2,2,2,2,2,2,2,2,1,1,1,1,1,2,2,2,2,2,2,2,2,0,0,0,0,0,1,1);
var app2 = new Array(0,2,1,1,1,1,2,2,2,1,0,2,2,2,2,2,2,2,1,1,1,1,0,0,0,0,2,2,2,2,2,0,0,0,0,0,1,1);
var app3 = new Array(0,2,1,1,1,1,2,2,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,1,1,1,1);
var appQUESTION = new Array();
var appANSWER   = new Array();

appQUESTION[1]="()My Name:";						appANSWER[1] ='<input style= "font-size: 8pt"';
													appANSWER[1]+=' type="text"';
													appANSWER[1]+=' size="25"';
													appANSWER[1]+=' maxlength="30" ';
													appANSWER[1]+=' name="Q1"';
													appANSWER[1]+=' tabindex="#tab#">';

appQUESTION[2]="Address:";							appANSWER[2] ='<input style= "font-size: 8pt"';
													appANSWER[2]+=' type="text"';
													appANSWER[2]+=' size="25"';
													appANSWER[2]+=' maxlength="30" ';
													appANSWER[2]+=' name="Q2"';
													appANSWER[2]+=' tabindex="#tab#">';
									
appQUESTION[3]="City:";								appANSWER[3]= '<input style= "font-size: 8pt"';
													appANSWER[3]+=' type="text"';
													appANSWER[3]+=' size="25"';
													appANSWER[3]+=' maxlength="30" ';
													appANSWER[3]+=' name="Q3"';
													appANSWER[3]+=' tabindex="#tab#">';
						
appQUESTION[4]="Province:";							appANSWER[4]= '<select style= "font-size: 8pt"';
													appANSWER[4]+=' size="1"';
													appANSWER[4]+=' maxlength="10" ';
													appANSWER[4]+=' name="Q4"';
													appANSWER[4]+=' tabindex="#tab#">';
													appANSWER[4]+='<option value="AB">AB';
													appANSWER[4]+='<option value="BC">BC';
													appANSWER[4]+='<option value="MB">MB';
													appANSWER[4]+='<option value="NB">NB';
													appANSWER[4]+='<option value="NL">NL';
													appANSWER[4]+='<option value="NT">NT';
													appANSWER[4]+='<option value="NS">NS';
													appANSWER[4]+='<option value="NU">NU';
													appANSWER[4]+='<option value="ON">ON';
													appANSWER[4]+='<option value="PE">PE';
													appANSWER[4]+='<option value="QC">QC';
													appANSWER[4]+='<option value="SK">SK';
													appANSWER[4]+='<option value="YT">YT';
													appANSWER[4]+='</select>';
 
appQUESTION[5]="Postal Code:";						appANSWER[5] ='<input style= "font-size: 8pt"';
													appANSWER[5]+=' type="text"';
													appANSWER[5]+=' size="7"';
													appANSWER[5]+=' maxlength="7" ';
													appANSWER[5]+=' name="Q5"';
													appANSWER[5]+=' tabindex="#tab#">';

appQUESTION[6]="Day Phone:";						appANSWER[6] ='<table cellpadding=0 cellspacing=0 border=0 align=left>';
 													appANSWER[6]+='<TR><TD class=normal NOWRAP>';
													appANSWER[6]+='<input style= "font-size: 8pt"';
													appANSWER[6]+=' type="text"';
													appANSWER[6]+=' size="25"';
													appANSWER[6]+=' maxlength="25" ';
													appANSWER[6]+=' name="Q6"';
													appANSWER[6]+=' tabindex="#tab#">';
													appANSWER[6]+='</TD>';																										   
									
 													appANSWER[6]+='<TD class=normal NOWRAP>';
 													appANSWER[6]+='<INPUT style= "font-size: 8pt"';
													appANSWER[6]+='       TYPE=RADIO'; 
													appANSWER[6]+='       NAME="Q9" ';
													appANSWER[6]+='      VALUE="Day Phone#" >';
													appANSWER[6]+='*preferred</TD>';
													appANSWER[6]+='</TR></table>';

appQUESTION[7]="Eve Phone:";						appANSWER[7] ='<table cellpadding=0 cellspacing=0 border=0 align=left>';
 													appANSWER[7]+='<TR><TD class=normal NOWRAP>';
 													appANSWER[7]+='<input style= "font-size: 8pt"';
													appANSWER[7]+=' type="text"';
													appANSWER[7]+=' size="25"';
													appANSWER[7]+=' maxlength="25" ';
													appANSWER[7]+=' name="Q7"';
													appANSWER[7]+=' tabindex="#tab#">';
													appANSWER[7]+='</TD>';																										   
													
 													appANSWER[7]+='<TD class=normal NOWRAP>';
 													appANSWER[7]+='<INPUT style= "font-size: 8pt"';
													appANSWER[7]+='       TYPE=RADIO'; 
													appANSWER[7]+='       NAME="Q9" ';
													appANSWER[7]+='       VALUE="Evening Phone#" >';
													appANSWER[7]+='</TD>';
													appANSWER[7]+='</TR></table>';

appQUESTION[8]="Email:";							appANSWER[8] ='<table cellpadding=0 cellspacing=0 border=0 align=left>';
 													appANSWER[8]+='<TR><TD class=normal NOWRAP>';
 													appANSWER[8]+='<input style= "font-size: 8pt"';
													appANSWER[8]+=' type="text"';
													appANSWER[8]+=' size="25"';
													appANSWER[8]+=' maxlength="50" ';
													appANSWER[8]+=' name="Q8"';
													appANSWER[8]+=' tabindex="#tab#">';
									
													appANSWER[8]+='<TD class=normal NOWRAP>';
 													appANSWER[8]+='<INPUT style= "font-size: 8pt"';
													appANSWER[8]+='       TYPE=RADIO'; 
													appANSWER[8]+='       NAME="Q9" ';
													appANSWER[8]+='       VALUE="Email" >';
													appANSWER[8]+='</TD>';																										   
													appANSWER[8]+='</TR></table>';

appQUESTION[9]="";									appANSWER[9]='';	// Filler for preferred contact Q9
									
appQUESTION[10]="()I am interested in a pet for";	appANSWER[10] ='<SELECT style= "font-size: 8pt"';
													appANSWER[10]+=' size="1"';
													appANSWER[10]+=' maxlength="4" ';
													appANSWER[10]+=' name="Q10"';
													appANSWER[10]+=' tabindex="#tab#">';
													appANSWER[10]+='<option value="">';
													appANSWER[10]+='<option value="FOR ME">me';
													appANSWER[10]+='<option value="FOR FAMILY">family member living with me';
													appANSWER[10]+='<option value="FOR RELATIVE">relative not living with me';
													appANSWER[10]+='<option value="FOR OTHER">someone else';
													appANSWER[10]+='</select>';

appQUESTION[11]="()The pet will live with:";		appANSWER[11] ='<INPUT style= "font-size: 8pt"';
													appANSWER[11]+=' TYPE="text"'; 
													appANSWER[11]+=' size="2"';
													appANSWER[11]+=' maxlength="2"';
													appANSWER[11]+=' name="Q11" ';
													appANSWER[11]+=' tabindex="#tab#">';
													appANSWER[11]+=' &nbsp;adults (18 and over)';
appQUESTION[12]="";									appANSWER[12] ='<INPUT style= "font-size: 8pt"';
													appANSWER[12]+=' TYPE="text"'; 
													appANSWER[12]+=' size="2"';
													appANSWER[12]+=' maxlength="2"';
													appANSWER[12]+=' name="Q12" ';
													appANSWER[12]+=' tabindex="#tab#">';
													appANSWER[12]+=' &nbsp;teenagers (13-17)';
appQUESTION[13]="";									appANSWER[13] ='<INPUT style= "font-size: 8pt"';
													appANSWER[13]+=' TYPE="text"'; 
													appANSWER[13]+=' size="2"';
													appANSWER[13]+=' maxlength="2"';
													appANSWER[13]+=' name="Q13" ';
													appANSWER[13]+=' tabindex="#tab#">';
													appANSWER[13]+=' &nbsp;children (12 and under)';
													
appQUESTION[14]="and our pets(s):";		   			appANSWER[14] ='<table bordercollapse=collapse border=0 cellspacing=0>';
													appANSWER[14]+='<TR><TD></TD><TD class=normal colspan=4>Spayed/Neutered</TD></TR>';
													appANSWER[14]+='<TR><TD class=normal></TD>';
													appANSWER[14]+='<TD class=normal>&nbsp;&nbsp;All&nbsp;&nbsp;</TD>';
													appANSWER[14]+='<TD class=normal>&nbsp;Some&nbsp;</TD>';
													appANSWER[14]+='<TD class=normal>&nbsp;None&nbsp;</TD>';
													appANSWER[14]+='<TD class=normal>&nbsp;N/A&nbsp;</TD>';
													appANSWER[14]+='</TR>';
													appANSWER[14]+='<TR><TD class=normal>';
													appANSWER[14]+='<SELECT style= "font-size: 8pt"';
													appANSWER[14]+=' size="1"  ';
													appANSWER[14]+=' maxlength="4" ';
													appANSWER[14]+=' name="Q14" ';
													appANSWER[14]+=' tabindex="#tab#">';
													appANSWER[14]+=' <option value="">';
													appANSWER[14]+=' <option value="#Dogs: 1">1 dog';
													appANSWER[14]+=' <option value="#Dogs: 2">2 dogs';
													appANSWER[14]+=' <option value="#Dogs: 3">3 dogs';
													appANSWER[14]+=' <option value="#Dogs:>3">more than 3 dogs';
													appANSWER[14]+=' <option value="0 dogs (never owned)">0 (never owned a dog)';
													appANSWER[14]+=' <option value="0 dogs (but previously owned)">0 (previously owned a dog)';
													appANSWER[14]+=' </select>';
													appANSWER[14]+=' </TD><TD class=normal>';
													appANSWER[14]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[14]+=' TYPE=RADIO ';
													appANSWER[14]+=' NAME="Q15"';
													appANSWER[14]+=' VALUE="All spayed/neutered" ';
													appANSWER[14]+=' tabindex="#tab#">';
													appANSWER[14]+=' </TD>';
													appANSWER[14]+=' </TD><TD class=normal>';
													appANSWER[14]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[14]+=' TYPE=RADIO ';
													appANSWER[14]+=' NAME="Q15"';
													appANSWER[14]+=' VALUE="Some spayed/neutered" ';
													appANSWER[14]+=' tabindex="#tab#">';
													appANSWER[14]+=' </TD>';
													appANSWER[14]+=' </TD><TD class=normal>';
													appANSWER[14]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[14]+=' TYPE=RADIO ';
													appANSWER[14]+=' NAME="Q15"';
													appANSWER[14]+=' VALUE="None spayed/neutered" ';
													appANSWER[14]+=' tabindex="#tab#">';
													appANSWER[14]+=' </TD>';
													appANSWER[14]+=' </TD><TD class=normal>';
													appANSWER[14]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[14]+=' TYPE=RADIO ';
													appANSWER[14]+=' NAME="Q15"';
													appANSWER[14]+=' VALUE="N/A spayed/neutered" ';
													appANSWER[14]+=' tabindex="#tab#">';
													appANSWER[14]+=' </TD></TR>';
													
appQUESTION[15]="";									appANSWER[15]='';	// Filler for #dogs spayed/neutered
													
appQUESTION[16]="";									appANSWER[16] ='<TR><TD class=normal>';
													appANSWER[16]+='<SELECT style= "font-size: 8pt"';
													appANSWER[16]+=' size="1"  ';
													appANSWER[16]+=' maxlength="4" ';
													appANSWER[16]+=' name="Q16" ';
													appANSWER[16]+=' tabindex="#tab#">';
													appANSWER[16]+=' <option value="">';
													appANSWER[16]+=' <option value="#Cats: 1">1 cat';
													appANSWER[16]+=' <option value="#Cats: 2">2 cats';
													appANSWER[16]+=' <option value="#Cats: 3">3 cats';
													appANSWER[16]+=' <option value="#Cats:>3">more than 3 cats';
													appANSWER[16]+=' <option value="0 cats (never owned)">0 (never owned a cat)';
													appANSWER[16]+=' <option value="0 Cats (but previously owned)">0 (previously owned a cat)';
													appANSWER[16]+=' </select>';
													appANSWER[16]+=' </TD><TD class=normal>';
													appANSWER[16]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[16]+=' TYPE=RADIO ';
													appANSWER[16]+=' NAME="Q17"';
													appANSWER[16]+=' VALUE="All spayed/neutered" ';
													appANSWER[16]+=' tabindex="#tab#">';
													appANSWER[16]+=' </TD>';
													appANSWER[16]+=' </TD><TD class=normal>';
													appANSWER[16]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[16]+=' TYPE=RADIO ';
													appANSWER[16]+=' NAME="Q17"';
													appANSWER[16]+=' VALUE="Some spayed/neutered" ';
													appANSWER[16]+=' tabindex="#tab#">';
													appANSWER[16]+=' </TD>';
													appANSWER[16]+=' </TD><TD class=normal>';
													appANSWER[16]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[16]+=' TYPE=RADIO ';
													appANSWER[16]+=' NAME="Q17"';
													appANSWER[16]+=' VALUE="None spayed/neutered" ';
													appANSWER[16]+=' tabindex="#tab#">';
													appANSWER[16]+=' </TD>';
													appANSWER[16]+=' </TD><TD class=normal>';
													appANSWER[16]+=' <INPUT style= "font-size: 8pt"';
													appANSWER[16]+=' TYPE=RADIO ';
													appANSWER[16]+=' NAME="Q17"';
													appANSWER[16]+=' VALUE="N/A spayed/neutered" ';
													appANSWER[16]+=' tabindex="#tab#">';
													appANSWER[16]+=' </TD></TR></TABLE>';
													
appQUESTION[17]="";									appANSWER[17]='';	// Filler for #cats spayed/neutered

appQUESTION[18]="()My veterenarian is ";			appANSWER[18] ='<input style= "font-size: 8pt"';
													appANSWER[18]+=' type="text"';
													appANSWER[18]+=' size="25"';
													appANSWER[18]+=' maxlength="30" ';
													appANSWER[18]+=' name="Q18"';
													appANSWER[18]+=' tabindex="#tab#">';

appQUESTION[19]="Address:";							appANSWER[19] ='<input style= "font-size: 8pt"';
													appANSWER[19]+=' type="text"';
													appANSWER[19]+=' size="25"';
													appANSWER[19]+=' maxlength="30" ';
													appANSWER[19]+=' name="Q19"';
													appANSWER[19]+=' tabindex="#tab#">';
									
appQUESTION[20]="City:";							appANSWER[20] ='<input style= "font-size: 8pt"';
													appANSWER[20]+=' type="text"';
													appANSWER[20]+=' size="25"';
													appANSWER[20]+=' maxlength="30" ';
													appANSWER[20]+=' name="Q20"';
													appANSWER[20]+=' tabindex="#tab#">';

appQUESTION[21]="Phone:";							appANSWER[21] ='<input 	style= "font-size: 8pt"';
													appANSWER[21]+=' type="text" ';
													appANSWER[21]+=' size="15" ';
													appANSWER[21]+=' maxlength="15" ';
													appANSWER[21]+=' name="Q21"';
													appANSWER[21]+=' tabindex="#tab#">';

appQUESTION[22]=""; 								appANSWER[22] ='<INPUT style= "font-size: 8pt"';
													appANSWER[22]+=' TYPE=CHECKBOX ';
													appANSWER[22]+=' name="Q22"';
													appANSWER[22]+=' tabindex="#tab#">';
													appANSWER[22]+='&nbsp;I would appretiate a reference to a vet';
													
appQUESTION[23]="()I would like to know more about:"; appANSWER[23]='<INPUT style= "font-size: 8pt"';
													appANSWER[23]+=' TYPE="text"'; 
													appANSWER[23]+=' size="25"';
													appANSWER[23]+=' maxlength="30"';
													appANSWER[23]+=' name="Q23" ';
													appANSWER[23]+=' tabindex="#tab#">';
													appANSWER[23]+=' (enter the pet name)';

appQUESTION[24]="()Purpose(s) for a pet:"; 			appANSWER[24] ='<B>DOG</B></BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24a" tabindex="#tab#">&nbsp;companion<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24b" tabindex="#tab#">&nbsp;show/sport<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24c" tabindex="#tab#">&nbsp;breeding<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24d" tabindex="#tab#">&nbsp;hunting<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24e" tabindex="#tab#">&nbsp;herding<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24f" tabindex="#tab#">&nbsp;watchdog<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24g" tabindex="#tab#">&nbsp;guard dog (for a business)<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24h" tabindex="#tab#">&nbsp;special needs<BR>';
													appANSWER[24]+='<INPUT TYPE=CHECKBOX NAME="Q24i" tabindex="#tab#">&nbsp;other<BR>';

appQUESTION[25]=""; 								appANSWER[25] ='<B>CAT</B></BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25a" tabindex="#tab#">&nbsp;companion<BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25b" tabindex="#tab#">&nbsp;show/sport<BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25c" tabindex="#tab#">&nbsp;breeding<BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25d" tabindex="#tab#">&nbsp;mouser (house)<BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25e" tabindex="#tab#">&nbsp;mouser (barn)<BR>';
													appANSWER[25]+='<INPUT TYPE=CHECKBOX NAME="Q25f" tabindex="#tab#">&nbsp;other<BR>';

appQUESTION[26]="()The pet will live"; 				appANSWER[26] ='<SELECT style= "font-size: 8pt"';
													appANSWER[26]+=' size="1" ';
													appANSWER[26]+=' maxlength="4"'; 
													appANSWER[26]+=' name="Q26" ';
													appANSWER[26]+=' tabindex="#tab#">';
													appANSWER[26]+=' <option value="">';
													appANSWER[26]+=' <option value="INSIDE">inside';
													appANSWER[26]+=' <option value="INSIDE">outside';
													appANSWER[26]+=' <option value="IN&OUT">inside & outside';
													appANSWER[26]+=' </select>';
													
appQUESTION[27]=""; 								appANSWER[27]='a&nbsp;<SELECT style= "font-size: 8pt"';
													appANSWER[27]+=' size="1"';
													appANSWER[27]+=' maxlength="4" ';
													appANSWER[27]+=' name="Q27" ';
													appANSWER[27]+=' tabindex="#tab#">';
													appANSWER[27]+=' <option value="">';
													appANSWER[27]+=' <option value="APARTMENT">apartment';
													appANSWER[27]+=' <option value="TOWNHOUSE">townhouse';
													appANSWER[27]+=' <option value="MOBILE HOME">mobile home';
													appANSWER[27]+=' <option value="HOUSE">house';
													appANSWER[27]+=' <option value="FARM">farm';
													appANSWER[27]+=' </select>';
												
appQUESTION[28]=""; 								appANSWER[28]='that is	<SELECT style= "font-size: 8pt"';
													appANSWER[28]+=' size="1" ';
													appANSWER[28]+=' maxlength="4" ';
													appANSWER[28]+=' name="Q28" ';
													appANSWER[28]+=' tabindex="#tab#">';
													appANSWER[28]+=' <option value="">';
													appANSWER[28]+=' <option value="OWN">owned';
													appANSWER[28]+=' <option value="RENT">rented';
													appANSWER[28]+=' </select>';
													
appQUESTION[29]=""; 								appANSWER[29]='with a	<SELECT style= "font-size: 8pt"';
													appANSWER[29]+=' size="1"';  
													appANSWER[29]+=' maxlength="4"'; 
													appANSWER[29]+=' name="Q29" ';
													appANSWER[29]+=' tabindex="#tab#">';
													appANSWER[29]+=' <option value="">';
													appANSWER[29]+=' <option value="FENCED YARD">fenced yard';
													appANSWER[29]+=' <option value="KENNEL/RUN">kennel/run';
													appANSWER[29]+=' <option value="NO FENCE">no fence';
													appANSWER[29]+=' </select>';
													
appQUESTION[30]="()Typically, the pet will be alone:"; appANSWER[30]='<SELECT style= "font-size: 8pt"';
													appANSWER[30]+=' size="1"';
													appANSWER[30]+=' maxlength="4" ';
													appANSWER[30]+=' name="Q30" ';
													appANSWER[30]+=' tabindex="#tab#">';
													appANSWER[30]+=' <option value="">';
													appANSWER[30]+=' <option value="Not at all">Not at all';
													appANSWER[30]+=' <option value="1-4 hours">1-4 hours';
													appANSWER[30]+=' <option value="4-8 hours">4-8 hours';
													appANSWER[30]+=' <option value="8 or more hours">8 or more hours';
													appANSWER[30]+=' </select>';

appQUESTION[31]="()Monitary Donation";				appANSWER[31] ='<input style= "font-size: 8pt"';
													appANSWER[31]+=' type="text"';
													appANSWER[31]+=' size="25"';
													appANSWER[31]+=' maxlength="25" ';
													appANSWER[31]+=' name="Q31"';
													appANSWER[31]+=' tabindex="#tab#">';

appQUESTION[32]="";					 				appANSWER[32] ='<INPUT style= "font-size: 8pt"';
													appANSWER[32]+=' TYPE=RADIO ';
													appANSWER[32]+=' NAME="Q32"';
													appANSWER[32]+=' VALUE="Cheque" ';
													appANSWER[32]+=' tabindex="#tab#">Cheque<BR>';
								 					appANSWER[32]+='<INPUT style= "font-size: 8pt"';	
													appANSWER[32]+=' TYPE=RADIO ';
													appANSWER[32]+=' NAME="Q32"';
													appANSWER[32]+=' VALUE="Visa" ';
													appANSWER[32]+=' tabindex="#tab#">Visa<BR>';
								 					appANSWER[32]+='<INPUT style= "font-size: 8pt"';	
													appANSWER[32]+=' TYPE=RADIO ';
													appANSWER[32]+=' NAME="Q32"';
													appANSWER[32]+=' VALUE="MasterCard" ';
													appANSWER[32]+=' tabindex="#tab#">MasterCard<BR>';
								 					appANSWER[32]+='<INPUT style= "font-size: 8pt"';	
													appANSWER[32]+=' TYPE=RADIO ';
													appANSWER[32]+=' NAME="Q32"';
													appANSWER[32]+=' VALUE="Amex" ';
													appANSWER[32]+=' tabindex="#tab#">American Express<BR>';
													appANSWER[32]+=' &nbsp;&nbsp;&nbsp;&nbsp;(For your security a representative will contact you.)';

appQUESTION[33]="";						 			appANSWER[33] ='<INPUT TYPE=CHECKBOX NAME="Q33" tabindex="#tab#">&nbsp;Tax Receipt?';

appQUESTION[34]="()Other Donation";		 			appANSWER[34] ='<INPUT TYPE=CHECKBOX NAME="Q34a" tabindex="#tab#">&nbsp;Food<BR>';
										 			appANSWER[34]+='<INPUT TYPE=CHECKBOX NAME="Q34b" tabindex="#tab#">&nbsp;Animal Supplies (leashes, bowls, toys...)<BR>';
										 			appANSWER[34]+='<INPUT TYPE=CHECKBOX NAME="Q34c" tabindex="#tab#">&nbsp;Shelter Supplies (fencing, building materials...)<BR>';
										 			appANSWER[34]+='<INPUT TYPE=CHECKBOX NAME="Q34d" tabindex="#tab#">&nbsp;Other';

appQUESTION[35]="Please describe:"; 				appANSWER[35]='<TEXTAREA style= "font-size: 8pt" ';
													appANSWER[35]+=' rows=3 cols=40 ';
													appANSWER[35]+=' name="Q35" ';
													appANSWER[35]+=' tabindex="#tab#"></TEXTAREA>';
													
appQUESTION[36]="()How did you hear about us?"; 	appANSWER[36]='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="PREVIOUSLY ADOPTED"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;previously adopted a pet from us<BR>';
													appANSWER[36]+='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="FRIEND/FAMILY"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;friend or family reference<BR>';
													appANSWER[36]+='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="POSTER/NOTICE/AD"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;poster, notice or ad<BR>';
													appANSWER[36]+='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="petfinder.com"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;petfinder.com<BR>';
													appANSWER[36]+='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="Internet (Google, kijiji...)"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;Other Internet (Google, kijiji...)<BR>';
													appANSWER[36]+='<INPUT 	style= "font-size: 8pt"';
													appANSWER[36]+=' TYPE=RADIO ';
													appANSWER[36]+=' name="Q36" ';
													appANSWER[36]+=' VALUE="OTHER"';
													appANSWER[36]+=' tabindex="#tab#">&nbsp;Other<BR>';

appQUESTION[37]="()Anything else to tell us?"; 		appANSWER[37] ='<TEXTAREA style= "font-size: 8pt" ';
													appANSWER[37]+=' rows=4 cols=40 ';
													appANSWER[37]+=' name="Q37" ';
													appANSWER[37]+=' tabindex="#tab#"></TEXTAREA>';
var NUMQ=37
var nltxt="\n";
var tabtxt="\t";

// -------------------------------------------------------------------------------------------------
//																						fnRADIO(obj)
// -------------------------------------------------------------------------------------------------
function fnRADIO(radioOBJ) {
for (var rr=0; rr<radioOBJ.length; rr++) {
	if (radioOBJ[rr].checked) {return radioOBJ[rr].value;}
	}
return -1;
}

// -------------------------------------------------------------------------------------------------
//														   							  fnCHECKED(obj)
// -------------------------------------------------------------------------------------------------
function fnCHECKED(checkOBJ) {
if (checkOBJ.checked) {return nltxt+"                        "+checkOBJ.name;}
return "";
}

// -------------------------------------------------------------------------------------------------
//																			  fnANSWER(appTYPE,qnum)
// -------------------------------------------------------------------------------------------------
function fnANSWER(appTYPE,qq) {
//alert("getting fnANSWER("+appTYPE+","+qq+")");
var answerX="";	
if ((appTYPE==1 && app1[qq]>0) ||
	(appTYPE==2 && app2[qq]>0) ||
	(appTYPE==3 && app3[qq]>0)) 
	{

	switch(qq) {	
	case 1:		answerX=parent.document.application.Q1.value;
			    break;
	case 2:		answerX=parent.document.application.Q2.value;
			    break;
	case 3:		answerX=parent.document.application.Q3.value;
			    break;
	case 4:		answerX=parent.document.application.Q4[parent.document.application.Q4.selectedIndex].value;
			    break;
	case 5:		answerX=parent.document.application.Q5.value;
			    break;
	case 6:		answerX=parent.document.application.Q6.value;
			    break;
	case 7:		answerX=parent.document.application.Q7.value;
			    break;
	case 8:		answerX=parent.document.application.Q8.value;
			    break;
	case 9:		if (fnRADIO(parent.document.application.Q9)==-1) {answerX="";}
				else											 {answerX=fnRADIO(parent.document.application.Q9)+ " preferred";}
			    break;
	case 10:	answerX=parent.document.application.Q10.value;
			    break;
	case 11:	answerX=parent.document.application.Q11.value + " adults (18 and over)";
			    break;
	case 12:	answerX=parent.document.application.Q12.value + " teenagers (13-17)";
			    break;
	case 13:	answerX=parent.document.application.Q13.value + " children (12 and under)";
			    break;
	case 14:	answerX=parent.document.application.Q14[parent.document.application.Q14.selectedIndex].value;
			    break;
	case 15:	if (fnRADIO(parent.document.application.Q15)==-1) { answerX=""; }
				else											  { answerX=fnRADIO(parent.document.application.Q15)}
			    break;
	case 16:	answerX=parent.document.application.Q16[parent.document.application.Q16.selectedIndex].value;
			    break;
	case 17:	if (fnRADIO(parent.document.application.Q17)==-1) { answerX=""; }
				else											  { answerX=fnRADIO(parent.document.application.Q17)}
			    break;
	case 18:	answerX=parent.document.application.Q18.value;
			    break;
	case 19:	answerX=parent.document.application.Q19.value;
			    break;
	case 20:	answerX=parent.document.application.Q20.value;
			    break;
	case 21:	answerX=parent.document.application.Q21.value;
			    break;
	case 22:	if (fnCHECKED(parent.document.application.Q22)!="") { answerX="Requesting a reference to a vet";}
			    break;
	case 23:	answerX=parent.document.application.Q23.value;
			    break;
	case 24:	if (fnCHECKED(parent.document.application.Q24a)!="") { answerX+="dogCompanion,";}
				if (fnCHECKED(parent.document.application.Q24b)!="") { answerX+="dogShow_Sport,";}
				if (fnCHECKED(parent.document.application.Q24c)!="") { answerX+="dogBreeding,";}
				if (fnCHECKED(parent.document.application.Q24d)!="") { answerX+="dogHunting,";}
				if (fnCHECKED(parent.document.application.Q24e)!="") { answerX+="dogHerding,";}
				if (fnCHECKED(parent.document.application.Q24f)!="") { answerX+="dogWatchDog,";}
				if (fnCHECKED(parent.document.application.Q24g)!="") { answerX+="dogGuardDog,";}
				if (fnCHECKED(parent.document.application.Q24h)!="") { answerX+="dogSpecialNeeds,";}
				if (fnCHECKED(parent.document.application.Q24i)!="") { answerX+="dogOther,";}
			    break;
	case 25:	if (fnCHECKED(parent.document.application.Q25a)!="") { answerX+="catCompanion,";}
				if (fnCHECKED(parent.document.application.Q25a)!="") { answerX+="catShow_Sport,";}
				if (fnCHECKED(parent.document.application.Q25a)!="") { answerX+="catBreeding,";}
				if (fnCHECKED(parent.document.application.Q25a)!="") { answerX+="catBarnCat,";}
				if (fnCHECKED(parent.document.application.Q25a)!="") { answerX+="catOther,";}
			    break;
	case 26:	answerX=parent.document.application.Q26[parent.document.application.Q26.selectedIndex].value;
			    break;
	case 27:	answerX=parent.document.application.Q27[parent.document.application.Q27.selectedIndex].value;
			    break;
	case 28:	answerX=parent.document.application.Q28[parent.document.application.Q28.selectedIndex].value;
			    break;
	case 29:	answerX=parent.document.application.Q29[parent.document.application.Q29.selectedIndex].value;
			    break;
	case 30:	answerX=parent.document.application.Q30[parent.document.application.Q30.selectedIndex].value;
			    break;
	case 31:	answerX=parent.document.application.Q31.value;
			    break;
	case 32:	answerX=fnRADIO(parent.document.application.Q32);
			    break;
	case 33:	if (fnCHECKED(parent.document.application.Q33)!="") { answerX="Tax receipt requested.";}
			    break;
	case 34:	if (fnCHECKED(parent.document.application.Q34a)!="") { answerX+="Food,";}
				if (fnCHECKED(parent.document.application.Q34b)!="") { answerX+="Animal Supplies,";}
				if (fnCHECKED(parent.document.application.Q34c)!="") { answerX+="Shelter Supplies,";}
				if (fnCHECKED(parent.document.application.Q34d)!="") { answerX+="Other";}
			    break;
	case 35:	answerX=parent.document.application.Q35.value;
			    break;
	case 36:	if (fnRADIO(parent.document.application.Q36)==-1) {answerX="(did not say)";}
				else											  {answerX=fnRADIO(parent.document.application.Q36);}
			    break;
	case 37:	answerX=parent.document.application.Q37.value;
				if (answerX=="") {answerX="(nothing to add)";}
			    break;
	
	}
	}
if (answerX==-1) {answerX="";}
//alert("returning fnANSWER("+appTYPE+","+qq+")="+answerX);
return answerX;
}

// -------------------------------------------------------------------------------------------------
//																		 		  fnVALIDATE(appTYPE)
// -------------------------------------------------------------------------------------------------
function fnVALIDATE(appTYPE) {

var setfocus="";
var txt="";

for (var qq=1; qq<38; qq++) {

	if ((appTYPE==1 && app1[qq]>1) ||
	    (appTYPE==2 && app2[qq]>1) ||
	    (appTYPE==3 && app3[qq]>1)) {
		    
		if (fnANSWER(appTYPE,qq)=="" ) {
			switch(qq) 
			{	
			case 1:		txt+=nltxt+"Your Name is required.";
						if (setfocus=="") {setfocus=parent.document.application.Q1}
					    break;
			case 6:		if (fnANSWER(appTYPE,7)+fnANSWER(appTYPE,8)=="")	{txt+=nltxt+"A phone number or email address is required.";
													 			 	 		 if (setfocus=="") {setfocus=parent.document.application.Q6}}
					    break;
			case 10: 	txt+=nltxt+"Please tell us who this pet is for.";
	  			 		if (setfocus=="") {setfocus=parent.document.application.Q10}
					    break;
			case 11: 	txt+=nltxt+"How many adults?";
						if (setfocus=="") {setfocus=parent.document.application.Q11}
					    break;
			case 12: 	txt+=nltxt+"Please confirm there are no teenagers by entering 0.";
						if (setfocus=="") {setfocus=parent.document.application.Q12}
					    break;
			case 13:	txt+=nltxt+"Please confirm there are no children by entering 0.";
						if (setfocus=="") {setfocus=parent.document.application.Q13}
					    break;
			case 14: 	txt+=nltxt+"Do you have any dogs?";
				 		if (setfocus=="") {setfocus=parent.document.application.Q14}
					    break;
			case 15: 	if (fnANSWER(appTYPE,14).charAt(0)!="0")	{txt+=nltxt+"Are your dogs spayed/neutered?";
								 	 			 					 if (setfocus=="") {setfocus=parent.document.application.Q14}}
					    break;
			case 16: 	txt+=nltxt+"Do you have any cats?";
						if (setfocus=="") {setfocus=parent.document.application.Q16}
					    break;
			case 17: 	if (fnANSWER(appTYPE,16).charAt(0)!="0")	{txt+=nltxt+"Are your cats spayed/neutered?";
								 	 			 					 if (setfocus=="") {setfocus=parent.document.application.Q16}}
					    break;
			case 23: 	if (fnANSWER(appTYPE,24)=="") 	{txt+=nltxt+"Please tell us what you are looking for...either a specific pet or purpose for the pet.";
								 	 			 		 if (setfocus=="") {setfocus=parent.document.application.Q23}}
					    break;
			case 26: 	txt+=nltxt+"You missed if this pet is indoors or out.";
						if (setfocus=="") {setfocus=parent.document.application.Q26}
					    break;
			case 27: 	txt+=nltxt+"Please tell us your type of house.";
						if (setfocus=="") {setfocus=parent.document.application.Q27}
					    break;
			case 28: 	txt+=nltxt+"Please tell us if you own or rent.";
						if (setfocus=="") {setfocus=parent.document.application.Q28}
					    break;
			case 29: 	txt+=nltxt+"Please tell us if your yard has a fence.";
						if (setfocus=="") {setfocus=parent.document.application.Q29}
					    break;
			case 30: 	txt+=nltxt+"You missed the typical length of time the pet might be alone.";
						if (setfocus=="") {setfocus=parent.document.application.Q30}
					    break;
			case 31: 	if (fnANSWER(appTYPE,32)=="")	{txt+=nltxt+"Please tell us method of donation - or link to PayPal.";
        												 if (setfocus=="") {setfocus=parent.document.application.Q32}}
					    break;
    		}
		}
	}
}
if (txt!="") {	alert(txt);
    			setfocus.focus();
				return -1;
			 }
}

// -------------------------------------------------------------------------------------------------
//	 											   							  fnAPPLICATION(appTYPE)
// -------------------------------------------------------------------------------------------------
function fnAPPLICATION(appTYPE) {
//alert("fnAPPLICATION("+appTYPE+")");

var txtAPP="<html>";
txtAPP+="<head>";
if (appTYPE==1) {txtAPP+="<title>ADOPTION APPLICATION</title>";}
if (appTYPE==2) {txtAPP+="<title>YES... I CAN HELP BY FOSTERING A PET !</title>";}
if (appTYPE==3) {txtAPP+="<title>YES... I CAN HELP WITH A DONATION !</title>";}
txtAPP+="<LINK REL=StyleSheet HREF='style.css' TYPE='text/css'>";
txtAPP+="</head>";
txtAPP+="<body>";
if (appTYPE==2){txtAPP+="<table cellpadding=0 cellspacing=0 width=600 border=0 background=white align=center>";
				txtAPP+="<tr><td class=centered>";
				txtAPP+="Foster parents provide safe, secure, loving shelter for the rescue dogs as they ";
				txtAPP+="wait for a forever home. ABCR provides the vet care, crates and food. Foster homes ";
				txtAPP+="provide the <B>LOVE</B> - the most important ingredient to recovery. It's easy and rewarding.<BR><BR>";
				txtAPP+="ABCR will make sure you receive a foster dog that is compatible with your home, family ";
				txtAPP+="and experience. Please help and fill out the form below.";
				txtAPP+="</td></tr><table>";
			     }

if (appTYPE==3) {txtAPP+='<table cellpadding=0 cellspacing=0 width=600 border=0 background=white align=center>';
				 txtAPP+='<tr><td class=centered>';
				 txtAPP+='<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">';
			  	 txtAPP+='Please fill out the form below OR now you can safely via <b>PayPal</b><br>';
				 txtAPP+='<input type="hidden" name="cmd" value="_donations">';
				 txtAPP+='<input type="hidden" name="business" value="allbreedcaninerescue@sympatico.ca">';
				 txtAPP+='<input type="hidden" name="item_name" value="Donation for All Breed Canine Rescue">';
				 txtAPP+='<input type="hidden" name="no_shipping" value="1">';
				 txtAPP+='<input type="hidden" name="currency_code" value="CAD">';
				 txtAPP+='<input type="hidden" name="tax" value="0">';
				 txtAPP+='<input type="hidden" name="lc" value="CA">';
				 txtAPP+='<input type="hidden" name="bn" value="PP-DonationsBF">';
				 txtAPP+='<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">';
				 txtAPP+='<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">';
				 txtAPP+='</form>';
				 txtAPP+='</td></tr><table>';
			     }

txtAPP+='<FORM name="application">';
txtAPP+='<table cellpadding=0 cellspacing=0 width=600 border=0 background=white align=center>';
txtAPP+='<tr><td class=title colspan=3>';
if (appTYPE==1) {txtAPP+='<br>Adoption Application<br><br>';}
if (appTYPE==2) {txtAPP+='<br>YES... I CAN HELP BY FOSTERING A PET !<br><br>';}
if (appTYPE==3) {txtAPP+='<br>YES... I CAN HELP WITH A DONATION !<br><br>';}
txtAPP+='</td></tr><TR>';
var qnum=0;
for (var qq=1; qq<=NUMQ; qq++) {
	if ( (appQUESTION[qq]!="" || appANSWER[qq]!="") && ((appTYPE==1 && app1[qq]>0) ||
	                                                    (appTYPE==2 && app2[qq]>0) ||
	                                              	    (appTYPE==3 && app3[qq]>0)) )
		{ 	txtQ=appQUESTION[qq];
			if (txtQ.substr(0,2)=="()") 			{ txtQ=txtQ.substr(2);}											// remove ()

			txtA=appANSWER[qq];

			if (txtA.indexOf("#tab#")>=0) 			{ txtA=txtA.substr(0,txtA.indexOf("#tab#"))+qq+txtA.substr(txtA.indexOf("#tab#")+5)}												// #tab#
			
			if (appQUESTION[qq].substr(0,2)=="()")	{ txtAPP+='<tr><TD class=menu colspan=3>&nbsp</td></tr>';}		// - - - -
			
			txtAPP+='<tr>';
			txtAPP+='<td class=normal NOWRAP>';
			if (appQUESTION[qq].substr(0,2)=="()") 	{ qnum=qnum+1; 
													  txtAPP+=qnum+'.&nbsp;'; }  									// #
			else					 	   			{ txtAPP+='&nbsp;';}
			txtAPP+='</td>';
											  
			txtAPP+='<td class=normal NOWRAP>';
			txtAPP+=txtQ																							// Question
			txtAPP+='</td>';

			txtAPP+='<td class=normal>';
			txtAPP+=txtA;																							// Answer
			txtAPP+='</td>';
			txtAPP+='</tr>';
		}
}

txtAPP+='<tr><TD class=menu     colspan=3>&nbsp</td></tr>';
txtAPP+='<tr><TD class=centered colspan=3>';
txtAPP+='<INPUT type=button value="Submit" onClick="top.fnSUBMIT('+appTYPE+')" tabindex="998">&nbsp;&nbsp;';
txtAPP+='<INPUT type=button value="Cancel" onClick="top.FNcancel()" tabindex="999">';
txtAPP+='</td></TR></table>';
txtAPP+="</FORM>";
txtAPP+="</body>";
txtAPP+="</html>";
return txtAPP;
}

// -------------------------------------------------------------------------------------------------
//																				    FNtxtAPP(appTYPE)
// -------------------------------------------------------------------------------------------------
function FNtxtAPP(appTYPE){
//alert("FNtxtAPP()");	
var txtAPP="";
txtAPP+=nltxt+nltxt+"-------------------------------------";
txtAPP+=nltxt+ABBRNAME+" ONLINE";
if (appTYPE==1) {txtAPP+=" ADOPTION APPLICATION";}
if (appTYPE==2) {txtAPP+=" YES... I CAN HELP BY FOSTERING A PET !";}
if (appTYPE==3) {txtAPP+=" YES... I CAN HELP WITH A DONATION !";}

for (var qq=1; qq<=NUMQ; qq++) {
	if ((appTYPE==1 && app1[qq]>0) ||
	    (appTYPE==2 && app2[qq]>0) ||
	    (appTYPE==3 && app3[qq]>0))
		{ 	
			txtQ=appQUESTION[qq];
			if (txtQ.substr(0,2)=="()") 			{ txtQ=txtQ.substr(2);}											// remove ()
			
			if (appQUESTION[qq].substr(0,2)=="()")	{ txtAPP+=nltxt+"------------------------";}
			txtAPP+=nltxt+txtQ																						// Question
			for (ss=1; ss<=35-txtQ.length; ss++)	{ txtAPP+=" ";}

			txtAPP+=fnANSWER(appTYPE,qq);																			// Answer

		}
}
return txtAPP;
}

// -------------------------------------------------------------------------------------------------
//																				    fnSUBMIT(appTYPE)
// -------------------------------------------------------------------------------------------------
function fnSUBMIT(appTYPE){
//alert("fnSUBMIT")
if (fnVALIDATE(appTYPE)!=-1) {
	var txtFORM="";
	txtFORM+="<html>";
	txtFORM+="<head>";
	if (appTYPE==1) {txtFORM+="<title>ADOPTION APPLICATION</title>";}
	if (appTYPE==2) {txtFORM+="<title>YES... I CAN HELP BY FOSTERING A PET !</title>";}
	if (appTYPE==3) {txtFORM+="<title>YES... I CAN HELP WITH A DONATION !</title>";}
	txtFORM+="<LINK REL=StyleSheet HREF='style.css' TYPE='text/css'>";
	txtFORM+="</head>";
	txtFORM+="<body>";
	txtFORM+="<FORM action=http://members.petfinder.com/~ON"+SITENUM+"/cgi-bin/ON"+SITENUM+"-formmail.cgi method=post>";
	txtFORM+="<INPUT type=hidden name=recipient value='"+APPEMAIL+"'> ";

	if (appTYPE==1) {txtFORM+="<INPUT type=hidden name=subject   value='Adoption Application";
	                 if (fnANSWER(appTYPE,23)!="") {txtFORM+=" for "+fnANSWER(appTYPE,23);}
	                 else                          {txtFORM+=" for "+fnANSWER(appTYPE,24);}
	                 txtFORM+=" from "+fnANSWER(appTYPE,1)+"'>";
			         txtFORM+="<INPUT type=hidden name=email     value='"+ABBRNAME+" Online Application'>";
			        }
	if(appTYPE==2)	{txtFORM+="<INPUT type=hidden name=subject   value='Foster Home Application"
	                 txtFORM+=" from "+fnANSWER(appTYPE,1)+"'>";
			         txtFORM+="<INPUT type=hidden name=email     value='"+ABBRNAME+" Online Foster Application'>";
			        }
	if(appTYPE==3)	{txtFORM+="<INPUT type=hidden name=subject   value='Donation offer"
	                 txtFORM+=" from "+fnANSWER(appTYPE,1)+"'>";
			         txtFORM+="<INPUT type=hidden name=email     value='"+ABBRNAME+" Online Donation'>";
			        }
	txtFORM+="<INPUT type=hidden name=redirect  value='http://members.petfinder.org/~ON"+SITENUM+"/a_MAIN.html?page=appTHANKS' >";
	txtFORM+="<TEXTAREA name=message style='visibility:hidden'>"+FNtxtAPP(appTYPE)+"</TEXTAREA>"
	txtFORM+="<table cellpadding=0 cellspacing=4 width=600 border=0 background=white align=center>";
	switch(appTYPE) {
	case 1:	txtFORM+="<tr><td colspan=2 NOWRAP class=section>ADOPTION TERMS and CONDITIONS</td></tr>";
			txtFORM+="<tr><td colspan=2 NOWRAP class=title>ABCR PROMISES:</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>1.</td><td class=normal >All information provided to ABCR is for the sole use of ABCR and may be used for purposes of communication and follow up or other such purposes.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>2.</td><td class=normal >All mature animals are spayed or neutered prior to adoption OR as at a suitable arranged time and paid by ABCR.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>3.</td><td class=normal >All health records will be provided if available; however, ABCR cannot be held accountable for the accuracy of third party documentation.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>4.</td><td class=normal >The adoption fee is soley to help defer the costs of housing, feeding and providing necessary medical care including spay/neuter of each animal.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>5.</td><td class=normal >Animals may be returned to ABCR within 7 days of the adoption contract date.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>6.</td><td class=normal >All adoption fees are non-refundable.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>7.</td><td class=normal >ABCR will provide the successful applicant with a copy of all signed forms within 30 days of the Contract Date.</td></tr>";
						
			txtFORM+="<tr><td colspan=2 NOWRAP class=title width=48%>YOU PROMISE:</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>1.</td><td class=normal >I am 19 years of age or older and can present valid identification with a current address.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>2.</td><td class=normal >No animal will be adopted as a gift for another person unless otherwise stated.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>3.</td><td class=normal >I agree to provide my pet with proper food, water, shelter, veterinary care and humane treatment at all times and will not expect reimbursement from ABCR for any expenses incurred thereof.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>4.</td><td class=normal >I agree that any agent of ABCR may inspect this animal and its living conditions at any reasonable time and may reclaim it if there is evidence that any of these Terms and Conditions have been violated.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>5.</td><td class=normal >I agree to tag, license, and rabies inoculate the adopted pet in accordance with the laws of the community in which I reside.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>6.</td><td class=normal >I agree not to abandon this animal.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>7.</td><td class=normal >I agree to spay/neuter this animal on/by as soon as age permits if not already done.</td></tr>";
			break;

    case 2:	txtFORM+="<tr><td colspan=2 NOWRAP class=section>ADOPTION TERMS and CONDITIONS</td></tr>";
			txtFORM+="<tr><td colspan=2 NOWRAP class=title>ABCR PROMISES:</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>1.</td><td class=normal >All information provided to ABCR is for the sole use of ABCR and may be used for purposes of communication and follow up or other such purposes.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>2.</td><td class=normal >ABCR will provide or reimburse funds for any instructed or reasonable veterenarian care at an approved veterenarian or animal clinic. Where possible ABCR will also supply any donated pet foods.</td></tr>";
						
			txtFORM+="<tr><td colspan=2 NOWRAP class=title width=48%>YOU PROMISE:</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>1.</td><td class=normal >I am 19 years of age or older and can present valid identification with a current address.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>2.</td><td class=normal >I agree to provide the pet with proper food, water, shelter and humane treatment at all times and will not expect reimbursement from ABCR for any expenses incurred thereof.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>3.</td><td class=normal >I agree that any agent of ABCR may inspect any fostered animal and its living conditions at any reasonable time and may reclaim it if there is evidence that any of these Terms and Conditions have been violated.</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>4.</td><td class=normal >As a representative of ABCR, I agree to adhere to any ABCR instructions regarding the foster pet and potential adoption candidates.</td></tr>";
			break;
			
	case 3: txtFORM+="<tr><td class=normal NOWRAP>Name:</td><td class=normal>"+fnANSWER(appTYPE,1)+"</td><td>&nbsp;</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>Monitary Donation:</td><td class=normal>"+fnANSWER(appTYPE,31)+"</td><td>&nbsp;</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>Payment Type:</td><td class=normal>"+fnANSWER(appTYPE,32)+"</td><td>&nbsp;</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>Other Donation:</td><td class=normal>"+fnANSWER(appTYPE,34)+"</td><td>&nbsp;</td></tr>";
			txtFORM+="<tr><td class=normal NOWRAP>Description:</td><td class=normal>"+fnANSWER(appTYPE,35)+"<td><td>&nbsp;</td></tr>";
	}
			
	txtFORM+="<tr><td colspan=2 NOWRAP class=centered><INPUT type=submit value='I Agree' tabindex='998'>&nbsp;&nbsp;";
	txtFORM+="										  <INPUT type=button value='Cancel'  onClick='top.FNcancel()' tabindex='999'>";
	txtFORM+="</td></TR>";
	txtFORM+="</table>";
	
	txtFORM+="</FORM>";
	txtFORM+="</body>";
	txtFORM+="</html>";
    indexDYNAMIC(txtFORM);
	}
}

// -------------------------------------------------------------------------------------------------
//																						  FNcancel()
// -------------------------------------------------------------------------------------------------
function FNcancel() {
indexPAGE("p_HOME.html");
}

