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 = [ ['20417128','Available','2024-04-24 10:29:07','','Aaron','','Cat','Domestic Medium Hair (short coat)','Domestic Medium Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Orange and White','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Aaron','2024-04-24 10:29:04'], ['20192643','Available','2024-04-20 08:44:55','','Amber Lynn - FeLV+','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Orange','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Amber Lynn - FeLV+','2024-01-31 10:14:28'], ['20327904','Available','2024-04-04 19:09:50','','Angela','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','Yes','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Angela','2024-03-22 19:33:36'], ['20413450','Available','2024-04-22 19:14:18','','Annika','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Calico or Dilute Calico','Short','Calico','No','No','','','','','','','','','','','','','','','','','','','','','Annika','2024-04-22 19:14:15'], ['20375176','Available','2024-04-10 07:06:38','','Bea','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black','Short','Solid','No','No','','','','','','','','','','','','','','','','','','','','','Bea','2024-04-10 07:06:35'], ['20258517','Available','2024-04-15 18:28:50','','Bella','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Tortoiseshell','Short','Solid','No','No','','','','','','','','','','','','','','','','','','','','','Bella','2024-02-24 09:06:55'], ['20423534','Available','2024-04-26 16:53:53','','Blue Boi','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Gray','Short','Solid','No','No','','','','','','','','','','','','','','','','','','','','','Blue Boi','2024-04-26 16:53:52'], ['20049306','Available','2024-03-20 17:36:04','','Bunny','','Dog','Husky (medium coat)','Husky','','Female','','Yes','No','','','','Adult','No','Yes','Large','Yes','Black with White','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Bunny','2023-12-05 23:01:09'], ['20386133','Available','2024-04-12 06:44:51','','Bunny - FeLV+','','Cat','Siamese (short coat)','Siamese','','Male','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Cream','Short','Bicolor','No','No','','','','','','','','','','','','','','','','','','','','','Bunny - FeLV+','2024-04-12 06:44:49'], ['20402791','Available','2024-04-18 05:53:15','','Chamoomile','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','No','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Orange','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Chamoomile','2024-04-18 05:53:12'], ['20411485','Available','2024-04-24 05:57:12','','Chianti - FeLV','','Cat','Domestic Medium Hair (medium coat)','Domestic Medium Hair','','Female','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','','Medium','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Chianti - FeLV','2024-04-22 06:16:58'], ['20377573','Available','2024-04-10 17:26:43','','Choua','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Choua','2024-04-10 17:26:31'], ['20419402','Available','2024-04-24 22:26:07','','Danny','','Dog','Hound / Shepherd / Mixed (medium coat)','Hound','Shepherd','Male','Yes','Yes','','','','','Young','','Yes','Large','Yes','Black with Tan, Yellow or Fawn','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Danny','2024-04-24 22:26:06'], ['11215239','Available','2024-04-03 20:38:14','','Dexter','','Dog','Coonhound / Beagle / Mixed (short coat)','Coonhound','Beagle','Male','Yes','No','No','Yes','','Yes','Senior','No','Yes','Large','Yes','Tricolor (Tan/Brown & Black & White)','Short','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One of a Kind Pets Adoption Center','Dexter','2017-03-28 16:10:49'], ['20413431','Available','2024-04-22 18:59:07','','Dionysus & Iris - Bonded','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Orange','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Dionysus & Iris - Bonded','2024-04-22 18:58:58'], ['20357553','Available','2024-04-14 21:30:37','','Dukie','','Dog','Husky / Mixed (medium coat)','Husky','','Male','Yes','Yes','Yes','Yes','','Yes','Adult','No','Yes','Large','Yes','Black with White','Medium','Tabby','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Dukie','2024-04-05 15:33:21'], ['20413866','Available','2024-04-22 22:58:33','','Eloise','','Dog','Wheaten Terrier (medium coat)','Wheaten Terrier','','Female','','Yes','Yes','Yes','','No','Adult','','Yes','Medium','Yes','Tan','Medium','Tabby','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Eloise','2024-04-22 22:58:28'], ['20233260','Available','2024-03-21 20:15:04','','Felicity','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Felicity','2024-02-16 06:11:30'], ['20419295','Available','2024-04-24 21:18:08','','Foxy','','Dog','Boxer (short coat)','Boxer','','Female','','Yes','','Yes','','','Adult','No','Yes','Large','Yes','Fawn','Short','Tricolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Foxy','2024-04-24 21:18:04'], ['20423699','Available','2024-04-26 17:16:24','','George','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Spotted','No','No','','','','','','','','','','','','','','','','','','','','','George','2024-04-26 17:16:21'], ['20424140','Available','2024-04-26 18:56:12','','Honey','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','','Short','Spotted','No','No','','','','','','','','','','','','','','','','','','','','','Honey','2024-04-26 18:56:11'], ['20339671','Available','2024-04-14 21:27:30','','Irene','','Dog','Giant Schnauzer (medium coat)','Giant Schnauzer','','Female','','Yes','','','','','Adult','No','Yes','Large','Yes','Black','Medium','Spotted','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Irene','2024-03-27 21:01:54'], ['20417055','Available','2024-04-24 08:48:17','','Izzy','','Dog','Boxer (short coat)','Boxer','','Female','','Yes','','Yes','','','Adult','No','Yes','Large','Yes','Fawn','Short','Tricolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Izzy','2024-04-24 08:48:12'], ['20407888','Available','2024-04-20 07:45:40','','John & Sylvester - Bonded','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Young','No','Yes','Medium','Yes','Black','Short','Tricolor','No','No','','','','','','','','','','','','','','','','','','','','','John & Sylvester - Bonded','2024-04-20 07:45:26'], ['20418729','Available','2024-04-24 18:31:08','','July','','Dog','Pomeranian / Husky / Mixed (long coat)','Pomeranian','Husky','Female','Yes','Yes','','','','','Young','','Yes','Small','Yes','Tricolor (Tan/Brown & Black & White)','Long','Tricolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','July','2024-04-24 18:31:06'], ['20422102','Available','2024-04-26 06:41:29','','Ladybug','','Cat','Domestic Medium Hair (medium coat)','Domestic Medium Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Medium','Tuxedo','No','No','','','','','','','','','','','','','','','','','','','','','Ladybug','2024-04-26 06:41:28'], ['15314052','Available','2023-08-11 18:14:26','','Lila','','Dog','Terrier / Mixed (short coat)','Terrier','','Female','Yes','No','No','No','','','Adult','','Yes','Large','Yes','Tan/Yellow/Fawn with White','Short','Patches','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Lila','2020-01-18 14:45:47'], ['20403141','Available','2024-04-24 07:58:17','','Lucy','','Dog','Labrador Retriever / Mastiff / Mixed (short coat)','Labrador Retriever','Mastiff','Female','Yes','Yes','','','','','Adult','No','Yes','Large','Yes','Black with White','Short','Patches','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Lucy','2024-04-18 10:56:40'], ['20419068','Available','2024-04-24 20:11:48','','Maggie','','Dog','Bernese Mountain Dog / Poodle (Miniature) / Mixed (long coat)','Bernese Mountain Dog','Poodle (Miniature)','Female','Yes','Yes','Yes','Yes','','','Adult','','Yes','Medium','Yes','Gray/Silver/Salt & Pepper with White','Long','Patches','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Maggie','2024-04-24 20:11:24'], ['19935513','Available','2024-04-22 18:26:09','','Marge And In Charge','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Marge And In Charge','2023-10-30 06:26:57'], ['20417099','Available','2024-04-24 09:39:01','','Marley','','Dog','Husky (medium coat)','Husky','','Female','','Yes','No','Yes','','Yes','Young','No','Yes','Large','Yes','Black with White','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Marley','2024-04-24 09:38:38'], ['20405460','Available','2024-04-19 06:48:05','','Mary','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Mary','2024-04-19 06:47:59'], ['20222901','Available','2024-02-12 17:38:25','','Monique','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Monique','2024-02-12 17:38:24'], ['20416984','Available','2024-04-24 06:38:00','','Mouse','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Tuxedo','No','No','','','','','','','','','','','','','','','','','','','','','Mouse','2024-04-24 06:37:58'], ['20394565','Available','2024-04-26 06:34:31','','Nice','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','Yes','Yes','Senior','No','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Nice','2024-04-15 19:17:13'], ['20322257','Available','2024-04-24 08:58:49','','Nike','','Dog','Terrier / Mixed (short coat)','Terrier','','Female','Yes','Yes','Yes','Yes','','Yes','Adult','No','Yes','Large','Yes','Brindle with White','Short','Brindle','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Nike','2024-03-20 16:10:56'], ['20419313','Available','2024-04-24 21:43:50','','Ophelia','','Dog','Bichon Frise (medium coat)','Bichon Frise','','Female','','Yes','Yes','Yes','','','Adult','','Yes','Small','Yes','Tan','Medium','Brindle','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Ophelia','2024-04-24 21:43:46'], ['20151243','Available','2024-04-13 06:25:33','','Oriana','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Brown Tabby','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Oriana','2024-01-14 07:00:18'], ['20394483','Available','2024-04-15 18:57:36','','Pasha','','Cat','Domestic Long Hair (short coat)','Domestic Long Hair','','Male','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Orange and White','Short','Bicolor','No','No','','','','','','','','','','','','','','','','','','','','','Pasha','2024-04-15 18:57:33'], ['20417052','Available','2024-04-24 08:33:16','','Pavlova','','Dog','Bernese Mountain Dog / Poodle (Standard) / Mixed (long coat)','Bernese Mountain Dog','Poodle (Standard)','','Yes','Yes','','Yes','','','Adult','No','Yes','Large','Yes','Tricolor (Tan/Brown & Black & White)','Long','Tricolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Pavlova','2024-04-24 08:33:14'], ['20417138','Available','2024-04-24 10:38:51','','Pewter','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Gray','Short','Tabby','No','No','','','','','','','','','','','','','','','','','','','','','Pewter','2024-04-24 10:38:50'], ['20407893','Available','2024-04-20 08:21:39','','Pierre','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Tuxedo','No','No','','','','','','','','','','','','','','','','','','','','','Pierre','2024-04-20 08:21:36'], ['20275002','Available','2024-04-01 18:22:16','','Poppy','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','No','No','Yes','Adult','No','Yes','Medium','Yes','Tortoiseshell','Short','Tortie','No','No','','','','','','','','','','','','','','','','','','','','','Poppy','2024-03-01 16:22:54'], ['20416985','Available','2024-04-24 06:46:37','','Rainbow','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Bicolor','No','No','','','','','','','','','','','','','','','','','','','','','Rainbow','2024-04-24 06:46:36'], ['20417299','Available','2024-04-24 11:36:58','','Renee','','Dog','Cavalier King Charles Spaniel / Poodle (Miniature) / Mixed (medium coat)','Cavalier King Charles Spaniel','Poodle (Miniature)','Female','Yes','Yes','Yes','Yes','','No','Adult','','Yes','Small','Yes','Tan','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Renee','2024-04-24 11:36:56'], ['20418751','Available','2024-04-24 18:58:35','','Ripley','','Dog','Cavalier King Charles Spaniel / Poodle (Miniature) / Mixed (medium coat)','Cavalier King Charles Spaniel','Poodle (Miniature)','Female','Yes','Yes','Yes','Yes','','No','Adult','','Yes','Small','Yes','Tan','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Ripley','2024-04-24 18:58:33'], ['20419326','Available','2024-04-24 22:07:01','','Robyn','','Dog','Shiba Inu / Mixed (medium coat)','Shiba Inu','','Female','Yes','','','No','','','Adult','','Yes','Medium','Yes','Red/Golden/Orange/Chestnut with White','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Robyn','2024-04-24 22:06:43'], ['20375331','Available','2024-04-10 10:02:41','','Sally','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black','Short','Solid','No','No','','','','','','','','','','','','','','','','','','','','','Sally','2024-04-10 10:02:38'], ['20376446','Available','2024-04-10 16:19:25','','Sarabi','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Brown Tabby','Short','Solid','No','No','','','','','','','','','','','','','','','','','','','','','Sarabi','2024-04-10 16:03:47'], ['20208907','Available','2024-03-20 16:55:48','','Sheila','','Dog','Husky (medium coat)','Husky','','Female','','Yes','No','Yes','','','Young','','Yes','Large','Yes','Black with White','Medium','Bicolor','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Sheila','2024-02-07 13:03:52'], ['20388665','Available','2024-04-13 06:31:23','','Sibil','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Tortoiseshell','Short','Tortie','No','No','','','','','','','','','','','','','','','','','','','','','Sibil','2024-04-13 06:31:21'], ['20322311','Available','2024-03-20 16:55:16','','Sierra','','Dog','Husky (medium coat)','Husky','','Female','','Yes','No','Yes','','','Adult','No','Yes','Medium','','Black with White','Medium','Tortie','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Sierra','2024-03-20 16:54:59'], ['20193537','Available','2024-04-20 09:25:42','','Sissy 2','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','Yes','Yes','Medium','Yes','Orange and White','Short','Bicolor','No','No','','','','','','','','','','','','','','','','','','','','','Sissy 2','2024-02-01 05:53:43'], ['20424092','Available','2024-04-26 18:37:50','','Spock & Nigel - Bonded','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Male','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Tuxedo','No','No','','','','','','','','','','','','','','','','','','','','','Spock & Nigel - Bonded','2024-04-26 18:37:47'], ['19852380','Available','2024-02-12 13:53:16','','Sunkist','','Dog','Terrier / Mixed (short coat)','Terrier','','Female','Yes','Yes','','','','','Adult','No','Yes','Large','Yes','Gray/Silver/Salt & Pepper with White','Short','Patches','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Sunkist','2023-10-04 10:58:29'], ['20179012','Available','2024-03-25 06:40:06','','Valarie **Longest Resident Cat**','','Cat','Domestic Short Hair (short coat)','Domestic Short Hair','','Female','','','Yes','','No','Yes','Adult','No','Yes','Medium','Yes','Black and White','Short','Patches','No','No','','','','','','','','','','','','','','','','','','','','','Valarie **Longest Resident Cat**','2024-01-25 05:51:16'], ['20413814','Available','2024-04-24 21:20:19','','Walter','','Dog','Labrador Retriever / Mixed (medium coat)','Labrador Retriever','','Male','Yes','Yes','','','','','Adult','No','Yes','Large','Yes','Gray','Medium','Patches','No','No','','','','','','','','','','','','','','','','','','','44313','One Of A Kind Pet Rescue Spay & Neuter Clinic','Walter','2024-04-22 22:40:23'] ]; } 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 += ''; 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 += ''; } else if (this.picSize == 'fullsize') { val += ''; } val += '
' + this.pet[y][this.petFields['pictmn1']['index']] + '' + this.pet[y][this.petFields['pic1']['index']] + '
'; 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=QtdpHPFv&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