function preloader() {
     // counter
     var i = 0;

     // create object
     imageObj = new Image();

     // set image list
     images = new Array();
     images[0]="TabHomeOn.gif"
     images[1]="TabGetOrganizedOn.gif"
     images[2]="TabWinOn.gif"
     images[3]="TabBuyOn.gif"

     // start preloading
     for(i=0; i<=3; i++) {
          imageObj.src=images[i];
     }
} 

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
//alert("Hi");
  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];}
}

tips = new Array();

tips.push("Prioritize to save time. Make a list of everything you have to do and highlight the most important.");
tips.push("Save time during Book Club discussion by flagging sections to reference while you are reading.");
tips.push("Use a Post-it&reg; Flag as a bookmark to avoid dog-eared pages.");
tips.push("Save time by highlighting your notes to make key information stand out.");
tips.push("Organize your folders with color-coded flags for quick reference later.");
tips.push("Use Post-it&reg; notes to stick hard-to-remember facts to your mirror or around your room. Seeing them every day will make it easier to recall on test day.");
tips.push("Many students complain they don't have enough time to study. Make the most of what time you have by highlighting notes you'll want to review later.");
tips.push("The average student carries 15 credits. Post-it&reg; carries page markers in 15 bright colors. Coincidence?");
tips.push("Students who don't bring a bag to class typically show up with only a pen. Make it count with a 3-in-1 pen/highlighter/flag combo.");
tips.push("The average student carries 15 credits. Post-it&reg; carries page markers in 15 bright colors. Coincidence?");

function changeTip(){
        MM_preloadImages('http://drop2.3m.com/us/office/postit/students/Resources/Images/BrightIdeas.jpg');
    //now grab a random number between 1 and 27
    var randomNum;
    randomNum = Math.floor((Math.random() * tips.length));
    
    //display one of the 29 possible Bright Ideas headline graphics at top of page
    //document.getElementById("divTip").innerHTML = "<img src='http://drop2.3m.com/us/office/postit/students/Resources/Images/tip_" + randomNum + ".gif' class='MktAssetTop' alt='' width='584' height='50' border='0'/>";
    
	
    document.getElementById("divTip").innerHTML = "<div class='MktAssetTop'><img src='http://drop2.3m.com/us/office/postit/students/Resources/Images/BrightIdeas.jpg' alt='' border='0'/><div>\""+tips[randomNum]+"\"</div></div>";
	
    // now call this javascript every 15 seconds to replace the tip
    var newTip = window.setTimeout("changeTip()", 8000);
}



var storeLogos=[
	['http://drop2.3m.com/us/office/postit/students/Resources/images/CVS.jpg','http://www.cvs.com', 'CVS'],
	['http://drop2.3m.com/us/office/postit/students/Resources/images/kmart.jpg','http://www.kmart.com/', 'KMart'],
	['http://drop2.3m.com/us/office/postit/students/Resources/images/Rite_Aid.jpg','http://www.riteaid.com/', 'Rite Aid'],
	['http://drop2.3m.com/us/office/postit/students/Resources/images/Target.jpg','http://www.target.com', 'Target'],
	['http://drop2.3m.com/us/office/postit/students/Resources/images/Walgreens.jpg','http://www.walgreens.com/', 'Walgreens'],
	['http://drop2.3m.com/us/office/postit/students/Resources/images/Walmart.jpg','http://www.walmart.com/', 'Walmart'],
]
var len = 6;	//Quick and dirty ie6 fix.
var randomNum = 0;

function changeStore() 
{
	//Pick a new random number
	
	var logoLink = storeLogos[randomNum][0];
	var logoURL = storeLogos[randomNum][1];
	var altTxt = storeLogos[randomNum][2];
	var el = document.getElementById("LogoSwapArea");
	if(el != null)
	{
		el.innerHTML = '<center><a class="logoImg" href="'+logoURL+'"><img src="'+logoLink+'" alt="'+altTxt+'" /></a></center>';
	}
	window.setTimeout("changeStore()", 3000);
	
	randomNum++;
	if(randomNum >= len)	//	if(randomNum >= storeLogos.length)
	{
		randomNum = 0;
	}
}