$(document).ready(function(){
	$('.filterThis li:even').addClass("altColor");
})

function runLastCheck() {
	$('.filterThis li').each(function(){
		$(this).removeClass("altColor");	
	})
	$('.filterThis li').removeClass("altColor");	
	$('.filterThis li:block:even').addClass("altColor");
	alert('duh');
}

function toggle(whatDiv) {
	var el = document.getElementById(whatDiv);
	var el2 = document.getElementById(whatDiv + "HandleText");
	
	if ( el.style.display != "block") {
		el.style.display = "block";
		el2.innerHTML = "&laquo; Less";
	} else { 
		el.style.display = "none";
		el2.innerHTML = "More &raquo;";
	}
}
function hideHelpText() {
    $("#helpText").slideUp();
    document.getElementById("helperText").value="hidden";
}
   function callCheck(whatEvent) {
          if (whatEvent!=13 && whatEvent != null) {
           var c = document.getElementById('indexInput');
           if (c.value.length > 2) {
            var pass = 'suggest.aspx?z='+c.value;
            ajaxpage(pass, 'SearchResults');
           }
          }
   }
function hideHelpText() {
    $("#helpText").slideUp();
    document.getElementById("helperText").value="hidden";
}


<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

var idxs = new Array();
var navs = new Array();

var idx_pages = new Array("a.htm", "artist.htm", "te_index.asp", "access.htm", "../intro/atr/11sm.htm", "../intro/atr/sro.htm", "../intro/atr/print.htm", "rulers.asp");

var nav_pages = new Array("a.htm", 
"b.htm", 
"c.htm", 
"d.htm", 
"e.htm", 
"f.htm", 
"g.htm", 
"h.htm", 
"i.htm", 
"j.htm", 
"k.htm", 
"l.htm", 
"m.htm", 
"n.htm", 
"o.htm", 
"p.htm", 
"q.htm", 
"r.htm", 
"s.htm", 
"t.htm", 
"u.htm", 
"v.htm", 
"w.htm", 
"x.htm", 
"y.htm", 
"z.htm");

// change from 1 up to 7 for the index page it is

function init() {
	for (var i=1;i<9;i++) {

		var idxID = 'idx_' + i;
		idxs[i] = document.getElementById(idxID);
		idxs[i].onmouseover = mouseGoesOverI;
		idxs[i].onmouseout = mouseGoesOutI;
		idxs[i].onclick = mouseGoesClickI;

		if(idxID == notidx) {
			idxs[i].className = 'idxon';
		} else {
			idxs[i].className = 'idxoff';
		}
	}
	
	for (var i=1;i<27;i++) {

		var navID = 'nav_' + i;
		navs[i] = document.getElementById(navID);
		navs[i].onmouseover = mouseGoesOverS;
		navs[i].onmouseout = mouseGoesOutS;
		navs[i].onclick = mouseGoesClickS;
		
		
		if(navID == notnav) {
			navs[i].className = 'alphaon';
		} else {
			navs[i].className = 'alphaoff';
		}		
	}	

	
}

function mouseGoesOverI() {
if(this.id != notidx) {
this.style.color = '#ffffff';
this.style.background = '#7791d7';
//this.style.cursor='hand';
}
}

function mouseGoesOutI() {
if(this.id != notidx) {
this.style.color = '#8a3d3d';
this.style.background = '#f4f4f2';
//this.style.cursor='default';
}
}

function mouseGoesClickI() {
if(this.id != notidx) {
var num = this.id.substring(this.id.indexOf('_')+1,this.id.length);
//alert(num+'foo');
//alert(this.className);
location.href=idx_pages[num-1];
}
}

function mouseGoesOverS() {
if(this.id != notnav) {
this.className = 'alphaon';
//this.style.color = '#ffffff';
//this.style.background = '#7791d7';
//this.style.cursor='hand';
}
}

function mouseGoesOutS() {
if(this.id != notnav) {
this.className = 'alphaoff';
//this.style.color = '#000000';
//this.style.background = '#f4f4f2';
//this.style.cursor='default';
}
}

