// JavaScript Document
	var navBtn='', navImg='', navTitle='', navLinkBar='', btnStateClass='', imgStateClass='';
	var dnavBtn='', dnavImg='', dnavTitle='', dnavLinkBar='', dbtnStateClass='', dimgStateClass='';
	var arrowDown=new Image(), arrowRight=new Image();
	arrowDown.src='/images/research/books/arrowDown.gif';
	arrowRight.src='/images/research/books/arrowRight.gif';

	function tabClick(onTab, offTab, onTabs, offTabs){
		document.getElementById(onTab).style.visibility = 'visible';
		document.getElementById(offTab).style.visibility = 'hidden';
		document.getElementById(onTabs).style.visibility = 'visible';
		document.getElementById(offTabs).style.visibility = 'hidden';					
	}
	
	/* begin dl_slide */
	var current='', last='', expanded=false, motion='', lheight='', done=true;
	function showLinks(){	
		if (current!=last && done){
			done=false;
			i=0;
			n=lheight;
			document.getElementById(current+'_links').style.height=0;
			document.getElementById(current+'_links').style.display='block';
			motion = window.setTimeout('expand()', 18);
			document.getElementById(current+'_img').src = arrowDown.src;
			if (last!=''){document.getElementById(last+'_img').src = arrowRight.src;};
			//expanded=false;
			expanded=!expanded;
		}
	}
	
	function expand(){
		if (i==80){
			window.clearTimeout(motion);
			document.getElementById(current+'_links').style.height = lheight+'px';
			if (last!=''){document.getElementById(last+'_links').style.height=0;};
			i = 0;
			last=current;
			done=true;
		} else {
			i+=8;
			n-=8;
			document.getElementById(current+'_links').style.height=i;
			if (last!=''){document.getElementById(last+'_links').style.height=n;};
			motion = window.setTimeout('expand()', 18);
		}
	}	
	/* end dl_slide */	
	
/* begin nav functions */
	var init=true;
	function doNav(_navBtn, _navImg, _navTitle, _navLinkBar, _btnStateClass, _imgStateClass){
		navBtn=_navBtn;
		navImg=_navImg;
		navTitle=_navTitle;
		navLinkBar=_navLinkBar;
		btnStateClass=_btnStateClass;
		imgStateClass=_imgStateClass;
		
		var arrow=document.getElementById(navImg);
		var btn=document.getElementById(navBtn);
		var title=document.getElementById(navTitle);			
		arrow.src=arrowDown.src;
		btn.className=btnStateClass + ' p38';
		arrow.className='p34';
		title.className='p33';
		document.getElementById(navLinkBar).style.visibility='visible';
		if (init){
			dnavBtn=_navBtn;
			dnavImg=_navImg;
			dnavTitle=_navTitle;
			dnavLinkBar=_navLinkBar;
			dbtnStateClass=_btnStateClass;
			dimgStateClass=_imgStateClass;
			init=false;
		}
	}
	
	function dontNav(){
		var arrow=document.getElementById(navImg);
		var btn=document.getElementById(navBtn);
		var title=document.getElementById(navTitle);
		arrow.src=arrowRight.src;
		arrow.className='p35';
		btn.className=btnStateClass;
		title.className='p33 p36';
		document.getElementById(navLinkBar).style.visibility='hidden';
	}	

	function defaultNavSwitch(power){
		if (power=='on'){
			doNav(dnavBtn, dnavImg, dnavTitle, dnavLinkBar, dbtnStateClass, dimgStateClass);
		}else{
			var arrow=document.getElementById(dnavImg);
			var btn=document.getElementById(dnavBtn);
			var title=document.getElementById(dnavTitle);
			arrow.src=arrowRight.src;
			arrow.className='p35';
			btn.className=dbtnStateClass;
			title.className='p33 p36';
			document.getElementById(dnavLinkBar).style.visibility='hidden';
		}
	}

