function cPets(objName) {
this.name = objName;
window[objName] = this;
this.petFields = new Array();
this.petFields['animalID'] = Array();
this.petFields['animalID']['index'] = 0;
this.petFields['animalID']['name'] = 'Animal ID';
this.petFields['status'] = Array();
this.petFields['status']['index'] = 1;
this.petFields['status']['name'] = 'Status';
this.petFields['lastUpdated'] = Array();
this.petFields['lastUpdated']['index'] = 2;
this.petFields['lastUpdated']['name'] = 'Last Update';
this.petFields['rescueID'] = Array();
this.petFields['rescueID']['index'] = 3;
this.petFields['rescueID']['name'] = 'Rescue ID';
this.petFields['name'] = Array();
this.petFields['name']['index'] = 4;
this.petFields['name']['name'] = 'Name';
this.petFields['summary'] = Array();
this.petFields['summary']['index'] = 5;
this.petFields['summary']['name'] = 'Summary';
this.petFields['species'] = Array();
this.petFields['species']['index'] = 6;
this.petFields['species']['name'] = 'Species';
this.petFields['breed'] = Array();
this.petFields['breed']['index'] = 7;
this.petFields['breed']['name'] = 'Breed';
this.petFields['primaryBreed'] = Array();
this.petFields['primaryBreed']['index'] = 8;
this.petFields['primaryBreed']['name'] = 'Primary Breed';
this.petFields['secondaryBreed'] = Array();
this.petFields['secondaryBreed']['index'] = 9;
this.petFields['secondaryBreed']['name'] = 'Secondary Breed';
this.petFields['sex'] = Array();
this.petFields['sex']['index'] = 10;
this.petFields['sex']['name'] = 'Gender';
this.petFields['mixed'] = Array();
this.petFields['mixed']['index'] = 11;
this.petFields['mixed']['name'] = 'Mixed';
this.petFields['dogs'] = Array();
this.petFields['dogs']['index'] = 12;
this.petFields['dogs']['name'] = 'Good with Dogs';
this.petFields['cats'] = Array();
this.petFields['cats']['index'] = 13;
this.petFields['cats']['name'] = 'Good with Cats';
this.petFields['kids'] = Array();
this.petFields['kids']['index'] = 14;
this.petFields['kids']['name'] = 'Good with Kids';
this.petFields['declawed'] = Array();
this.petFields['declawed']['index'] = 15;
this.petFields['declawed']['name'] = 'Declawed';
this.petFields['housetrained'] = Array();
this.petFields['housetrained']['index'] = 16;
this.petFields['housetrained']['name'] = 'House Trained';
this.petFields['age'] = Array();
this.petFields['age']['index'] = 17;
this.petFields['age']['name'] = 'Age';
this.petFields['specialNeeds'] = Array();
this.petFields['specialNeeds']['index'] = 18;
this.petFields['specialNeeds']['name'] = 'Special Needs';
this.petFields['altered'] = Array();
this.petFields['altered']['index'] = 19;
this.petFields['altered']['name'] = 'Altered';
this.petFields['size'] = Array();
this.petFields['size']['index'] = 20;
this.petFields['size']['name'] = 'Size';
this.petFields['uptodate'] = Array();
this.petFields['uptodate']['index'] = 21;
this.petFields['uptodate']['name'] = 'Up-to-date';
this.petFields['color'] = Array();
this.petFields['color']['index'] = 22;
this.petFields['color']['name'] = 'Color';
this.petFields['coatLength'] = Array();
this.petFields['coatLength']['index'] = 23;
this.petFields['coatLength']['name'] = 'Coat Length';
this.petFields['pattern'] = Array();
this.petFields['pattern']['index'] = 24;
this.petFields['pattern']['name'] = 'Pattern';
this.petFields['courtesy'] = Array();
this.petFields['courtesy']['index'] = 25;
this.petFields['courtesy']['name'] = 'Courtesy Listing';
this.petFields['found'] = Array();
this.petFields['found']['index'] = 26;
this.petFields['found']['name'] = 'Found';
this.petFields['foundDate'] = Array();
this.petFields['foundDate']['index'] = 27;
this.petFields['foundDate']['name'] = 'Found Date';
this.petFields['foundZipcode'] = Array();
this.petFields['foundZipcode']['index'] = 28;
this.petFields['foundZipcode']['name'] = 'Found Zip Code';
this.petFields['killDate'] = Array();
this.petFields['killDate']['index'] = 29;
this.petFields['killDate']['name'] = 'Euth Date';
this.petFields['killReason'] = Array();
this.petFields['killReason']['index'] = 30;
this.petFields['killReason']['name'] = 'Euth Reason';
this.petFields['description'] = Array();
this.petFields['description']['index'] = 31;
this.petFields['description']['name'] = 'Description';
this.petFields['pic1'] = Array();
this.petFields['pic1']['index'] = 32;
this.petFields['pic1']['name'] = 'Picture';
this.petFields['pictmn1'] = Array();
this.petFields['pictmn1']['index'] = 33;
this.petFields['pictmn1']['name'] = 'Thumbnail';
this.petFields['pic2'] = Array();
this.petFields['pic2']['index'] = 34;
this.petFields['pic2']['name'] = 'Picture';
this.petFields['pictmn2'] = Array();
this.petFields['pictmn2']['index'] = 35;
this.petFields['pictmn2']['name'] = 'Thumbnail';
this.petFields['pic3'] = Array();
this.petFields['pic3']['index'] = 36;
this.petFields['pic3']['name'] = 'Picture';
this.petFields['pictmn3'] = Array();
this.petFields['pictmn3']['index'] = 37;
this.petFields['pictmn3']['name'] = 'Thumbnail';
this.petFields['pic4'] = Array();
this.petFields['pic4']['index'] = 38;
this.petFields['pic4']['name'] = 'Picture';
this.petFields['pictmn4'] = Array();
this.petFields['pictmn4']['index'] = 39;
this.petFields['pictmn4']['name'] = 'Thumbnail';
this.petFields['video1'] = Array();
this.petFields['video1']['index'] = 40;
this.petFields['video1']['name'] = 'Video';
this.petFields['contactName'] = Array();
this.petFields['contactName']['index'] = 41;
this.petFields['contactName']['name'] = 'Contact Name';
this.petFields['contactEmail'] = Array();
this.petFields['contactEmail']['index'] = 42;
this.petFields['contactEmail']['name'] = 'Contact Email';
this.petFields['contactCellPhone'] = Array();
this.petFields['contactCellPhone']['index'] = 43;
this.petFields['contactCellPhone']['name'] = 'Contact Cell Phone';
this.petFields['contactHomePhone'] = Array();
this.petFields['contactHomePhone']['index'] = 44;
this.petFields['contactHomePhone']['name'] = 'Contact Home Phone';
this.petFields['locationZipcode'] = Array();
this.petFields['locationZipcode']['index'] = 45;
this.petFields['locationZipcode']['name'] = 'Location Zipcode';
this.petFields['locationName'] = Array();
this.petFields['locationName']['index'] = 46;
this.petFields['locationName']['name'] = 'Location Name';
this.petFields['detailLink'] = Array();
this.petFields['detailLink']['index'] = 47;
this.petFields['detailLink']['name'] = 'Name';
this.petFields['created'] = Array();
this.petFields['created']['index'] = 48;
this.petFields['created']['name'] = 'Created';
this.mode = '';
this.pet = new Array();
this.listId = 'rgPetContainer';
this.detailId = 'rgPetDetails';
this.fields = 'name,breed,color,species,age,thumbnail';
this.orderby = this.petFields['name']['index'];
this.order = 'asc';
this.enableSearch = true;
this.smartBrowse = true;
this.sortbyField = 'name';
this.sortbyOrder = 'asc';
this.hideEmptyFields = false;
this.detailTemplate = 'template1';
this.detailWidth = '600';
this.detailHeight = '620';
this.picMaxWidth = '400';
this.pictmnMaxWidth = '100';
this.picSize = 'thumbnail';
this.paging = true;
this.perPage = 10;
this.perRow = 4;
this.rows = 4;
this.detailPage = 'popover';
this.buildPets = function() {
this.pet = [
['13641175','Adopted','2018-12-01 09:06:37','18-0006','Abel','','Dog','American Staffordshire Terrier / American Pit Bull Terrier (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Male','','Yes','','','','','Young','No','Yes','Large','Yes','Blue/Silver/Salt & Pepper','Short','','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Abel','2018-10-09 09:53:30'],
['5390708','Adopted','2014-08-23 13:02:19','13-0004','Admiral','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','Yes','Yes','','Yes','Adult','','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20170','Herndon','Admiral','2013-02-08 16:34:40'],
['4706926','Adopted','2012-12-20 23:27:30','12-0007','Alfred','','Dog','Staffordshire Bull Terrier / American Pit Bull Terrier (short coat)','Staffordshire Bull Terrier','American Pit Bull Terrier','Male','','Yes','','Yes','','Yes','Adult','No','Yes','Large','Yes','White with Black','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Alfred','2012-06-26 13:46:24'],
['7941050','Adopted','2015-03-25 09:25:44','14-0009','Amelia Earheart','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','','Yes','','No','Baby','No','No','Large','','Brindle','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Amelia Earheart','2014-11-20 10:53:47'],
['11037310','Adopted','2017-05-17 16:19:51','17-0002','Amore','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Female','Yes','','','','','No','Baby','No','No','Large','','White with Black','Short','Patches','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Amore','2017-01-31 10:04:58'],
['15233790','Adopted','2020-01-30 00:49:33','19-0008','Angel','','Dog','American Staffordshire Terrier / Mixed (short coat)','American Staffordshire Terrier','','Female','Yes','Yes','Yes','Yes','','Yes','Adult','','Yes','Medium','Yes','Black','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Angel','2019-12-26 10:36:09'],
['11694908','Adopted','2017-08-28 09:29:10','17-0012','Axel','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','','Yes','','No','Baby','No','No','Large','','Black with White','Short','Patches','No','No','','','','','','
','
','
','
','','','','','','','','','','','','Axel','2017-07-15 23:00:03'],
['11236100','Adopted','2017-05-17 16:16:58','17-0003','Bear','','Dog','American Pit Bull Terrier / Labrador Retriever / Mixed (medium coat)','American Pit Bull Terrier','Labrador Retriever','Male','Yes','','','','','No','Baby','','No','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Bear','2017-04-03 10:26:32'],
['16275911','Adopted','2021-07-13 21:38:09','20-0003','Biggie Bear','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','Yes','Yes','','No','Baby','No','Yes','Large','','Black with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Biggie Bear','2020-11-23 16:07:42'],
['14025148','Adopted','2019-04-22 19:35:59','19-0004','Booker T','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','Yes','','','Young','','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Booker T','2019-01-27 10:37:31'],
['4630045','Adopted','2012-11-07 12:14:05','12-0005','Boscoe','','Dog','American Pit Bull Terrier / Boxer / Mixed (short coat)','American Pit Bull Terrier','Boxer','Male','Yes','Yes','','','','Yes','Adult','No','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Boscoe','2012-06-03 17:14:50'],
['15381660','Adopted','2020-09-21 10:52:18','18-0008','Brownie','','Dog','American Pit Bull Terrier / American Bulldog (short coat)','American Pit Bull Terrier','American Bulldog','Male','','Yes','','Yes','','Yes','Adult','','Yes','Large','No','Red','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Brownie','2020-02-07 09:14:53'],
['7938511','Adopted','2018-01-27 12:52:45','14-0008','Bubba','','Dog','American Pit Bull Terrier / Pointer / Mixed (short coat)','American Pit Bull Terrier','Pointer','Male','Yes','','','','','Yes','Adult','No','Yes','Large','Yes','White with Brown or Chocolate','Short','Patches','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Bubba','2014-11-19 21:07:21'],
['9119260','Adopted','2016-08-27 19:40:31','15-0007','Buddy','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','Yes','','Yes','Adult','No','Yes','Large','Yes','Gray','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Buddy','2015-09-13 18:36:58'],
['12173602','Adopted','2018-07-08 20:41:54','17-0016','Buggy Boy','','Dog','American Staffordshire Terrier / Mixed (short coat)','American Staffordshire Terrier','','Male','Yes','Yes','No','Yes','','Yes','Young','No','Yes','Large','','Blue/Silver/Salt & Pepper','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Buggy Boy','2017-10-23 15:48:03'],
['4654452','Adopted','2012-11-07 12:13:31','12-0006','Buster','','Dog','American Bulldog / American Pit Bull Terrier / Mixed (short coat)','American Bulldog','American Pit Bull Terrier','Male','Yes','Yes','','Yes','','Yes','Young','No','Yes','Large','Yes','White with Red, Golden, Orange or Chestnut','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Buster','2012-06-11 14:36:20'],
['5182084','Adopted','2014-08-23 13:24:15','','Cali','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','Yes','','','Yes','Adult','','Yes','Medium','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Cali','2012-11-25 10:37:36'],
['5140001','Adopted','2013-04-15 17:14:25','12-0017','Calla Lily','','Dog','American Bulldog / Pit Bull Terrier / Mixed (short coat)','American Bulldog','Pit Bull Terrier','Female','Yes','Yes','','','','Yes','Young','','Yes','Large','Yes','White with Tan, Yellow or Fawn','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22193','Dale City','Calla Lily','2012-11-09 22:59:29'],
['6385555','Adopted','2014-08-23 13:04:11','13-0010','Cash','','Dog','Pit Bull Terrier / Boxer / Mixed (short coat)','Pit Bull Terrier','Boxer','Male','Yes','Yes','No','Yes','','Yes','Adult','','Yes','Large','Yes','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22202','Arlington','Cash','2013-12-06 20:31:39'],
['16275936','Adopted','2020-12-28 10:11:38','20-0007','Casper','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','Yes','Yes','','No','Baby','Yes','No','Large','Yes','White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Casper','2020-11-23 16:27:38'],
['12053746','Adopted','2018-01-22 15:30:22','17-0015','Charlie Brown','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','','Yes','','Yes','Baby','','Yes','Large','','Brown/Chocolate with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Charlie Brown','2017-09-24 14:49:49'],
['11694907','Adopted','2017-08-28 09:27:40','17-0011','Charlotte','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','Yes','','Yes','','No','Baby','No','No','Large','','Blue/Silver/Salt & Pepper','Short','Bicolor','No','No','','','','','','
','
','','','','','','','','','','','','','','Charlotte','2017-07-15 22:58:19'],
['12497288','Adopted','2018-07-13 14:15:15','18-0001','Chip','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','Yes','','Yes','Young','No','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Chip','2018-01-22 09:19:58'],
['8314920','Adopted','2015-06-09 17:48:58','15-0002','Chloe','','Dog','American Staffordshire Terrier / American Pit Bull Terrier (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Female','','Yes','','','','No','Baby','No','No','Large','','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Chloe','2015-03-05 19:25:38'],
['5454321','Adopted','2014-03-10 14:47:00','13-0005','Cupcake','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','Yes','Yes','Yes','','Yes','Adult','No','Yes','Large','','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Cupcake','2013-03-04 20:09:19'],
['5122891','Adopted','2013-11-11 22:24:27','12-0016','Daisy','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','','Yes','','Yes','Adult','','Yes','Large','Yes','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20136','Bristow','Daisy','2012-11-04 17:00:04'],
['16275937','Adopted','2020-12-28 10:09:42','20-0008','Daisy','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','','','','','No','Baby','No','No','Large','Yes','White with Gray or Silver','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Daisy','2020-11-23 16:30:25'],
['5793100','Adopted','2013-11-11 22:26:00','13-0007','Daytona','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Female','Yes','Yes','','','','','Young','No','Yes','Medium','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Daytona','2013-06-25 12:26:15'],
['5140022','Adopted','2013-03-13 17:56:52','12-0018','Dexter','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','No','','','','Young','','','Large','','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20170','Herndon','Dexter','2012-11-09 23:14:51'],
['6597828','Adopted','2014-08-23 13:17:16','14-0002','Dixon','','Dog','Pit Bull Terrier / Catahoula Leopard Dog / Mixed (short coat)','Pit Bull Terrier','Catahoula Leopard Dog','Male','Yes','Yes','Yes','Yes','','','Adult','','Yes','Medium','Yes','Merle','Short','Merle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Dixon','2014-02-01 18:36:01'],
['8389301','Adopted','2015-04-23 19:57:31','15-0004','Duchess','','Dog','American Pit Bull Terrier / American Staffordshire Terrier (short coat)','American Pit Bull Terrier','American Staffordshire Terrier','Female','','Yes','','','','','Baby','','','Large','','Black','Short','Patches','No','No','','','','','','
','
','','','','','','','','','','','','','','Duchess','2015-03-27 09:46:42'],
['8389300','Adopted','2015-04-23 19:55:28','15-0003','Duke','','Dog','American Pit Bull Terrier / American Staffordshire Terrier (short coat)','American Pit Bull Terrier','American Staffordshire Terrier','Male','','Yes','','','','','Baby','','','Large','','White with Black','Short','Patches','No','No','','','','','','
','
','','','','','','','','','','','','','','Duke','2015-03-27 09:45:15'],
['14025126','Adopted','2019-03-07 17:03:33','19-0002','Egypt','','Dog','Mastiff','Mastiff','','Female','','','','','','','Adult','','No','X-Large','','Fawn','','Patches','No','No','','','','','','','','','','','','','','','','','','','','','Egypt','2019-01-27 10:25:22'],
['5192885','Adopted','2013-03-13 17:54:13','12-0019','Emmy','','Dog','Pit Bull Terrier / Mixed (short coat)','Pit Bull Terrier','','Female','Yes','Yes','','','','Yes','Adult','','Yes','Large','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','','','','','','','','','','','','22310','Alexandria','Emmy','2012-11-28 22:42:03'],
['7989936','Adopted','2015-05-10 19:54:02','14-0010','Frankie Boy','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','Yes','','','','Adult','No','No','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Frankie Boy','2014-12-06 20:47:41'],
['14715952','Adopted','2019-10-02 16:01:27','19-0006','Gigi','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','No','Yes','Yes','Yes','','Yes','Baby','No','Yes','Large','Yes','Fawn','Short','Brindle','No','No','','','','','','
','
','
','
','','','','','','','','','','','','Gigi','2019-08-12 10:02:39'],
['9764400','Adopted','2016-05-07 16:19:46','16-0002','Giselle','','Dog','Pit Bull Terrier / Mixed (short coat)','Pit Bull Terrier','','Female','Yes','Yes','No','Yes','','No','Adult','No','Yes','Medium','Yes','Fawn','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20170','Herndon','Giselle','2016-03-12 18:03:00'],
['16275933','Adopted','2020-12-28 10:20:27','20-0006','Gunner','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','','','','','No','Baby','No','','Large','Yes','Blue/Silver/Salt & Pepper','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Gunner','2020-11-23 16:24:52'],
['15785300','Adopted','2021-10-14 10:30:03','20-0001','Gus (Gus Gus)','','Dog','American Bulldog (short coat)','American Bulldog','','Male','','Yes','','Yes','','','Adult','No','Yes','Large','Yes','White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Gus (Gus Gus)','2020-06-27 08:30:59'],
['6688269','Adopted','2014-05-18 20:23:02','14-0003','Hershey','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Male','Yes','Yes','','Yes','','Yes','Young','','','Medium','Yes','Brown/Chocolate with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22408','Fredericksburg','Hershey','2014-02-26 16:36:51'],
['11236279','Adopted','2017-05-17 16:08:58','17-0005','Jack','','Dog','American Pit Bull Terrier / Labrador Retriever / Mixed (medium coat)','American Pit Bull Terrier','Labrador Retriever','Male','Yes','','','','','No','Baby','','No','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Jack','2017-04-03 10:57:07'],
['4993829','Adopted','2014-08-23 13:09:30','12-0012','Junior','','Dog','Pit Bull Terrier / Mixed (short coat)','Pit Bull Terrier','','Male','Yes','Yes','No','Yes','','Yes','Young','No','Yes','Medium','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22310','Alexandria','Junior','2012-09-23 19:33:55'],
['16275916','Adopted','2020-12-28 10:18:31','20-0004','Junior (Brownie)','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','','','','','No','Baby','No','No','Large','','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Junior (Brownie)','2020-11-23 16:11:49'],
['16275942','Adopted','2020-12-28 10:08:53','20-0009','King','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','','','','','No','Baby','No','No','Large','','White with Tan, Yellow or Fawn','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','King','2020-11-23 16:33:04'],
['11236289','Adopted','2017-05-17 16:01:54','17-0006','Lady','','Dog','American Pit Bull Terrier / Labrador Retriever / Mixed (medium coat)','American Pit Bull Terrier','Labrador Retriever','Female','Yes','','','','','No','Baby','','No','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Lady','2017-04-03 11:00:50'],
['13411662','Adopted','2018-10-09 10:10:46','18-0003','Lexie','','Dog','American Staffordshire Terrier / American Pit Bull Terrier','American Staffordshire Terrier','American Pit Bull Terrier','Female','','','','Yes','','No','Baby','No','Yes','Large','Yes','Blue/Silver/Salt & Pepper','','Brindle','No','No','','','','','','
','
','
','
','','','','','','','','','','','','Lexie','2018-08-12 17:07:52'],
['4994844','Adopted','2013-01-21 10:19:23','12-0014','Lionel','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','Yes','Yes','','','Young','No','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Lionel','2012-09-24 12:11:44'],
['11694906','Adopted','2017-08-28 09:29:36','17-0010','Lola','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','Yes','','Yes','','No','Baby','No','No','Large','','Blue/Silver/Salt & Pepper','Short','Brindle','No','No','','','','','','
','
','','','','','','','','','','','','','','Lola','2017-07-15 22:57:09'],
['6533397','Adopted','2016-03-07 18:43:42','14-0001','Lucy (formerly Sienna)','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','No','Yes','','Yes','Adult','No','Yes','Medium','Yes','Red/Golden/Orange/Chestnut with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Lucy (formerly Sienna)','2014-01-15 21:54:12'],
['13564409','Adopted','2018-10-24 11:02:53','18-0004','Mama Rose','','Dog','American Pit Bull Terrier / American Staffordshire Terrier (short coat)','American Pit Bull Terrier','American Staffordshire Terrier','Female','','Yes','','Yes','','Yes','Adult','No','Yes','Large','Yes','Red/Golden/Orange/Chestnut with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Mama Rose','2018-09-18 11:53:07'],
['9793541','Adopted','2016-10-08 22:38:07','16-0003','Meg','','Dog','American Staffordshire Terrier / American Pit Bull Terrier / Mixed (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Female','Yes','No','No','Yes','','Yes','Adult','No','Yes','Medium','','White','Short','Patches','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Meg','2016-03-20 22:05:24'],
['6764380','Adopted','2014-08-23 13:01:00','14-0005','Mia','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','','Yes','','','Adult','','','Medium','Yes','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Mia','2014-03-21 17:46:30'],
['4850855','Adopted','2014-08-23 13:15:36','12-0009','Mickey','','Dog','American Pit Bull Terrier / American Bulldog / Mixed (short coat)','American Pit Bull Terrier','American Bulldog','Male','Yes','Yes','No','Yes','','Yes','Adult','No','Yes','Large','Yes','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Mickey','2012-08-09 16:58:40'],
['6790647','Adopted','2014-08-23 12:58:41','14-0006','Milo','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','','','Yes','Young','No','','Medium','Yes','Brown/Chocolate with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20136','Bristow','Milo','2014-03-31 21:56:04'],
['4582072','Adopted','2013-05-07 12:52:30','12-0004','Minka','','Dog','American Staffordshire Terrier / American Pit Bull Terrier / Mixed (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Male','Yes','Yes','','Yes','No','Yes','Adult','No','Yes','Medium','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22310','Alexandria','Minka','2012-05-18 18:11:14'],
['16275901','Adopted','2020-12-28 10:10:42','20-0002','Mollie','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','Yes','','','','','Young','','No','Large','Yes','White with Black','Short','Patches','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Mollie','2020-11-23 16:01:35'],
['11236293','Adopted','2017-05-17 15:56:30','17-0007','Molly','','Dog','American Pit Bull Terrier / Labrador Retriever / Mixed (medium coat)','American Pit Bull Terrier','Labrador Retriever','Female','Yes','','','','','No','Baby','','No','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Molly','2017-04-03 11:02:12'],
['6456050','Adopted','2014-03-18 20:42:23','13-0012','Monkey','','Dog','Terrier / Mixed (short coat)','Terrier','','Female','Yes','Yes','','Yes','','Yes','Young','','Yes','Small','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20136','Bristow','Monkey','2013-12-23 21:25:30'],
['16275925','Adopted','2020-12-28 10:07:48','20-0005','Moose','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','','','','','No','Baby','No','No','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Moose','2020-11-23 16:21:19'],
['4582098','Adopted','2012-11-07 12:17:36','12-0003','Moosh','','Dog','American Pit Bull Terrier / Cane Corso Mastiff / Mixed (short coat)','American Pit Bull Terrier','Cane Corso Mastiff','Male','Yes','Yes','No','Yes','','Yes','Young','','Yes','X-Large','Yes','Red/Golden/Orange/Chestnut with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Moosh','2012-05-18 18:26:46'],
['5291176','Adopted','2013-03-13 17:58:00','13-0001','Morris','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','','','','Young','No','Yes','Large','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Morris','2013-01-05 19:38:09'],
['11694909','Adopted','2017-08-28 09:28:40','17-0013','Nate','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','','Yes','','No','Baby','No','No','Large','','Black with White','Short','Bicolor','No','No','','','','','','
','
','','','','','','','','','','','','','','Nate','2017-07-15 23:00:58'],
['8314900','Adopted','2015-08-17 20:33:16','15-0001','Nora','','Dog','American Staffordshire Terrier / American Pit Bull Terrier (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Female','','Yes','','','','No','Baby','No','Yes','Large','','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Nora','2015-03-05 18:53:17'],
['10246445','Adopted','2016-08-25 11:23:38','16-0004','Nugget','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','Yes','Yes','','No','Baby','No','No','Large','Yes','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Nugget','2016-07-07 08:23:58'],
['7640695','Adopted','2014-10-30 18:41:23','14-0007','Optimus Prime','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','','','','','Young','No','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Optimus Prime','2014-09-28 00:00:07'],
['11694879','Adopted','2017-08-28 09:30:23','17-0008','Otis','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Male','','Yes','','Yes','','No','Baby','No','No','Large','','Blue/Silver/Salt & Pepper','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Otis','2017-07-15 22:18:19'],
['5003386','Adopted','2013-03-13 18:00:21','12-0013','Pacino','','Dog','American Staffordshire Terrier / Mixed (short coat)','American Staffordshire Terrier','','Male','Yes','Yes','','Yes','','Yes','Adult','No','Yes','Medium','Yes','Tan/Yellow/Fawn with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20136','Bristow','Pacino','2012-09-26 21:13:02'],
['6371070','Adopted','2014-01-07 18:59:56','13-0009','Peanut','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','Yes','','','Young','','Yes','Medium','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20136','Bristow','Peanut','2013-12-02 16:51:51'],
['5338595','Adopted','2013-04-15 17:14:18','13-0003','Phoenix','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Female','','Yes','','Yes','','No','Adult','No','Yes','Medium','Yes','Fawn','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Phoenix','2013-01-19 19:03:42'],
['6701256','Adopted','2014-07-16 20:27:49','14-0004','Rhino','','Dog','American Staffordshire Terrier','American Staffordshire Terrier','','Male','','Yes','No','','','','Adult','No','Yes','Medium','Yes','Tan/Yellow/Fawn with White','','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Rhino','2014-03-02 15:55:49'],
['15233797','Adopted','2020-01-30 21:10:26','19-0009','Rocky','','Dog','American Staffordshire Terrier / American Pit Bull Terrier / Mixed (short coat)','American Staffordshire Terrier','American Pit Bull Terrier','Male','Yes','Yes','','Yes','','Yes','Young','No','Yes','Medium','Yes','Gray','Short','Bicolor','No','No','','','','','','
','
','
','
','','','','','','','','','','','','Rocky','2019-12-26 10:42:18'],
['6291479','Adopted','2014-08-23 13:12:31','13-0008','Romeo','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','','','Yes','Adult','','Yes','Large','Yes','Gray/Silver/Salt & Pepper with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20112','Manassas','Romeo','2013-11-11 21:23:15'],
['13591517','Adopted','2018-12-06 17:24:39','18-0005','Roxy','','Dog','American Pit Bull Terrier / American Staffordshire Terrier (short coat)','American Pit Bull Terrier','American Staffordshire Terrier','Female','','Yes','','Yes','','Yes','Senior','','Yes','Large','Yes','Tan/Yellow/Fawn with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Roxy','2018-09-25 14:33:01'],
['13985419','Adopted','2019-03-30 14:33:31','19-0001','Ruger','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','Yes','','Yes','Young','No','Yes','Large','Yes','Blue/Silver/Salt & Pepper','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Ruger','2019-01-15 10:39:30'],
['4814154','Adopted','2014-03-10 14:46:11','12-0008','Sasha','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Female','Yes','','','Yes','','Yes','Senior','No','Yes','Medium','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Sasha','2012-07-30 11:07:04'],
['4992490','Adopted','2012-11-07 12:13:57','12-0011','Sherman','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','No','Yes','','Yes','Young','No','Yes','Large','Yes','Blue/Silver/Salt & Pepper','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Sherman','2012-09-23 09:20:15'],
['11694885','Adopted','2017-08-28 09:29:55','17-0009','Stella','','Dog','American Staffordshire Terrier (short coat)','American Staffordshire Terrier','','Female','','Yes','','Yes','','No','Baby','No','No','Large','','Black with White','Short','Bicolor','No','No','','','','','','
','
','
','
','','','','','','','','','','','','Stella','2017-07-15 22:25:08'],
['6385560','Adopted','2014-03-10 14:45:09','13-0011','Tango','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','No','Yes','','','Young','','Yes','Medium','Yes','Brindle with White','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','22408','Fredericksburg','Tango','2013-12-06 20:35:38'],
['15144251','Adopted','2020-01-06 09:15:19','19-0007','Teddy','','Dog','American Pit Bull Terrier / American Bulldog / Mixed (short coat)','American Pit Bull Terrier','American Bulldog','Male','Yes','Yes','','Yes','','Yes','Adult','No','Yes','Large','Yes','Red','Short','Brindle','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Teddy','2019-12-03 09:14:32'],
['9086873','Adopted','2016-04-22 09:54:30','15-0005','Tessa','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Female','Yes','Yes','','','','No','Adult','No','Yes','Medium','Yes','Gray','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','20170','Herndon','Tessa','2015-09-04 19:03:54'],
['4582091','Adopted','2012-11-07 12:16:55','12-0002','Tink','','Dog','American Staffordshire Terrier / Staffordshire Bull Terrier / Mixed (short coat)','American Staffordshire Terrier','Staffordshire Bull Terrier','Female','Yes','Yes','','Yes','','Yes','Young','No','Yes','Medium','','Blue/Silver/Salt & Pepper','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Tink','2012-05-18 18:22:02'],
['11236106','Adopted','2017-05-17 15:45:28','17-0004','Todd','','Dog','American Pit Bull Terrier / Labrador Retriever / Mixed (medium coat)','American Pit Bull Terrier','Labrador Retriever','Male','Yes','','','','','No','Baby','','No','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Brindle','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Todd','2017-04-03 10:30:17'],
['5060340','Adopted','2013-11-11 22:25:14','12-0015','Tonka','','Dog','American Pit Bull Terrier (short coat)','American Pit Bull Terrier','','Male','','Yes','','','','','Young','','Yes','Medium','Yes','Gray/Silver/Salt & Pepper with White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Tonka','2012-10-15 18:18:49'],
['14025141','Adopted','2019-09-09 11:46:52','19-0003','Tucker','','Dog','American Staffordshire Terrier / American Bulldog / Mixed (short coat)','American Staffordshire Terrier','American Bulldog','Male','Yes','Yes','Yes','Yes','','Yes','Young','No','Yes','Large','Yes','White','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','
','
','','','','','','','','Tucker','2019-01-27 10:31:27'],
['11037325','Adopted','2017-05-17 16:21:31','17-0001','Valentino','','Dog','American Pit Bull Terrier / Mixed (short coat)','American Pit Bull Terrier','','Male','Yes','','','','','No','Baby','Yes','No','Large','','Brown/Chocolate','Short','Bicolor','No','No','','','','','','
','
','
','
','
','
','','','','','','','','','','Valentino','2017-01-31 10:13:52']
];
}
this.init = function() {
this.buildPets();
if (!this.sortbyField) {
this.sortbyField = 'lastUpdated';
this.sortbyOrder = 'desc';
}
if (cgiVar('toolkitAnimalID')) {
showDetails(this.name, null, cgiVar('toolkitAnimalID'));
}
this.fieldsArray = this.fields.split(',');
var orderby = readCookie('rgOrderby');
if (orderby && (this.mode == 'list')) {
if (this.sortbyField && this.sortbyOrder && orderby == this.petFields[this.sortbyField]['index']){
this.order = this.sortbyOrder;
}
this.sortPetArrayOnLoad(orderby);
} else {
if (this.sortbyField && this.sortbyOrder) {
this.order = this.sortbyOrder;
this.sortPetArrayOnLoad(this.petFields[this.sortbyField]['index']);
}
}
this.page = 1;
}
this.list = function(container) {
this.listId = container;
this.mode = 'list';
this.init();
this.writeList();
}
this.list2 = function(container) {
this.listId = container;
this.mode = 'list2';
this.init();
this.writeList2();
}
this.grid = function(container) {
this.listId = container;
this.mode = 'grid';
this.init();
this.writeGrid();
}
this.random = function(div, url) {
this.buildPets();
divObj = document.getElementById(div);
this.petsWithPic = new Array();
for (x = 0; x < this.pet.length; x++) {
if (this.pet[x][this.petFields['pictmn1']['index']]) {
this.petsWithPic.push(x);
}
}
if (this.petsWithPic.length == 0) return false;
var r=Math.floor(Math.random()*this.petsWithPic.length);
divObj.className = 'rgPetRandom';
divObj.innerHTML = '
Featured Adoptable Pet
'+this.pet[this.petsWithPic[r]][this.petFields['pictmn1']['index']] +
''+this.pet[this.petsWithPic[r]][this.petFields['name']['index']]+'
'+
''+this.pet[this.petsWithPic[r]][this.petFields['breed']['index']]+'
';
divObj.animalID = this.pet[this.petsWithPic[r]][this.petFields['animalID']['index']];
divObj.onclick = function(e) {
if (url.indexOf('?') == -1) url += '?';
location.href = url+'&toolkitAnimalID='+this.animalID;
}
}
this.featured = function(div, url, animalID) {
this.buildPets();
divObj = document.getElementById(div);
for (x = 0; x < this.pet.length; x++) {
if (this.pet[x][this.petFields['animalID']['index']] == animalID && this.pet[x][this.petFields['pictmn1']['index']]) {
var rowNumber = x;
break;
}
}
if (rowNumber === false) { alert('failed'); return false; }
divObj.className = 'rgPetRandom';
divObj.innerHTML = 'Featured Adoptable Pet
'+this.pet[rowNumber][this.petFields['pictmn1']['index']] +
''+this.pet[rowNumber][this.petFields['name']['index']]+'
'+
''+this.pet[rowNumber][this.petFields['breed']['index']]+'
';
divObj.animalID = animalID;
divObj.onclick = function(e) {
if (url.indexOf('?') == -1) url += '?';
location.href = url+'&toolkitAnimalID='+animalID;
}
}
this.detail = function() {
this.init();
this.animalID = cgiVar('toolkitAnimalID');
for (x=0; x';
if (this.paging) search += ' | ';
search += ' | ';
if (this.paging) search += ' | ';
if (this.paging) search += '
| ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.fieldsArray.length;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
} else if (this.paging) {
search += '';
if (this.paging) search += ' | '+
' | '+
' | ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.fieldsArray.length;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
}
var tr = document.createElement('tr');
tr.id = 'rgPetTableHeadFields'+this.name;
tr.className = 'rgPetTableHeadFields';
for (x=0; x' + this.petFields[this.fieldsArray[x]]['name'] + '';
tr.appendChild(td);
}
thead.appendChild(tr);
table.appendChild(thead);
var tbody = document.createElement('tbody');
var rowCounter=0;
this.displayablePets = 0;
var petsWrittenOut = 0;
if (this.page) {
start = (this.page-1)*this.perPage;
} else {
this.page = 1;
start = 0;
}
for (var y=0; y this.page * this.perPage) continue;
if (this.displayablePets <= start) continue;
petsWrittenOut += 1;
var tr = document.createElement('tr');
tr.rowNumber = y;
tr.id = this.name+y;
tr.rgPetsClassName = this.name;
tr.animalID = this.pet[y][this.petFields['animalID']['index']];
if (isEven(rowCounter)) {
tr.rowNumber = y;
tr.origClassName = 'rgPetTableRowEven';
tr.className = 'rgPetTableRowEven';
} else {
tr.origClassName = 'rgPetTableRowOdd';
tr.className = 'rgPetTableRowOdd';
}
rowCounter+=1;
if ('Yes' == 'Yes') {
tr.onclick = function(evt) { showDetails(this.rgPetsClassName, this.rowNumber); };
tr.onmouseover = function(evt) { this.className = 'rgPetTableRowOver'; };
tr.onmouseout = function(evt) { this.className = this.origClassName; };
} else {
tr.onmouseover = function(evt) { this.className = 'rgPetTableRowOverInactive'; };
tr.onmouseout = function(evt) { this.className = this.origClassName; };
}
//rgPets.pet[this.rowNumber][rgPets.petFields['animalID']['index']], rgPets.detailId); };
for (x=0; x this.petFields[this.fieldsArray[x]]['listLength']) {
fieldValue = fieldValue.substring(0, this.petFields[this.fieldsArray[x]]['listLength']);
}
}
var val = '';
val += fieldValue + '
';
if (val) {
td.innerHTML = val;
}
tr.appendChild(td);
}
tbody.appendChild(tr);
}
if (rowCounter == 0) {
var tr = document.createElement('tr');
var td = document.createElement('td');
td.colSpan = this.fieldsArray.length;
td.className = 'rgPetTableRowZeroPets';
td.innerHTML = 'No pets found.';
tr.appendChild(td);
tbody.appendChild(tr);
}
table.appendChild(tbody);
petContainer.innerHTML = '';
petContainer.appendChild(table);
if (this.searchText) {
searchForm = eval('document.rgPetsSearchForm'+this.name);
searchForm.rgPetsSearchText.value = this.searchText;
}
this.pages = Math.ceil(this.displayablePets/this.perPage);
if (this.paging && this.displayablePets > rowCounter) {
obj = document.getElementById('nextButtons');
obj2 = document.getElementById('pageCount');
obj2.innerHTML = '(page '+this.page+' of '+this.pages+' )';
if (this.pages > this.page) {
obj.innerHTML = 'Next »';
} else {
obj.innerHTML = 'Next »';
}
obj = document.getElementById('prevButtons');
if (this.page > 1) {
obj.innerHTML = '« Previous';
} else {
obj.innerHTML = '« Previous';
}
}
}
this.writeList2 = function() {
var petContainer = document.getElementById(this.listId);
//alert(this.listId);
var table = document.createElement('table');
table.cellSpacing = 0;
table.id = 'rgPetTable'+this.name;
table.className = 'rgPetTable list2';
var thead = document.createElement('thead');
if (this.enableSearch) {
var search = '';
search += '';
if (this.paging) search += ' | ';
search += ' | ';
if (this.paging) search += ' | ';
if (this.paging) search += '
| ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.fieldsArray.length;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
} else if (this.paging) {
var search = '';
search += '';
if (this.paging) search += ' | '+
' | '+
' | ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.fieldsArray.length;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
}
table.appendChild(thead);
var tbody = document.createElement('tbody');
var rowCounter=0;
this.displayablePets = 0;
var petsWrittenOut = 0;
if (this.page) {
start = (this.page-1)*this.perPage;
} else {
this.page = 1;
start = 0;
}
for (var y=0; y this.page * this.perPage) continue;
if (this.displayablePets <= start) continue;
petsWrittenOut += 1;
var tr = document.createElement('tr');
tr.rowNumber = y;
tr.id = this.name+y;
tr.rgPetsClassName = this.name;
tr.animalID = this.pet[y][this.petFields['animalID']['index']];
if (isEven(rowCounter)) {
tr.rowNumber = y;
tr.origClassName = 'rgPetTableRowEven';
tr.className = 'rgPetTableRowEven';
} else {
tr.origClassName = 'rgPetTableRowOdd';
tr.className = 'rgPetTableRowOdd';
}
rowCounter+=1;
tr.onclick = function(evt) { showDetails(this.rgPetsClassName, this.rowNumber); };
//rgPets.pet[this.rowNumber][rgPets.petFields['animalID']['index']], rgPets.detailId); };
tr.onmouseover = function(evt) { this.className = 'rgPetTableRowOver'; };
tr.onmouseout = function(evt) { this.className = this.origClassName; };
td = document.createElement('td');
var str = '';
if (this.picSize == 'thumbnail') {
if (this.pet[y][this.petFields['pictmn1']['index']] != '') {
str += ''+this.pet[y][this.petFields['pictmn1']['index']]+'
';
}
} else if (this.picSize == 'fullsize') {
if (this.pet[y][this.petFields['pic1']['index']] != '') {
//alert(this.pet[y][this.petFields['pic1']['index']]);
str += ''+this.pet[y][this.petFields['pic1']['index']]+'
';
}
}
for (x=0; x' +
'' + this.petFields[this.fieldsArray[x]]['name'] + ': ' +
'' + this.pet[y][this.petFields[this.fieldsArray[x]]['index']] + '' +
'';
} else {
str += '' +
'' + this.pet[y][this.petFields[this.fieldsArray[x]]['index']] + '' +
'
';
}
}
if (str) {
td.innerHTML = str;
}
tr.appendChild(td);
tbody.appendChild(tr);
}
table.appendChild(tbody);
petContainer.innerHTML = '';
petContainer.appendChild(table);
if (this.searchText) {
searchForm = eval('document.rgPetsSearchForm'+this.name);
searchForm.rgPetsSearchText.value = this.searchText;
}
this.pages = Math.ceil(this.displayablePets/this.perPage);
if (this.paging && this.displayablePets > rowCounter) {
obj = document.getElementById('nextButtons');
obj2 = document.getElementById('pageCount');
obj2.innerHTML = '(page '+this.page+' of '+this.pages+' )';
if (this.pages > this.page) {
obj.innerHTML = 'Next »';
} else {
obj.innerHTML = 'Next »';
}
obj = document.getElementById('prevButtons');
if (this.page > 1) {
obj.innerHTML = '« Previous';
} else {
obj.innerHTML = '« Previous';
}
}
}
this.writeGrid = function() {
if (!this.perRow) this.perRow = 4;
if (!this.rows) this.rows = 3;
this.perPage = (this.perRow * this.rows);
var petContainer = document.getElementById(this.listId);
//alert(this.listId);
var table = document.createElement('table');
table.cellSpacing = 0;
table.id = 'rgPetTable'+this.name;
table.className = 'rgPetTable grid';
var thead = document.createElement('thead');
if (this.enableSearch) {
var search = '';
search += '';
if (this.paging) search += ' | ';
search += ' | ';
if (this.paging) search += ' | ';
if (this.paging) search += '
| ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.perRow;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
} else if (this.paging) {
var search = '';
if (this.paging) search += ' | '+
' | '+
' | ';
search += '
';
var tr = document.createElement('tr');
tr.className = 'rgPetTableHeadSearch';
var td = document.createElement('td');
td.colSpan = this.perRow;
td.align = 'center';
td.id = 'rgPetTableHeadSearch'+this.name;
td.innerHTML = search;
tr.appendChild(td);
thead.appendChild(tr);
}
table.appendChild(thead);
var tbody = document.createElement('tbody');
var rowCounter=0;
this.displayablePets = 0;
var petsWrittenOut = 0;
if (this.page) {
start = (this.page-1)*this.perPage;
} else {
this.page = 1;
start = 0;
}
for (var y=0; y this.page * this.perPage) continue;
if (this.displayablePets <= start) continue;
petsWrittenOut += 1;
if ((petsWrittenOut-1) % this.perRow === 0) {
// We need to create a new row
var tr = document.createElement('tr');
tbody.appendChild(tr);
rowCounter+=1;
}
td = document.createElement('td');
td.className = "rgPetTableCell" + this.fieldsArray[x] + this.name;
td.style.verticalAlign = 'top';
td.animalID = this.pet[y][this.petFields['animalID']['index']];
td.animalNumber = y;
var val = '' +
'
';
if (this.picSize == 'thumbnail') {
val += '' +
this.pet[y][this.petFields['pictmn1']['index']] + ' | ';
} else if (this.picSize == 'fullsize') {
val += '' +
this.pet[y][this.petFields['pic1']['index']] + ' | ';
}
val += '
';
val += ''+this.pet[y][this.petFields['name']['index']] + '
' +
''+this.pet[y][this.petFields['breed']['index']] + '
';
td.innerHTML = val;
if ('Yes' == 'Yes') {
td.rgPetsClassName = this.name;
td.onclick = function(evt) { showDetails(this.rgPetsClassName, this.animalNumber, this.animalID); };
td.onmouseover = function(evt) { this.className = 'rgPetTableCellOver'; };
td.onmouseout = function(evt) { this.className = this.origClassName; };
} else {
td.onmouseover = function(evt) { this.className = 'rgPetTableCellOver'; };
td.onmouseout = function(evt) { this.className = this.origClassName; };
}
tr.appendChild(td);
if (y == this.pet.length-1 && (petsWrittenOut-1) % this.perRow !== 0) {
c = this.displayablePets;
while (c % this.perRow !== 0) {
td = document.createElement('td');
td.className = "rgPetTableCell" + this.fieldsArray[x] + this.name;
td.innerHTML = ' ';
tr.appendChild(td);
c+=1;
}
}
}
if (rowCounter == 0) {
var tr = document.createElement('tr');
var td = document.createElement('td');
td.colSpan = this.perRow;
td.className = 'rgPetTableRowZeroPets';
td.innerHTML = 'No pets found.';
tr.appendChild(td);
tbody.appendChild(tr);
}
table.appendChild(tbody);
petContainer.innerHTML = '';
petContainer.appendChild(table);
if (this.searchText) {
searchForm = eval('document.rgPetsSearchForm'+this.name);
searchForm.rgPetsSearchText.value = this.searchText;
}
this.pages = Math.ceil(this.displayablePets/this.perPage);
if (this.paging && this.displayablePets > rowCounter) {
obj = document.getElementById('nextButtons'+this.name);
obj2 = document.getElementById('pageCount'+this.name);
obj2.innerHTML = '(page '+this.page+' of '+this.pages+' )';
if (this.pages > this.page) {
obj.innerHTML = 'Next »';
} else {
obj.innerHTML = 'Next »';
}
obj = document.getElementById('prevButtons'+this.name);
if (this.page > 1) {
obj.innerHTML = '« Previous';
} else {
obj.innerHTML = '« Previous';
}
}
}
this.clearList = function() {
var petContainer = document.getElementById(this.listId);
petContainer.innerHTML = '';
}
this.clearSearch = function(form) {
form.rgPetsSearchText.value = '';
this.searchText = '';
this.clearList();
if (this.mode == 'list') {
this.writeList();
} else if (this.mode == 'list2') {
this.writeList2();
} else if (this.mode == 'grid') {
this.writeGrid();
}
return false;
}
this.setupSearch = function(form) {
this.searchText = form.rgPetsSearchText.value;
this.clearList();
if (this.mode == 'list') {
this.writeList();
} else if (this.mode == 'list2') {
this.writeList2();
} else if (this.mode == 'grid') {
this.writeGrid();
}
return false;
}
this.sortPetArray = function(fieldIndex) {
if (this.mode == 'list') {
if (this.orderby == fieldIndex) {
if (this.order == 'asc') {
this.order = 'desc';
} else {
this.order = 'asc';
}
} else this.order = 'asc';
}
this.pet.multiSort(fieldIndex);
this.orderby = fieldIndex;
if (this.order == 'desc') this.pet.reverse();
if (this.mode == 'list') {
createCookie('rgOrderby',fieldIndex,3);
}
}
this.sortPetArrayOnLoad = function(fieldIndex) {
this.pet.multiSort(fieldIndex);
this.orderby = fieldIndex;
if (this.order == 'desc') this.pet.reverse();
if (this.mode == 'list') {
createCookie('rgOrderby',fieldIndex,3);
}
}
this.sortby = function(fieldIndex) {
this.doSort(fieldIndex);
this.clearList();
this.writeList();
}
this.doSort = function(fieldIndex) {
this.sortPetArray(fieldIndex);
}
this.nextPet = function() {
if (this.currentDetailRow < this.pet.length-1) {
nextDetailRow = this.currentDetailRow+1;
nextDetailPet = this.pet[nextDetailRow][this.petFields['animalID']['index']];
} else {
nextDetailRow = 0;
nextDetailPet = this.pet[nextDetailRow][this.petFields['animalID']['index']];
}
document.getElementById('detailFrame').src = this.detailUrl(nextDetailPet);
this.currentDetailPet = nextDetailPet;
this.currentDetailRow = nextDetailRow;
}
this.prevPet = function() {
if (this.currentDetailRow > 0) {
nextDetailRow = this.currentDetailRow-1;
nextDetailPet = this.pet[nextDetailRow][this.petFields['animalID']['index']];
} else {
nextDetailRow = this.pet.length-1;
nextDetailPet = this.pet[nextDetailRow][this.petFields['animalID']['index']];
}
document.getElementById('detailFrame').src = this.detailUrl(nextDetailPet);
this.currentDetailPet = nextDetailPet;
this.currentDetailRow = nextDetailRow;
}
this.detailUrl = function(animalID) {
var tempURL = location.href.split('://');
if (tempURL['0'] == 'https') {
var url = 'https://toolkit.rescuegroups.org';
} else {
var url = 'https://toolkit.rescuegroups.org';
}
url += '/javascript/v2.0/'+this.detailTemplate+'?animalID='+animalID+'&key=ySLRhZih&referer=';
return url;
}
}
Array.prototype.multiSort = function(index){
// Written By: WillyDuitt@hotmail.com | 03-10-2005 \\;
for(var i=0; i=0; x=(x-1)){
var temp = this[i].splice(index,1);
this[i].unshift(temp);
}
}
return true;
}
function cgiVar(varName) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;iPrevious Next