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 = [ ['19797253','Available','2023-12-21 18:02:16','','Braedon & Brighton - Rest In Peace','','Dog','Scottish Terrier Scottie','Scottish Terrier Scottie','','Male','No','Yes','','','','','Senior','No','Yes','Small','Yes','Tan','','','No','No','','','','','

Looking back
On the memory of
The dance we shared
'Neath the stars above
For a moment
All the world was right
But how could I have known
That you'd ever say goodbye
And now I'm glad I didn't know
The way it all would end
The way it all would go
Our lives are better left to chance
I could have missed the pain
But I'd have had to miss the dance...

With extreme sadness and heartbreak, we announce Braedon & Brighton have traveled to the Rainbow Bridge.  Brighton had a tumor on his spleen that burst and Braedon stopped responding to chemotherapy and was not eating for several days, despite our efforts with home-cooked meals.  These two boys are as bonded as two Scots can be, so it is only fitting that they take their final journey together.  They have been privately cremated, together, and their ashes have been returned to us to join the others we have lost before them.  Rest In Peace Boys.  It was a valiant fight that ended all too soon.

Braedon & Brighton are our social assistance dogs that help us with evaluating new dogs that come into rescue.  They are true blood brothers/littermates and are as bonded as any pair of dogs can be.  They were diagnosed with Lymphoma just 30 days apart.  Their very special demeanor assists us with dogs that have never been properly socialized, have aggression issues or otherwise are "problem" dogs.  Their special attitude has helped us with literally dozens of dogs over the years and is one of the main reasons we have never had to euthanize a dog for behavioral problems.

Sadly, at 13 years old, Braedon & Brighton have developed Lymphoma.  We are treating them with "light" chemotherapy to allow them pain-free days, as well as more time with us.  They currently have a good appetite and still enjoy their "work time" with new dogs that come to us. While we are devastated by this news, our priority is their comfort. Please consider assisting us with Braedon & Brighton's care:

Donations may be made via PayPal to email address:
Donate@scottiekingdom.com

All dogs adopted by Scottie Kingdom Rescue, Inc. have had a full medical exam by one of our licensed Veterinarians, which includes testing (and treatment, if necessary) for Heartworm disease, Lyme disease, Ehrlichia and Anaplasmosis, all necessary vaccinations, spay/neuter surgery, dental cleaning as necessary, microchipping, registration of the microchip, and any other medical needs each particular dog may need. Copies of all available medical records are transferred to you when the adoption is finalized.


We prefer to adopt to families with past Scottie, Westie, Terrier experience, but realize this isn’t always possible.   We do NOT ship our pets. If you have that special place in your heart, and in your home, for a Scottie (or any of our other available rescue dogs), please visit us in Dallas for an in person meet & greet session with our available dogs.   If you have existing dogs, they should travel to Dallas with you, so we can be assured that they will be compatible with the new addition to your family.

Please contact us at Rescue@scottiekingdom.com   to receive an Adoption Application or for more information on our Adoption process.  Also, please take the time to visit our website www.scottiekingdom.com for additional information.

We sometimes receive several applications on the same dog. Our goal is to place the dog in the best home possible, based on his/her needs, personality and past history. Please note:  Adoptions are not done on a first come, first served basis.  Submitting an application does not guarantee the adoption of any dog.   We are looking for the best available home for each of our rescue dogs.

Thank you for your understanding, and for considering adoption!


We are not supported by your tax dollars or public grants, rather, we rely on donations to help us continue our rescue work for animals that are in need.

Donations may be made via PayPal to email address:

Donate@scottiekingdom.com
or via USPS, to PO Box 551265 ~ Dallas, TX   75355



','','','','','','','','','','','','','','','','Braedon & Brighton - Rest In Peace','2023-09-18 20:28:47'], ['11219292','Available','2023-08-19 14:58:09','','Max - Medical Hold','','Dog','West Highland White Terrier Westie','West Highland White Terrier Westie','','Male','No','','','','','Yes','Adult','Yes','Yes','Small','Yes','White','','','No','No','','','','','

*Max is not available for out of area adoption.*

Medical costs to date: $2,069.46

Max is a handsome Westie boy, full of all the expected terrier energy and then some.  He is quite the velcro dog and wants to be at your feet while you're cooking a meal or watching television.  A kennel is not Max's favorite place.  He takes two daily medications to help with anxiety, which may or may not be necessary in his new home.  Max is approximately 11 years of age.  Max wants to be the only dog in the home. Because of his anxiety issues, it would be best for Max to have a home with a stay-at-home human that has lots of patience. Due to barking, Max is not available to apartment homes/condos.  Max likes to play fetch with a small ball and is easily entertained with squeaky toys, which should never be given to him without supervision.  Max likes to be nearby and underfoot constantly. This can be a tripping hazard if you are not aware of his whereabouts.

Max is not your typical Westie. His anxiety is real and would need to be dealt with in a positive way on a regular basis.  He was in a home for 9+ years and displayed this behavior the last 3 years, before being surrendered to us.

- - - - - - - - - - - - - - - -

All dogs adopted by Scottie Kingdom Rescue, Inc. have had a full medical exam by one of our licensed Veterinarians, which includes testing (and treatment, if necessary) for Heartworm disease, Lyme disease, Ehrlichia and Anaplasmosis, all necessary vaccinations, spay/neuter surgery, dental cleaning as necessary, microchipping, registration of the microchip, and any other medical needs each particular dog may need. Copies of all available medical records are transferred to you when the adoption is finalized.

We prefer to adopt to families with past Scottie, Westie, Terrier experience, but realize this isn’t always possible.   We do NOT ship our pets. If you have that special place in your heart, and in your home, for a Scottie (or any of our other available rescue dogs), please visit us in Dallas for an in person meet & greet session with our available dogs.   If you have existing dogs, they should travel to Dallas with you, so we can be assured that they will be compatible with the new addition to your family.

Please contact us at Rescue@scottiekingdom.com   to receive an Adoption Application or for more information on our Adoption process.  Also, please take the time to visit our website www.scottiekingdom.com for additional information.

We sometimes receive several applications on the same dog. Our goal is to place the dog in the best home possible, based on his/her needs, personality and past history. Please note:  Adoptions are not done on a first come, first served basis.  Submitting an application does not guarantee the adoption of any dog.   We are looking for the best available home for each of our rescue dogs.

Thank you for your understanding, and for considering adoption!


We are not supported by your tax dollars or public grants, rather, we rely on donations to help us continue our rescue work for animals that are in need.

Donations may be made via PayPal to email address:

Donate@scottiekingdom.com
or via USPS, to PO Box 551265 ~ Dallas, TX   75355



','','','','','','','','','','','','','','','','Max - Medical Hold','2017-03-29 20:34:22'], ['19796489','Available','2024-01-29 20:20:22','','Meadow - Pending!','','Dog','Scottish Terrier Scottie','Scottish Terrier Scottie','','Female','No','','No','','','','Young','No','Yes','Small','Yes','Tan','','','No','No','','','','','

Meadow is recovering from a 2nd surgery.  Although not as serious as the first, she will still take several weeks to fully recover.  Her activity level remains restricted.

Meadow came to us limping on her right rear leg.  To our surprise, she has Luxating Patellas in both of her rear legs.  Her surgery was successfully completed today, however, the estimated cost is in excess of $2,500.00.  This precious girl is not even 2 years old, and deserves every bit of the care she has received, no matter the cost.  Please find it in your heart to help with her medical costs. 

Donations may be made via PayPal to email address:
Donate@scottiekingdom.com

All dogs adopted by Scottie Kingdom Rescue, Inc. have had a full medical exam by one of our licensed Veterinarians, which includes testing (and treatment, if necessary) for Heartworm disease, Lyme disease, Ehrlichia and Anaplasmosis, all necessary vaccinations, spay/neuter surgery, dental cleaning as necessary, microchipping, registration of the microchip, and any other medical needs each particular dog may need. Copies of all available medical records are transferred to you when the adoption is finalized.

We prefer to adopt to families with past Scottie, Westie, Terrier experience, but realize this isn’t always possible.   We do NOT ship our pets. If you have that special place in your heart, and in your home, for a Scottie (or any of our other available rescue dogs), please visit us in Dallas for an in person meet & greet session with our available dogs.   If you have existing dogs, they should travel to Dallas with you, so we can be assured that they will be compatible with the new addition to your family.

Please contact us at Rescue@scottiekingdom.com   to receive an Adoption Application or for more information on our Adoption process.  Also, please take the time to visit our website www.scottiekingdom.com for additional information.

We sometimes receive several applications on the same dog. Our goal is to place the dog in the best home possible, based on his/her needs, personality and past history. Please note:  Adoptions are not done on a first come, first served basis.  Submitting an application does not guarantee the adoption of any dog.   We are looking for the best available home for each of our rescue dogs.

Thank you for your understanding, and for considering adoption!


We are not supported by your tax dollars or public grants, rather, we rely on donations to help us continue our rescue work for animals that are in need.

Donations may be made via PayPal to email address:

Donate@scottiekingdom.com
or via USPS, to PO Box 551265 ~ Dallas, TX   75355



','','','','','','','','','','','','','','','','Meadow - Pending!','2023-09-18 17:38:36'], ['16305428','Available','2022-07-11 16:13:50','','Phoebe - Medical Hold','','Dog','West Highland White Terrier Westie','West Highland White Terrier Westie','','Female','No','Yes','','','','','Senior','No','Yes','Small','Yes','White','','','No','No','','','','','

Medical costs to date: $887.43

Phoebe was originally adopted to a loving home in 2009.  Recently, her human mom passed away unexpectedly.  Thankfully, animal control did some research and contacted us to once again care for this little girl.  Phoebe is approximately 11yo and is in need of donations to help cover her medical expenses, so she can once again be a healthy little Westie girl.

Donations may be made via PayPal to email address:
Donate@scottiekingdom.com  

7-1-22: Little Ms. Phoebe is still with us and doing well.  She had an infected tooth that made her little face swell on one side, but antibiotics worked their magic and the problem went away.  Phoebe continues to take medication for Cushing's Disease, although we stopped the Vetoryl and changed her over to a more natural treatment.  She is now taking Melatonin and HMR Lignans twice a day, yet she continues to have wetting issues along with higher than normal water intake, but it's better than with her previous medication.  Her coat has remained very, very thin, so we don't expect it to ever grow back in.  She does go to the groomer every 6 weeks for a very quick once-over and is much favored by the staff!

6-1-21:  After several dosage adjustments and two Cushing's tests, we are currently giving Phoebe twice daily Vetoryl capsules to help with her diagnosed Cushing's disease.  While this has helped her, she still has accidents several hours after taking the Vetoryl.  We are planning another vet visit to discuss increasing the dosage.

12-4-20: Phoebe only had to spend one night in doggie jail before we rushed to get her out.  She is now at our Vet Hospital having tests and to begin treatment for Cushing's Disease.  Phoebe has 75% hair loss due to Cushing's Disease.

12-5-20: Phoebe is now in her foster home, receiving medications for Cushing's Disease, as well as dietary supplements to help with her hair loss.

 

All dogs adopted by Scottie Kingdom Rescue, Inc. have had a full medical exam by one of our licensed Veterinarians, which includes testing (and treatment, if necessary) for Heartworm disease, Lyme disease, Ehrlichia and Anaplasmosis, all necessary vaccinations, spay/neuter surgery, dental cleaning as necessary, microchipping, registration of the microchip, and any other medical needs each particular dog may need. Copies of all available medical records are transferred to you when the adoption is finalized.

We prefer to adopt to families with past Scottie, Westie, Terrier experience, but realize this isn’t always possible.   We do NOT ship our pets. If you have that special place in your heart, and in your home, for a Scottie (or any of our other available rescue dogs), please visit us in Dallas for an in person meet & greet session with our available dogs.   If you have existing dogs, they should travel to Dallas with you, so we can be assured that they will be compatible with the new addition to your family.

Please contact us at Rescue@scottiekingdom.com   to receive an Adoption Application or for more information on our Adoption process.  Also, please take the time to visit our website www.scottiekingdom.com for additional information.

We sometimes receive several applications on the same dog. Our goal is to place the dog in the best home possible, based on his/her needs, personality and past history. Please note:  Adoptions are not done on a first come, first served basis.  Submitting an application does not guarantee the adoption of any dog.   We are looking for the best available home for each of our rescue dogs.

Thank you for your understanding, and for considering adoption!


We are not supported by your tax dollars or public grants, rather, we rely on donations to help us continue our rescue work for animals that are in need.

Donations may be made via PayPal to email address:

Donate@scottiekingdom.com
or via USPS, to PO Box 551265 ~ Dallas, TX   75355



','','','','','','','','','','','','','','','','Phoebe - Medical Hold','2020-12-04 16:47:56'] ]; } 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=gatRuLqk&referer=http%3A%2F%2Ftoolkit.rescuegroups.org%2Fjavascript%2Fv2.0%2F%3Fkey%3DgatRuLqk'; 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