
var xmlDoc;
var praises=new Array();

try{
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}catch(e){   
    xmlDoc=document.implementation.createDocument("", "C_Say", null);
}
xmlDoc.async=false;
xmlDoc.load("C_Say.xml");
var arrNodes=xmlDoc.getElementsByTagName("Table");
for(var i=0;i<arrNodes.length;i++)
{
    praises[i]=new Array(arrNodes[i].getElementsByTagName("Content")[0].childNodes[0].nodeValue,arrNodes[i].getElementsByTagName("UserName")[0].childNodes[0].nodeValue);
}
var currentPraiseIndex=1;
var spanPraise;
var spanCustomer;
var fadeTimer;
var currentColor=5;
function initCustomerPraise(){document.getElementById('cSay').innerHTML="<h4><a href='Feedback.aspx'>What our customers say:</a></h4><div>\" <span id='cSay_c'>"+praises[0][0]+"</span> \"<p id='cSay_n'>&#151; "+praises[0][1]+"</p></div>";spanPraise=document.getElementById("cSay_c");spanCustomer=document.getElementById("cSay_n")}function rotateCustomerPraise(){fadeTimer=setInterval("fadeOutCus()",50)}function fadeOutCus(){paintPraise();if(currentColor==15){clearInterval(fadeTimer);if(spanPraise!=null){spanPraise.innerHTML=praises[currentPraiseIndex][0]}if(spanCustomer!=null){spanCustomer.innerHTML="&#151; "+praises[currentPraiseIndex][1]}currentPraiseIndex=(currentPraiseIndex+1)%praises.length;fadeTimer=setInterval("fadeInCus()",50)}else{currentColor++}}function fadeInCus(){paintPraise();if(currentColor==5){clearInterval(fadeTimer)}else{currentColor--}}function paintPraise(){var a=getCurrentColorCode();if(spanPraise!=null){spanPraise.style.color=a}if(spanCustomer!=null){spanCustomer.style.color=a}}function doFade(){if(isFading){}else{if(currentColor==5){isFading=true;clearInterval(fadeTimer)}else{currentColor--}}}function getCurrentColorCode(){var a=""+currentColor;if(currentColor>9){a=String.fromCharCode(87+currentColor)}return"#"+a+a+a}setInterval("rotateCustomerPraise()",9000);
