
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

if (!Array.prototype.shuffle) {
    Array.prototype.shuffle = function() {
		var s = [];
		while (this.length) s.push(this.splice(Math.random() * this.length, 1)[0]);
		while (s.length) this.push(s.pop());
		return this;
	} 
}
//


sidebarTestimonials.shuffle();

var fileInx = 0;
function dispTestimonial () {
	document.getElementById("testimonials").innerHTML = sidebarTestimonials[fileInx];
	fileInx++;
	if (fileInx >= sidebarTestimonials.length) fileInx = 0;
}

window.onload = function () {
	dispTestimonial();	
	populateSidebarPromotionText()
	setInterval("dispTestimonial()", quoteDelay * 1000); //1000 - 1 second
}

function populateSidebarPromotionText () {
	document.getElementById("promoContent").innerHTML = getFile("content/promotion_sidebar.txt");
}
function populatePromoPage () {
	dispTestimonial();	
	populateSidebarPromotionText()
	setInterval("dispTestimonial()", quoteDelay * 1000); //1000 - 1 second
	document.getElementById("promoContent").innerHTML = getFile("content/promotion_sidebar.txt");document.getElementById("promoHeadline").innerHTML = getFile("content/promotion_headline.txt");
	document.getElementById("promoPageContent").innerHTML = getFile("content/promotion.txt");
}
function populatePricingPage () {
	populateSidebarPromotionText()
	document.getElementById("pricingContent").innerHTML = getFile("content/pricing.html");
}


function getFile(fileName){
    oxmlhttp = null;
    try{
        oxmlhttp = new XMLHttpRequest();
        oxmlhttp.overrideMimeType("text/xml");
    }
    catch(e){
        try{
            oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e){
            return null;
        }
    }
    if(!oxmlhttp) return null;
    try{
       oxmlhttp.open("GET",fileName,false);
       oxmlhttp.send(null);
    }
    catch(e){
       return null;
    }
    return oxmlhttp.responseText;
}