function mouseGoesClickS() {
if(this.id != notnav) {
var num = this.id.substring(this.id.indexOf('_')+1,this.id.length);
//alert(num+'foo');
location.href=nav_pages[num-1];
}
}

function previewObject(accessNum) {
	ajaxpage('/toah/content/ho/preview/ho_'+accessNum+'.htm', 'previewDiv'+accessNum);
	document.getElementById('previewDiv'+accessNum).style.display = "block";
	//divName = 'previewDiv'+accessNum;
}

function showObjectPreview(accessNum) {
	var newURL = "/toah/content/ho/preview/ho_"+accessNum+".htm";
	$("#objectPreviewContent").load(newURL).dialog('open'); 
}

function hidePreviewObject(accessNum) {
	ajaxpage('/toah/content/blank.html', 'previewDiv'+accessNum);
	document.getElementById('previewDiv'+accessNum).style.display = "none";
}

function thematicIndexReveal(theID,content,whichOne) {
	var el = document.getElementById('thematicIndex'+theID+whichOne);
	var el2 = document.getElementById('thematicIndex'+theID+'Holder'+whichOne);
	//var elspacer = document.getElementById('sp'+content);
	var elArrow = document.getElementById('thematicArrow'+theID+whichOne);
	if (stallVariable == 0) {
		if (el.style.display == 'none' || el.style.display == '') {
			el.style.display='none';
			ajaxpage('/toah/content/te_ads/hd_'+content+'.html', 'thematicIndex'+theID+whichOne);
			elArrow.src = '/toah/art/close.png';
			$('#thematicIndex'+theID+whichOne).slideDown("fast");
			//el2.className='stayHighlight';
		} else {
			$('#thematicIndex'+theID+whichOne).slideUp("fast");
			//el2.className='indexHighlight';
			elArrow.src = '/toah/art/open.png';
		}
	}
}

function timelineIndexReveal(theID,content,whichOne) {
	var el = document.getElementById('thematicIndex'+theID+whichOne);
	var el2 = document.getElementById('thematicIndex'+theID+'Holder'+whichOne);
	//var elspacer = document.getElementById('sp'+content);
	var elArrow = document.getElementById('thematicArrow'+theID+whichOne);
	if (stallVariable == 0) {
		if (el.style.display == 'none' || el.style.display == '') {
			el.style.display='none';
			ajaxpage('/toah/content/timelines/ht_'+content+whichOne+'_inc.html', 'thematicIndex'+theID+whichOne);
			elArrow.src = '/toah/art/close.png';
			$('#thematicIndex'+theID+whichOne).slideDown("fast");
			//el2.className='stayHighlight';
		} else {
			$('#thematicIndex'+theID+whichOne).slideUp("fast");
			//el2.className='indexHighlight';
			elArrow.src = '/toah/art/open.png';
		}
	}
}

function highlightIndex(theNum,whichOne) {
	var el = document.getElementById('thematicIndex'+theNum+'Holder'+whichOne);
	if (el.className != 'stayHighlight') {
		//el.className='indexHighlight';
	}
}

function unhighlightIndex(theNum,whichOne) {
	var el = document.getElementById('thematicIndex'+theNum+'Holder'+whichOne);
	if (el.className != 'stayHighlight') {
		//el.className='thematicIndexInfo';
	}
}
var stallVariable = 0;
var c=0
var t

function unStallSwap() {
	stallVariable = 0;
}

function stallSwap() {
	stallVariable = 1;
	clearTimeout(t);
	t=setTimeout("unStallSwap()",1000);
}

/*
var divName = 'theBox2'; // div that is to follow the mouse
                       // (must be position:absolute)
var offX = 15;          // X offset from mouse position
var offY = -100;          // Y offset from mouse position

function mouseX(evt) {if (!evt) evt = window.event; if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft); else return 0;}
function mouseY(evt) {if (!evt) evt = window.event; if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return 0;}

function follow(evt) {if (document.getElementById) {var obj = document.getElementById(divName).style; obj.visibility = 'visible';
obj.left = (parseInt(mouseX(evt))+offX) + 'px';
obj.top = (parseInt(mouseY(evt))+offY) + 'px';}}
document.onmousemove = follow;
  */
  
//-->