/* end nav functions */
/* begin drop-down function */
function redir(theForm){
	var anyString;
	var index;
	index=theForm.URL.selectedIndex;
	anyString=theForm.URL.options[index].value;
	
		if (anyString.substring(0,3) == "aol"){
			window.location=theForm.URL.options[index].value;
			theForm.URL.focus();
		}else {
		    if (anyString.substring(0,4) == "null") {
			alert('AOL Research & Learn:\n No Archive Selected. \n\n Please select an archive from the menu, then click \"Go.\"');
		    } else { 
			window.location=theForm.URL.options[index].value;
			}
		}
	return false;
/* end drop-down function */
}
	
	/* begin rate it function */

	var
		rateBtnHot1=new Image(),
		rateBtnHot2=new Image(),
		rateBtnHot3=new Image(),
		rateBtnHot4=new Image(),
		rateBtnHot5=new Image(),
		rateBtnHot6=new Image(),
		rateBtnCold1=new Image(),
		rateBtnCold2=new Image(),
		rateBtnCold3=new Image(),
		rateBtnCold4=new Image(),
		rateBtnCold5=new Image(),
		rateBtnCold6=new Image(),
		rateLast=1;
		
		rateBtnHot1.src='/images/research/books/books_1bttn_on.gif';
		rateBtnHot2.src='/images/research/books/books_2bttn_on.gif';		
		rateBtnHot3.src='/images/research/books/books_3bttn_on.gif';
		rateBtnHot4.src='/images/research/books/books_4bttn_on.gif';		
		rateBtnHot5.src='/images/research/books/books_5bttn_on.gif';
		rateBtnHot6.src='/images/research/books/books_6bttn_on.gif';
		rateBtnCold1.src='/images/research/books/books_1bttn_def.gif';
		rateBtnCold2.src='/images/research/books/books_2bttn_def.gif';		
		rateBtnCold3.src='/images/research/books/books_3bttn_def.gif';
		rateBtnCold4.src='/images/research/books/books_4bttn_def.gif';		
		rateBtnCold5.src='/images/research/books/books_5bttn_def.gif';
		rateBtnCold6.src='/images/research/books/books_6bttn_def.gif';

	function rateIt(id){
			if (rateLast!=id){
				if (isNaN(id)){
					if (id=='prev'){
						if (rateLast!=1){
							id=rateLast-1;
						}else{
							id=6;
							rateLast=1;
						}
					}else{
						if (rateLast!=6){
							id=rateLast+1;
						}else{
							id=1;
							rateLast=6;
						}
					}
				}
				var rateBtnNextSrc=eval('rateBtnHot'+id).src, rateBtnLastSrc=eval('rateBtnCold'+rateLast).src;
				document.getElementById('rateBtn'+id).src=rateBtnNextSrc;
				document.getElementById('rateBtn'+rateLast).src=rateBtnLastSrc;		
				document.getElementById('rateIt'+rateLast).style.visibility='hidden';
				document.getElementById('rateIt'+id).style.visibility='visible';				
			}
		rateLast=id;
	}
	/* end rate it function */

	/* begin header search */
	function aolSearch(){
		document.getElementById('rbAolSearch').checked = true;
		document.getElementById('dropdown').disabled=true;
		document.getElementById('bookSearch').action='http://aolsearch.aol.com/aol/search';
		document.getElementById('searchType').name='query';
		document.getElementById('bfmid').disabled=true;
		document.getElementById('sourceid').disabled=true;
		document.getElementById('categoryid').disabled=true;
	}
	
	function bnSearch(){
		document.getElementById('rbBnSearch').checked = true;
		document.getElementById('dropdown').disabled=false;
		var searchName = document.getElementById('searchType').name;
		document.getElementById('bookSearch').action='http://service.bfast.com/bfast/click';
		document.getElementById('searchType').name=document.getElementById('dropdown').value;
		document.getElementById('bfmid').disabled=false;
		document.getElementById('sourceid').disabled=false;
		document.getElementById('categoryid').disabled=false;
	}
	
	function bnSwitch(){
		if (document.getElementById('searchType').name!='query'){
			document.getElementById('searchType').name=document.getElementById('dropdown').value;
		}
	}
	/* end header search */
