var theDivs;

t=0;
theTestimonials = new Array();
theTestimonials[1] = '"The elements that really stand out from my interaction with FR@SNM are their outstanding customer service, clear understanding and anticipation of our company’s needs, and the value created by their involvement in our projects. It goes without say that these qualities are combined with innovative, appropriate technological solutions, and the accurate and timely execution of projects."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Isabelle Adjahi<br />Senior Dir, I.R. & Communications<br />Axcan Pharma</i></div>';
theTestimonials[2] = '"Their professionalism, knowledge of websites and ability to make helpful recommendations were a great asset to us when creating our website to meet the needs of our customers locally and globally."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Pierre Boucher<br />Executive Vice-President<br />Stiefel Canada Inc.</i></div>';
theTestimonials[3] = '"Francisca and her team were diligent about the project timelines often championing the initiative when the rest of us , internally were overwhelmed with other projects. Their turnkey approach, combined with their ability to forge solid working relationships with members of our IT staff, ensured that the process and tool were always seamless and reliable, respectively."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Enza Cignarella<br />Product Manager - Lipitor<br />Pfizer Canada Inc.</i></div>';
theTestimonials[4] = '"I would recommend without hesitation FR@SNM as a brilliant partner regarding any web strategies you may choose to implement. Their knowledge of the Pharma industry, their credibility combined with their professionalism and strategic input are values that make them a unique as a web development partner."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Sylvain Chretien<br />President and CEO<br />Pediapharm Inc.</i></div>';
theTestimonials[5] = '"I highly recommend FR@SNM to any company looking for a professional business partner to help maximize their internet presence with proven, cost effective solutions."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Dan Feltham<br />Senior Product Manager<br />Axcan Pharma US</i></div>';
theTestimonials[6] = '"I personally recommend FR@SNM as a business partner."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Ray Chepesiuk<br />PAAB Commissioner</i></div>';
theTestimonials[7] = '"With strict Federal Government regulations in Canada on how pharmaceutical manufacturers\' are advertised to the public, we rely on Francisca\'s expertise and strong work ethic to keep our sites in accordance with Health Canada. Francisca\'s expertise in web applications, design and hosting has been a valuable resource for Stiefel Canada."<div style="font-size:10px; text-align:right; padding-top:5px;"><i>Sherry O\'Connell<br />Promotional and Advertising Manager<br />Stiefel Canada</i></div>';

var _gaq = _gaq || [];

window.onload = function() {
    ga = document.createElement('script');
	ga.type = 'text/javascript';
	ga.async = true;
    ga.src = 'http://www.google-analytics.com/ga.js';
    document.body.appendChild(ga);

    callGoogle();

	t = Math.floor(Math.random() * 7 + 1);
    document.getElementById('testimonials').innerHTML = theTestimonials[t];
	document.getElementById('testimonials2').innerHTML = theTestimonials[t];
	setTimeout('newTest()', 10000);

	if(window.location.hash){
		thePage = window.location.hash.slice(1);
		thePage2 = thePage.charAt(0).toUpperCase() + thePage.slice(1);

		theDivs = document.getElementsByTagName('div');
		for(i=0;i<theDivs.length;i++){
			if(theDivs[i].id == ('content' + thePage2)){
				theDivs[i].parentNode.parentNode.className = 'content visible';
				showSelected('content' + thePage2);
				if(thePage != 'privacy'){
					document.getElementById('contentHome').parentNode.parentNode.className = 'content';
				}
			}else if(theDivs[i].className == thePage){
				document.getElementById('contentHome').parentNode.parentNode.className = 'content';
				theDivs[i].parentNode.className = 'content visible';
			}
		}

		theHeaders = document.getElementsByTagName('h2');
		for(h=0;h<theHeaders.length;h++){
			if(theHeaders[h].className != thePage){
				theHeaders[h].parentNode.onclick = function() {
		                                                for(i=0;i<theDivs.length;i++){
															if(theDivs[i].className == thePage){
																theDivs[i].parentNode.className = 'content';
															}else if(theDivs[i].id == ('content' + thePage2)){
																theDivs[i].parentNode.parentNode.className = 'content';
															}
														}
													}
			}
		}

	}
}

function callGoogle(){
	_gaq.push(['_setAccount', 'UA-23271687-7']);
	_gaq.push(['_trackPageview']);
}

function newTest() {
	if(t < 7){
		document.getElementById('testimonials').innerHTML = theTestimonials[t];
		document.getElementById('testimonials2').innerHTML = theTestimonials[t];
		t++;
		setTimeout('newTest()', 10000);
	}else{
		t=1;
		setTimeout('newTest()', 10000);
	}
}

function showSelected(showThis) {
	var x = document.getElementsByTagName('div');

	for(var i=0; i<x.length; i++){
		if(x[i].className == "hiddenPanel"){
			x[i].style.display = "none";
		}
	}

	document.getElementById(showThis).style.display = "block";
}
