
//MM Javascript Uncluttering

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Rotating quotes on every page script

function chooseAxiom() {

	//Revolving Images Portion
	//var imageBank = new Array()
	//imageBank[0] = "/images/wenstrup-home-1.jpg";
	//imageBank[1] = "/images/wenstrup-home-2.jpg";
	//imageBank[2] = "/images/wenstrup-home-3.jpg";
	//imageBank[3] = "/images/wenstrup-home-4.jpg";
	//imageBank[4] = "/images/wenstrup-home-5.jpg";
	//var j = 0
	//var n = imageBank.length;
	//var preBuffer = new Array()
	//for (i = 0; i < n; i++){
	//	preBuffer[i] = new Image()
	//	preBuffer[i].src = imageBank[i]
	
	//}

	//var whichImage = Math.round(Math.random()*(n-1));
	//document.getElementById('homePic').src = imageBank[whichImage];



	//Revolving Axiom Portion
	var textBank = new Array() 
	textBank[0] = '<p class=\"quote\">&quot;The important thing is not to stop questioning.&quot;</p><p class=\"testimonialSM\">- Albert Einstein</p>';
	textBank[1] = '<p class=\"quote\">&quot;The only limits on us are the ones we set on ourselves.&quot;</p><p class=\"testimonialSM\">- Manuel Carrasquillo</p>';
	textBank[2] = '<p class=\"quote\">&quot;Energy and pestilence alter all things.&quot;</p><p class=\"testimonialSM\">- Benjamin Franklin</p>';
	textBank[3] = '<p class=\"quote\">&quot;The greater the obstacle, the more glory in overcoming it.&quot;</p><p class=\"testimonialSM\">- Duane Hart</p>';
	textBank[4] = '<p class=\"quote\">&quot;Nothing succeeds like success.&quot;</p><p class=\"testimonialSM\">- Alexandre Dumas</p>';
	textBank[5] = '<p class=\"quote\">&quot;Nothing great was ever achieved without enthusiasm.&quot;</p><p class=\"testimonialSM\">- Ralph Waldo Emerson</p>';
	textBank[6] = '<p class=\"quote\">&quot;Opportunity is missed by most people because it is dressed in overalls and looks like work.&quot;</p><p class=\"testimonialSM\">- Thomas Edison</p>';
	textBank[7] = '<p class=\"quote\">&quot;The secret of success is constancy to purpose.&quot;</p><p class=\"testimonialSM\">- Benjamin Disraeli</p>';
	textBank[8] = '<p class=\"quote\">&quot;Common sense is genius dressed in working clothes.&quot;</p><p class=\"testimonialSM\">- Ralph Waldo Emerson</p>';
	textBank[9] = '<p class=\"quote\">&quot;Two heads are better than one.&quot;</p>';
	textBank[10] = '<p class=\"quote\">&quot;Knowledge speaks, but wisdom listens.&quot;</p><p class=\"testimonialSM\">- Jimi Hendrix</p>';
	textBank[11] = '<p class=\"quote\">&quot;It\'s what you learn after you know it all that counts.&quot;</p><p class=\"testimonialSM\">- Earl Weaver</p>';
	textBank[12] = '<p class=\"quote\">&quot;The greatest homage we can pay to truth, is to use it.&quot;</p><p class=\"testimonialSM\">- James Russell Lowell</p>';
	textBank[13] = '<p class=\"quote\">&quot;The truth is always the strongest argument.&quot;</p><p class=\"testimonialSM\">- Sophocles</p>';
	textBank[14] = '<p class=\"quote\">&quot;Well done is better than well said.&quot;</p><p class=\"testimonialSM\">- Benjamin Franklin</p>';




	var j = 0
	var p = textBank.length;
	var preBuffer = new Array()
	//for (i = 0; i < p; i++){
	//	preBuffer[i] = new Image()
	//	preBuffer[i].src = textBank[i]
	//
	//}

	var whichText = Math.round(Math.random()*(p-1));
	document.getElementById('axiombox').innerHTML = textBank[whichText];




	//window.location.href = document.getElementById('animationLink').href;


}


