var base= "../index_images/"; 

if (document.images){ atkins_on = new Image(); 
	atkins_on.src = base + "Atkins.jpg"; 
	atkins_off = new Image(); 
	atkins_off.src = base + "AtkinsBW.jpg"; 
	text_on = new Image(); 
	text_on.src = base + "pure_transp.gif"; 
	text_off = new Image(); 
	text_off.src = base + "newsletter.gif"; 
} 


// else { 
// atkins_on = ""; 
// text_on = ""; 
//} var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1)); 

function imgOn(imgName, text) { 
	if (document.images) { 
		document[imgName].src = eval(imgName + "_on.src"); 
		document[text].src = eval("text_off.src"); 
		} 	
	} 

function imgOff(imgName, text) { 
	if (document.images) { 
		document[imgName].src = eval(imgName + "_off.src"); 
		document[text].src = eval("text_on.src"); 
		} 
	} 


// added Dec, 2002
// drop down box

function changepage()
    {
     location=document.jumpy.pagejump.options[document.jumpy.pagejump.selectedIndex].value
    }

// use this code at client side:

// <FORM name="jumpy">
// <SELECT name="pagejump" onChange="changepage()">
//     <OPTION value="#">Please choose a site
//     <OPTION value="http://www.yahoo.com">Yahoo
//     <OPTION value="http://www.hotmail.com">Hot Mail
//     <OPTION value="http://www.iname.com">Iname
// </select>
// </form>

var DHTML = (document.getElementById || document.all || document.layers);

function getdivlayer(name)	{
	  if (document.getElementById)	{    	// DOM level 1 browsers: IE 5+, NN 6+
	  	this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	  }
	  else if (document.all)	{  			// IE 4
		this.obj = document.all[name];
		this.style = document.all[name].style;
	  }
	  else if (document.layers)  { 			// NN 4
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	  }
}

// this function makes a news chunk visible
	function layerdisplay(visiblechunk) {
		if (!DHTML) return;
		
		var displayedlayer = new getdivlayer(visiblechunk);
		
		displayedlayer.style.display = 'block';
	}
	
// this function makes a layer chunk invisible	
	function layerhide(invisiblechunk) {
		if (!DHTML) return;
		
		var hiddenlayer = new getdivlayer(invisiblechunk);
		
		hiddenlayer.style.display = 'none';
	}

// This is the floating window

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
hasnotdisplayed=true;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog)
	{
  	if (!isN4) return;
  	N4=eval(whatDog);
  	N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  	N4.onmousedown=function(e)
	{
    		N4.captureEvents(Event.MOUSEMOVE);
    		N4x=e.x;
    		N4y=e.y;
  	}
  	N4.onmousemove=function(e)
	{
  		if (isHot)
		{
      		N4.moveBy(e.x-N4x,e.y-N4y);
      		return false;
    		}
  	}
  	N4.onmouseup=function()
	{
  		N4.releaseEvents(Event.MOUSEMOVE);
  	}
}


document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
	
// end floating window
