// Clears the guiding text out of any text box
function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

// Top Menu Image rollover:
function init() {
  if (!document.getElementById) return
  var imgOriginSrc;
  var imgTemp = new Array();
  var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
        imgTemp[i] = new Image();
        imgTemp[i].src = imgarr[i].getAttribute('hsrc');
        imgarr[i].onmouseover = function() {
            imgOriginSrc = this.getAttribute('src');
            this.setAttribute('src',this.getAttribute('hsrc'))
        }
        imgarr[i].onmouseout = function() {
            this.setAttribute('src',imgOriginSrc)
        }
    }
  }
}
onload=init;


//Tool Tip PopUps
/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2003 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// leave in page for way to customize layout of tooltip 
// and avoid errors if onmouseovers/outs before page completely loaded
function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.hide();
}
	
// preload images that will be displayed in tooltip  
// put images to preload in this array
var preload_list = new Array("grey_arrow.gif", "dnarrow.gif");
var path_to_images = "../images/";

if (document.images) {
	var image_list = new Array();
	for (var preload_counter=0; preload_counter<preload_list.length; preload_counter++) {
  	image_list[preload_counter] = new Image(); 
		image_list[preload_counter].src = path_to_images + preload_list[preload_counter];	
  }
}
  
// variables for tooltip content 
var tipDS = '<img src="images/grey_arrow.gif" width="15" height="12" alt="" border="0"><div class="tp2">Direct Selling is.... </div>';
var tipCL = '<div class="tp1">The Club Leader is the head of an individual Shopping Club. As such, you  earn <b>$2.50 in Rewards on each $10</b> your Members spend.</div>';
var tipMEM = '<div class="tp1">Each Popular Shopping Club includes Members (often relatives, friends or co-workers of the Club Leader) who purchase quality department store merchandise through the Club Leader. Through their Club Leader, <b>Members earn free merchandise on every purchase</b> they make.</div>';
var tipDIV = '<div class="tp1">Member Dividends represent the free shopping a Member earns every time he or she makes a purchase. The Member earns $2 in Member Dividends for every $10 spent.</div>';
var tipREW = '<div class="tp1">Rewards represent the free shopping that a Club Leader earns every time a Member makes a purchase from our catalog. For example, the Club Leader earns $2.50 in Rewards for every $10 the Member spends.</div>';

var tipImgTxt = '<img src="images/sm-duck.gif" width="90" height="44" alt="" border="0"><div class="tp2">Images and text can go together in a tooltip.</div>';