function chooseQuote() {

	//Revolving Quotes Portion
	var textBank = new Array() 
	textBank[0] = '<p align=\"center\" class=\"testimonial\">&quot;Our greatest glory is not in never failing, but in rising up every time we fail.&quot;<br><em class=\"testimonialSM\">- Ralph Waldo Emerson</em></p>';
	textBank[1] = '<p align=\"center\" class=\"testimonial\">&quot;With ordinary talent and extraordinary perseverance, all things are attainable.&quot;<br><em class=\"testimonialSM\">- Thomas Foxwell Buxton</em></p>';
	textBank[2] = '<p align=\"center\" class=\"testimonial\">&quot;Difficult things take a long time, impossible things a little longer.&quot;<br><em class=\"testimonialSM\">- Andr&eacute; A. Jackson</em></p>';
	textBank[3] = '<p align=\"center\" class=\"testimonial\">&quot;Innovation is the ability to see change as an opportunity - not a threat.&quot;<br><em class=\"testimonialSM\">- Albert Einstein</em></p>';
	textBank[4] = '<p align=\"center\" class=\"testimonial\">&quot;CREATIVITY is thinking up new things. INNOVATION is doing new things.&quot;<br><em class=\"testimonialSM\">- Theodore Levitt</em></p>';
	textBank[5] = '<p align=\"center\" class=\"testimonial\">&quot;Creativity is not the finding of a thing, but the making something out of it after it is found.&quot;<br><em class=\"testimonialSM\">- James Russell Lowell</em></p>';
	textBank[6] = '<p align=\"center\" class=\"testimonial\">&quot;The significant problems we face cannot be solved at the same level of thinking we were at when we created them.&quot;<br><em class=\"testimonialSM\">- Albert Einstein</em></p>';
	textBank[7] = '<p align=\"center\" class=\"testimonial\">&quot;Genius is one percent inspiration, and ninety-nine percent perspiration.&quot;<br><em class=\"testimonialSM\">- Thomas Edison</em></p>';
	textBank[8] = '<p align=\"center\" class=\"testimonial\">&quot;The significant problems we face cannot be solved at the same level of thinking we were at when we created them.&quot;<br><em class=\"testimonialSM\">- Albert Einstein</em></p>';
	textBank[9] = '<p align=\"center\" class=\"testimonial\">&quot;All else being equal, people like to do business with their friends. All else not being equal, people still like to do business with their friends.&quot;</em></p>';
	textBank[10] = '<p align=\"center\" class=\"testimonial\">&quot;When you have eliminated the impossible, whatever remains, however improbable, must be the truth.&quot;<br><em class=\"testimonialSM\">- Sir Arthur Conan Doyle</em></p>';
	textBank[11] = '<p align=\"center\" class=\"testimonial\">&quot;All the world is a laboratory to the inquiring mind.&quot;<br><em class=\"testimonialSM\">- Martin H. Fischer</em></p>';
	textBank[12] = '<p align=\"center\" class=\"testimonial\">&quot;Anyone who stops learning is old, whether at twenty or eighty.&quot;<br><em class=\"testimonialSM\">- Henry Ford</em></p>';
	textBank[13] = '<p align=\"center\" class=\"testimonial\">&quot;Example is not the main thing in influencing others. It is the only thing.&quot;<br><em class=\"testimonialSM\">- Albert Schweitzer</em></p>';
	textBank[14] = '<p align=\"center\" class=\"testimonial\">&quot;Leadership is based on a spiritual quality; the power to inspire, the power to inspire others to follow.&quot;<br><em class=\"testimonialSM\">- Vince Lombardi</em></p>';


	var j = 0
	var p = textBank.length;
	var preBuffer = new Array()
	//for (i = 0; i < p; i++){
	//	preBuffer[i] = new Image()
	//	preBuffer[i].src = textBank[i]
	//
	//}

	var whichText = Math.round(Math.random()*(p-1));
	document.getElementById('quotebox').innerHTML = textBank[whichText];




	//window.location.href = document.getElementById('animationLink').href;


}




//function lightWindow_DoneLoading(){
	//myLightWindow.activateWindow({href: '/flash/Wenstrup-splash.swf', title: '', width: 598, height: 400});
//}

function closeBox(){
	$('lightwindow_overlay').style.display = "none";
	$('lightwindow_container').style.display = "none";
}

function chooseRetirement() {


	//Revolving Images Portion
	var imageBank = new Array()
	imageBank[0] = "/images/retirement-rollover1.jpg";
	imageBank[1] = "/images/retirement-rollover2.jpg";
	imageBank[2] = "/images/retirement-rollover3.jpg";
	imageBank[3] = "/images/retirement-rollover4.jpg";
	var j = 0
	var n = imageBank.length;
	var preBuffer = new Array()
	for (i = 0; i < n; i++){
		preBuffer[i] = new Image()
		preBuffer[i].src = imageBank[i]
	
	}

	var whichImage = Math.round(Math.random()*(n-1));
	document.getElementById('retirementPic').src = imageBank[whichImage];
}
		

//GOOGLE ANALYTICS	
    	  var _gaq = _gaq || [];
    	  _gaq.push(['_setAccount', 'UA-23397790-1']);
    	  _gaq.push(['_trackPageview']);
    	
    	  (function() {
    	    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    	    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    	    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    	  })();
			

