var quoteLeft = document.createElement("img");
quoteLeft.src = "/webImages/brQuoteLeft.gif";
var quoteRight = document.createElement("img");
quoteRight.src = "/webImages/brQuoteRight.gif";
var fader = new Array();
var hash = new Array();
function throb(item) {
// If the hash array does not have an entry for this item, initialise it at 2
if (!hash[item]) hash[item] = 2;
// Send a fade command, using the hash array to tell us what parameters we should use
fader[item].fade(Math.floor(hash[item] / 2), !(hash[item] % 2));
// Call this function again for this same item after a certain amount of time
setTimeout(function() { throb(item); }, (hash[item] % 2) ? 700 : 5000);
// If we have exceeded the number of messages in this fader, start over again at 2
if (++hash[item] > fader[item].msg.length * 2 - 1) hash[item] = 2;
}
fader[2] = new fadeObject('fade2', 'ffffff', 'a6a6a6', 20, 20);
var begintag1 = '
';
var closetag1 = '
';
closetag1 += '
';
var begintag2 = ' - ';
var closetag2 = '
';
fader[2].msg[1] = begintag1 + "I would just like to say how impressed I am with the services that Tinies provide! I have always found them efficient, and professional in allocating the right staff for my needs" + closetag1 + begintag2 + "Tracey, Nursery Manager in Gloucestershire" + closetag2;
fader[2].msg[2] = begintag1 + "Tinies is by far the best. Weekly contact made all the difference" + closetag1 + begintag2 + "Annaliese in Bucks" + closetag2;
fader[2].msg[3] = begintag1 + "Tinies\' creche was all that I hoped it would be and more. I thought that Tinies was a cut above the rest. I would not hesitate in recommending them to anyone" + closetag1 + begintag2 + "Lucy in Poole" + closetag2;
fader[2].msg[4] = begintag1 + "You screen all candidates and have met them before you send them out to interview... This goes further than most agencies and is a terrific selling point of your service" + closetag1 + begintag2 + "Lauren, Essex" + closetag2;
fader[2].msg[5] = begintag1 + "Tinies provided me with an excellent service. I have used other agencies in the past that were unable to provide me with such a high standard of CVs in comparison" + closetag1 + begintag2 + "Margaret in Derby" + closetag2;
fader[2].msg[6] = begintag1 + "Tinies have been professional in their management of staffing to ensure the nursery is always supplied with suitable, qualified staff" + closetag1 + begintag2 + "Katie, Berkshire Shared Services" + closetag2;
fader[2].msg[7] = begintag1 + "I\'m an HR Manager, so have had a lot of experience of \'recruitment agencies\', the majority of which could learn a thing or two from you!" + closetag1 + begintag2 + "Michaella in Sutton Coldfield" + closetag2;
fader[2].msg[8] = begintag1 + "I spoke to other agencies but mainly dealt with Tinies as everyone told me it was the best one. I am really happy with our Nanny" + closetag1 + begintag2 + "Kate in Berks" + closetag2;
fader[2].msg[9] = begintag1 + "Tinies is fabulous and I look forward to working with you again" + closetag1 + begintag2 + "Polly, Wedding Co-ordinator in Central London" + closetag2;
fader[2].msg[10] = begintag1 + "Communication was excellent throughout - outstanding, and much better than other nanny agencies" + closetag1 + begintag2 + "Jo Rance in Redland" + closetag2;
fader[2].msg[11] = begintag1 + "I shall spread your fame and recommend \"Tinies\" to anybody in need of a nanny or a babysitter. Thank you" + closetag1 + begintag2 + "Marina in Hants" + closetag2;
fader[2].msg[12] = begintag1 + "After my interview I was extremely motivated and was placed in a brilliant creche position. Thank you so much" + closetag1 + begintag2 + "Elisha in Kent" + closetag2;
fader[2].msg[13] = begintag1 + "I have spread the word about your hard work to all the nannies/families who have ever discussed agencies with me" + closetag1 + begintag2 + "Dan in Central London" + closetag2;
function fadeObject(id, c1, c2, s1, s2) {
var self = this;
this.id = id;
this.elem = false;
this.colour = {
stt: [parseInt(c1.substr(0, 2), 16), parseInt(c1.substr(2, 2), 16), parseInt(c1.substr(4, 2), 16)],
end: [parseInt(c2.substr(0, 2), 16), parseInt(c2.substr(2, 2), 16), parseInt(c2.substr(4, 2), 16)],
now: [parseInt(c1.substr(0, 2), 16), parseInt(c1.substr(2, 2), 16), parseInt(c1.substr(4, 2), 16)]
};
this.steps = [s1, s2];
this.dir = false;
this.active = false;
this.queue = [];
this.msg = [];
this.message = 0;
function d2h(num) {
num = Math.round(num);
return ((num < 16) ? "0" : "") + num.toString(16);
}
this.fade = function(message, direction) {
this.elem = this.elem || document.getElementById(this.id);
this.queue.push([message, direction]);
for (var x = 0; x < this.queue.length; x++) {
for (var y = x + 1; y < this.queue.length; y++) {
if (this.queue[x][0] == this.queue[y][0] && this.queue[x][1] != this.queue[y][1]) {
this.queue.splice(x, 1);
this.queue.splice(y - 1, 1);
}
}
}
if (!this.active) setTimeout(function() { self.fadeLoop(); }, 10);
};
this.fadeLoop = function() {
if (!this.active && this.queue.length) {
if (this.dir && this.message != this.queue[0][0]) this.queue.unshift([this.message, false]);
var msg = this.queue.shift();
if (this.msg[msg[0]]) {
this.active = true;
this.elem.innerHTML = this.msg[this.message = msg[0]];
this.dir = msg[1];
}
}
if (this.dir) {
var c1 = this.colour.stt, c2 = this.colour.end, s = this.steps[0];
} else var c1 = this.colour.end, c2 = this.colour.stt, s = this.steps[1];
for (var x = 0, cnow = "", inc = 0; x < 3; x++) {
this.colour.now[x] += inc = (c2[x] - c1[x]) / s;
cnow += this.colour.now[x] = (inc < 0) ? Math.max(this.colour.now[x], c2[x]) : Math.min(this.colour.now[x], c2[x]);
} this.elem.style.color = "#" + d2h(this.colour.now[0]) + d2h(this.colour.now[1]) + d2h(this.colour.now[2]);
if (cnow == c2.join("")) {
this.active = false;
if (!this.queue.length) {
if (!this.dir) {
if (this.msg[0]) {
this.queue.push([0, true]);
setTimeout(function() { self.fadeLoop(); }, 10);
} else this.elem.innerHTML = " ";
}
} else setTimeout(function() { self.fadeLoop(); }, 10);
} else setTimeout(function() { self.fadeLoop(); }, 10);
};
if (window.addEventListener) {
window.addEventListener('load', function() { self.fade(0, true); }, false);
} else if (window.attachEvent)
window.attachEvent('onload', function() { self.fade(0, true); });
}
// Start this fader
setTimeout(function() { throb(2); }, 1000);