// JavaScript Document
//ids of the array
var ids=new Array('welcome','compspecials','hppromos');

function switchid(id){	
	hideallids();
	showdiv(id);
}
function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}
function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}
function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}


<!--
var time = 3000;
var numofitems = 12;
var menuYmin = 135;  //value was 145
var menuYmax = 235; //value was 220, then 228
//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = numofitems;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event){
  if ((event.clientY <menuYmin)||(event.clientY > menuYmax)){
    for (var i=1; i<= numofitems; i++){
      var shutdiv =eval('menuitem'+i+'.thediv');
      shutdiv.style.visibility='hidden';
    }
  }
}

	
	function showPrefooter1() {
		var fitDiv=document.getElementById('prefooter1');
		fitDiv.style.display='block';
		fitDiv.onclick=hidePrefooter1;
		var button=document.getElementById('prefooter1_button');  //set a variable for the button
		button.setAttribute('value', 'Hide Blogs & Offers');  //change the name of the button once opened
		button.onclick=hidePrefooter1; //clicked?  go to hidefitness function
		}
		
	function hidePrefooter1() {
		var fitDiv=document.getElementById('prefooter1');
		fitDiv.style.display='none';
		fitDiv.onclick=showPrefooter1;
		var button=document.getElementById('prefooter1_button');  //button variable
		button.setAttribute('value','Blogs & Offers');  //set what the button will display
		button.onclick=showPrefooter1;  //return to the showfitness function
		}		





//the follow shows/hides navbar selections; updated 7/12/09
	
	function showFitness() {
		var fitDiv=document.getElementById('sectionLinks3');
		fitDiv.style.display='block';
		fitDiv.onclick=hideFitness;
		var button=document.getElementById('Fitness');  //set a variable for the button
		button.setAttribute('value', 'Hide Health & Fitness');  //change the name of the button once opened
		button.onclick=hideFitness; //clicked?  go to hidefitness function
		}
		
	function hideFitness() {
		var fitDiv=document.getElementById('sectionLinks3');
		fitDiv.style.display='none';
		fitDiv.onclick=showFitness;
		var button=document.getElementById('Fitness');  //button variable
		button.setAttribute('value','Health & Fitness');  //set what the button will display
		button.onclick=showFitness;  //return to the showfitness function
		}		
	
//end fitness button script
	
	
	function merchList() {
		var mainDiv=document.getElementById('sectionLinks');
		mainDiv.style.display='block';
		mainDiv.onclick=hideMerchList;
		var banner=document.getElementById('side_banner');
		banner.style.display='none';
		var button=document.getElementById('merchlist');
		button.setAttribute('value', 'Hide Merchant');  //name of button once opened
		button.onclick=hideMerchList;
		}
	function hideMerchList() {
		var mainDiv=document.getElementById('sectionLinks');
		mainDiv.style.display='none';
		mainDiv.onclick=merchList;
		var banner=document.getElementById('side_banner'); //assign variable for side_banner and get ID from DOM
		banner.style.display='block';					   //set side_banner display to "block" - making it visible
		var button=document.getElementById('merchlist');
		button.setAttribute('value', 'Merchant Spotlight'); //name button Merchant Spotlight
		button.onclick=merchList;
		}
	function showSecuritySoft() {
		var softDiv=document.getElementById('sectionLinks2');
		softDiv.style.display='block';
		softDiv.onclick=hideSecuritySoft;
		
		var banner=document.getElementById('side_banner'); 		 //variable set for hide side_banner
		
		banner.style.display='none';						//set side_banner's display style to "none" to hide it.
		var button=document.getElementById('securitysoft');
		button.setAttribute('value', 'Collapse Section');
		button.onclick=hideSecuritySoft;
		}
	function hideSecuritySoft() {
		var softDiv=document.getElementById('sectionLinks2');
		softDiv.style.display='none';
		softDiv.onclick=showSecuritySoft;
		var banner=document.getElementById('side_banner'); //assign variable for side_banner and get ID from DOM
		banner.style.display='block';					   //set side_banner display to "block" - making it visible
		var button=document.getElementById('securitysoft');
		button.setAttribute('value','Security Software');
		button.onclick=showSecuritySoft;
		}	
	//function test() {
	  //  document.getElementById('sectionLinks').innerHTML='http://completepoint.com/allmerchants.php';
		//document.getElementById('sectionLinks').style.display='block';
	//	}
		
var wlink = new Array(16);
wlink[0]="http://clickserve.cc-dt.com/link/click?lid=41000000023450583&amp;pubid=21000000000107099";
wlink[1]="http://clickserve.cc-dt.com/link/click?lid=41000000023450626&amp;pubid=21000000000107099";
wlink[2]="http://clickserve.cc-dt.com/link/click?lid=41000000023431339 ";
wlink[3]="http://www.barnesandnoble.com/?afsrc=1&amp;lkid=J23450674&amp;pubid=K107099&amp;byo=1";
wlink[4]="http://clickserve.cc-dt.com/link/click?lid=41000000023431338 ";
wlink[5]="http://clickserve.cc-dt.com/link/click?lid=41000000023169858 ";
wlink[6]="http://clickserve.cc-dt.com/link/click?lid=41000000023169859 ";
wlink[7]="http://clickserve.cc-dt.com/link/click?lid=41000000023459815&amp;pubid=21000000000107099";
wlink[8]="http://clickserve.cc-dt.com/link/click?lid=41000000023431344 ";
wlink[9]="http://clickserve.cc-dt.com/link/click?lid=41000000023193944 ";
wlink[10]="http://clickserve.cc-dt.com/link/click?lid=41000000023299776 ";
wlink[11]="http://clickserve.cc-dt.com/link/click?lid=41000000023508530";
wlink[12]="http://clickserve.cc-dt.com/link/click?lid=41000000023495503 ";
wlink[13]="http://clickserve.cc-dt.com/link/click?lid=41000000023485970";
wlink[14]="http://clickserve.cc-dt.com/link/click?lid=41000000023485828";
wlink[15]="http://clickserve.cc-dt.com/link/click?lid=41000000023434994";

function welcome_links(n)
{	
var welcome_links=wlink[n];
var wlink_param = "width=800,height=600,status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes";
window.open (welcome_links, null, wlink_param);

}
// -->

