$(document).ready(function(){
	// ### Initial Load of Random Heads ### //
	timeHeadsRandom();

	// ### Set up delays ### //
	var delaySpeed = 400; // 1000 = 1 SECOND
	var t0, t1, t3, t4, t5, t6, t7, t8, t9;
	jQuery.fn.delay = function(millis,callBack){ var object = $(this); $.extend(object,{callBack:callBack}); return window.setTimeout(function() { object.callBack(); return object; }, millis); }

	// ### Loop through top heads ### //
	$('#timeBarHeads').children('div').each(function(i){
		var tempInt = i+2;
		var formatInt = "";

		if (tempInt < 10) { formatInt = "0"+tempInt; } else { formatInt = tempInt; }
		if (tempInt < 7) { $(this).addClass('topHead'); } else { $(this).addClass('topHeadPlus'); }
		$(this).append("<div id=\"headText"+formatInt+"\"></div>");
		$(this).hover(
			function () {
				eval("t" + i + "=1;");
				showSubText(formatInt);
				changeTimeBar(formatInt,'_on');
				jQuery(this).parent().find("div").not(jQuery(this)).children('div').hide();
				$(this).delay(delaySpeed,function(){ if (eval('t'+i) == 1) { $(this).children("div").show(); } });				
			}, 
			function () {
				eval("t" + i + "=0;");
				changeTimeBar(formatInt,'');
				$(this).children('div').hide();
			}
		)

		var randomnumber=Math.floor(Math.random()*1000);
		if (chooseRandomType == 0) {
			$(this).load('content/ho_ads_heads/th_'+eval('headAdsLeft[' + i + ']')+'_inc.htm');
		} else if (chooseRandomType == 1) {
			$(this).load('content/ho_ads_heads/th_'+eval('headAdsRight[' + i + ']')+'_inc.htm');
		} else {
			$(this).load('content/ho_ads_heads/th_'+eval('headAds' + formatInt + '[totalHeads' + formatInt + ']')+'_inc.htm');
		}
		
	});
	
	setupPreview();
	
	
});

var setupPreview = function() {
	$("#contentArea3 td img").hoverIntent(showPreviewer,hidePreviewer);
}
	function showPreviewer() {
		var objAccNo;
		var re = new RegExp('.*ht_(.*)\.jpg','ig');
		objAccNo = $(this).parent().children(".smallObjThumb").attr("src");
		objAccNo = objAccNo.replace(re,"$1")
		$(this).parent().parent().prepend("<div id=\"objHover\" class=\"objThumb\"></div>");
		ajaxpage('/toah/content/ho/preview/ho_'+objAccNo+'.htm', 'objHover');
		$("#objHover").fadeIn(100);
	}
	function hidePreviewer() {
		$("#objHover").fadeOut(100);
		$("#objHover").remove();
	}

function fixIEHovers() {
	document.getElementById("topHead02").style.overflow = "visible";
	document.getElementById("topHead03").style.overflow = "visible";
	document.getElementById("topHead04").style.overflow = "visible";
	document.getElementById("topHead05").style.overflow = "visible";
	document.getElementById("topHead06").style.overflow = "visible";
	document.getElementById("topHead07").style.overflow = "visible";
	document.getElementById("topHead08").style.overflow = "visible";
	document.getElementById("topHead09").style.overflow = "visible";
	document.getElementById("topHead10").style.overflow = "visible";
	document.getElementById("topHead11").style.overflow = "visible";
}

var whichRotates = Math.floor(Math.random() * 2);

thematicAds = new Array("aest", "aqua", "astg", "bass", "berr", "bird", "byza", "chip", "choi", "chur", "cole", "croo", "deth", "divi", "draw", "dual", "dura", "dutc", "fede", "fold", "food", "frde", "gera", "giff", "gust", "icon", "inte", "just", "kens", "kirt", "lans", "lofu", "mgqi", "milk", "moch", "mors", "mtqc", "muan", "much", "muoc", "nets", "oliv", "poro", "powe", "scen", "shee", "smpa", "thes", "vela", "wash", "wist", "wrtg");

	teCurrentCount = 0;

function teRandom() {
	index2 = Math.floor(Math.random() * thematicAds.length);
	$("#contentarea2").load("content/te_ads/hd_"+thematicAds[index2]+".html");
	//$("#contentarea2").load("content/te_ads/hd_"+thematicAds[48]+".html");
	teCurrentCount = index2;
}

function teCycle(dir) {
	if (dir == "prev") {
		if (teCurrentCount == 0) { 
			teCurrentCount = thematicAds.length - 1;
		} else { 
			teCurrentCount = teCurrentCount - 1;
		}
	} else {
		if (teCurrentCount == thematicAds.length - 1) { 
			teCurrentCount = 0;
		} else { 
			teCurrentCount = teCurrentCount + 1;
		}
	}
	$("#contentarea2").load("content/te_ads/hd_"+thematicAds[teCurrentCount]+".html");
}


// THIS IS WHERE THE TIMELINES ARE
timelineAds = new Array();
	timelineAds[0] = "04eusb";
	timelineAds[1] = "08euwc";
	timelineAds[2] = "11eaj";
	timelineAds[3] = "11ocm";
	timelineAds[4] = "11ca";
	timelineAds[5] = "10euwf";
	timelineAds[6] = "10sfg";
	timelineAds[7] = "08wai";
	timelineAds[8] = "06eac";
	timelineAds[9] = "07ssh";
	timelineAds[10] = "07san";
	timelineAds[11] = "06wae";
	timelineAds[12] = "05caa";
	timelineAds[13] = "06eusb";
	timelineAds[14] = "09na";
	timelineAds[15] = "08euwl";
	timelineAds[16] = "09eue";
	timelineAds[17] = "07eak";
	timelineAds[18] = "09ssa";
	timelineAds[19] = "03afe";
	timelineAds[20] = "11eusi";
	timelineAds[21] = "03eus";
	timelineAds[22] = "07waa";
	timelineAds[23] = "10euwb";
	timelineAds[24] = "08nc";
	timelineAds[25] = "08sanc";
	timelineAds[26] = "10euwc";
	timelineAds[27] = "11eac";
	timelineAds[28] = "07nfe";
	timelineAds[29] = "02afe";
	timelineAds[30] = "08eustc";
	timelineAds[31] = "09euwf";
	timelineAds[32] = "07wai";
	timelineAds[33] = "11wai";
	timelineAds[34] = "08wam";
	timelineAds[35] = "06eust";
	timelineAds[36] = "04wam";
	timelineAds[37] = "02wam";
	timelineAds[38] = "04cam";
	timelineAds[39] = "08eusts";
	timelineAds[40] = "05ssa";
	timelineAds[41] = "07wae";
	timelineAds[42] = "05cam";
	timelineAds[43] = "05eust";
	timelineAds[44] = "05afe";
	timelineAds[45] = "07eac";
	timelineAds[46] = "07eusi";
	timelineAds[47] = "07eust";
	timelineAds[48] = "06sse";
	timelineAds[49] = "07euwf";
	timelineAds[50] = "07eaj";
	timelineAds[51] = "08euwf";
	timelineAds[52] = "08eak";
	timelineAds[53] = "08eac";
	timelineAds[54] = "08eusi";
	timelineAds[55] = "08sse";
	timelineAds[56] = "08eustn";
	timelineAds[57] = "08ssa";
	timelineAds[58] = "08ssh";
	timelineAds[59] = "06caa";
	timelineAds[60] = "06cam";
	timelineAds[61] = "07cam";
	timelineAds[62] = "06cac";
	timelineAds[63] = "07cac";
	timelineAds[64] = "04sac";
	timelineAds[65] = "05sac";
	timelineAds[66] = "05san";
	timelineAds[67] = "06sac";
	timelineAds[68] = "07sac";
	timelineAds[69] = "06san";
	timelineAds[70] = "09sfg";
	timelineAds[71] = "09eustc";
	timelineAds[72] = "09eustn";
	timelineAds[73] = "09eac";
	timelineAds[74] = "09wai";
	timelineAds[75] = "09eaj";
	timelineAds[76] = "09euwb";
	timelineAds[77] = "09euwc";
	timelineAds[78] = "09ca";
	timelineAds[79] = "09sa";
	timelineAds[80] = "09eusi";
	timelineAds[81] = "09eusts";
	timelineAds[82] = "09euwl";
	timelineAds[83] = "10eac";
	timelineAds[84] = "10eaj";
	timelineAds[85] = "10eak";
	timelineAds[86] = "10ocp";
	timelineAds[87] = "10ocm";
	timelineAds[88] = "10wai";
	timelineAds[89] = "10sfc";
	timelineAds[90] = "10eue";
	timelineAds[91] = "11euwf";
	timelineAds[92] = "11euwcm";
	timelineAds[93] = "10eus";
	timelineAds[94] = "11eust";
	timelineAds[95] = "10na";
	timelineAds[96] = "11na";
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	tlCurrentCount = 0;

function tlRandom() {
	index = Math.floor(Math.random() * timelineAds.length);
	$("#contentarea1").load("content/ht_ads/ht_"+timelineAds[index]+"_inc.html");
	tlCurrentCount = index;
}

function tlCycle(dir) {
	if (dir == "prev") {
		if (tlCurrentCount == 0) { 
			tlCurrentCount = timelineAds.length - 1;
		} else { 
			tlCurrentCount = tlCurrentCount - 1;
		}
	} else {
		if (tlCurrentCount == timelineAds.length - 1) { 
			tlCurrentCount = 0;
		} else { 
			tlCurrentCount = tlCurrentCount + 1;
		}
	}
	$("#contentarea1").load("content/ht_ads/ht_"+timelineAds[tlCurrentCount]+"_inc.html");
}


// THIS IS WHERE THE WORKS OF ART ARE
//objAds = new Array("2005.274","2006.4","29.151.2,32.69","29.100.941","51.90","97.22.24","96.32.15","94.4.358","94.24.1","91.26.5","44.27","44.14.2","43.98.6","55.93","55.166","54.1.1","53.225.54","53.225.5","56.70","LY62.38.1[20]","24.179,26.188.1,2","1999.26","L.1992.62.3a,b","49.7.53","61.43","60.87","59.69.3","59.49.1","58.57","58.132","57.51.26","43.87.25","43.87.17","43.86.5","43.161","41.72[1.59]","41.48","41.190.534","40.64","38.27","38.11.5a,b","36.25.53a,b","34.86.1","91.1.1621","89.4.560ab","89.4.52","89.4.2363","89.4.2208","89.4.1778","89.21.1","89.2.157","88.3.85","87.15.32","81.6.48","67.55.1","2006.418","1998.282","1998.205","2006.263","2000.150","50.87","50.69.2","2005.270","21.116","2000.485","1989.129","29.100.7","1985.112.1","2006.73.2","1999.61","07.225.510.118","2006.267","98.8.13","20.151.6","1988.159","24.97.21ab","1984.74","24.97.5","C.I.37.46.5","2006.509","2003.154","1980.224","18.87.1-.4","2005.186","2007.42.1,2","1975.548.119","2005.330.7","2003.431","2004.165","22.229","1996.3ab","1991.76","1992.11.22","1985.209","29.90","2005.273","2007.143","1979.206.229","1990.223","1988.157","23.141","32.100.56a","32.100.5","29.100.541","2007.286","2005.364.1-.48","1977.10","1989.12.2,3","1991.152","1991.17.7","1991.17.2","49.24","2005.393","2005.220","2005.100.77","1992.11.66","1991.172","1998.69,1999.99","1981.208.2","2005.243","1998.211","29.100.16","1982.60.20","11.45.5","1982.324","2001.756","2005.207","2001.78","27.45","1992.72.1","1970.301.13","1988.256","1982.220.7","12.173","12.185.4","C.I.53.76.1a,b-12a,b","C.I.53.40.10a-d","26.196","50.145.15","50.135.2","47.42","46.68","46.179.1","29.100.39","2007.96","2004.164","30.95.254","1975.1.7","18.70.8","1991.1073.145.5","1998.215.1,2","17.120.210","1992.8.1,2","1993.201","2007.20","1980.227","2002.379.11","2000.68","26.117","1980.1056.3","32.11.2","2007.24","2002.217","21.36.145","31.62","1975.1.2158","29.100.105","2006.45","1989.363.4","1981.159","1974.356.303","2003.42.13","1984.195","1996.364a,b","1987.85","1990.350","29.158.746","1995.299","2001.330","17.190.715ab","1990.332","1985.39.3","2007.280","20.24.76","1991.32.3","1983.8a,b","2006.235.127","2003.329","2005.100.325","2003.323","20.155.8","1970.301.36","1974.214.15a,b","21.36.146","2005.100.271","2005.100.1","1993.338","1993.324","1982.220.12","2001.253","1991.304","2007.50","23.166","1999.225","1999.403","17.191.134","1996.287","17.190.352a,b","1987.342.1,2","53.157","52.81","30.8.54","32.132","29.100.52","33.35.45,.46","31.132.34","66.221.1","65.188.2","65.14.1-.4","64.304.1","64.102","64.101.1498","64.101.1409","63.65","63.138.5","2002.131","12.229.6","19.2.6","29.100.197","29.100.184","1992.125","1986.340","16.174.3","1986.305","1978.288.7a,b","1987.142.261a-c","2000.38","14.25.1623","1999.223","1986.138","17.190.1867","1997.61.25","1986.498","2004.442","1978.412.425","1984.475.3","1986.1159","1991.204a,b","2002.386");
objAds = new Array("07.160", "07.286.36", "07.286.65", "09.157", "10.104", "10.7.1-.31", "12.134.29", "12.56.1", "12.56.3", "12.56.4", "14.40.636", "14.40.814", "14.40.824a-h", "14.58.235", "146.9_T34", "17.190.1014", "17.190.1413", "17.190.1417", "17.190.1436", "17.190.1468ab", "17.190.1475", "17.190.1489ab", "17.190.1512", "17.190.1520", "17.190.1522", "17.190.1525", "17.190.1549", "17.190.1557", "17.190.1559", "17.190.1575", "17.190.1600", "17.190.1607", "17.190.1617", "17.190.1622", "17.190.1655", "17.190.2076", "17.194.852", "19.14.2a-c", "1970.296.1", "1971.193a-ff", "1974.3", "1975.1.118", "1975.1.119,120", "1975.1.2470", "1975.1.2485", "1975.1.2486", "1977.1.1", "1978.412.348", "1978.412.657", "1979.206.1063", "1979.206.29", "1980.203.4", "1982.138", "1982.143.2", "1982.443.2", "1982.60.157.,158", "1982.60.17", "1982.60.20", "1982.60.82", "1983.426", "1984.34", "1985.347", "1985.58a,b", "1986.266.5", "1986.365.3", "1986.38.1", "1986.467.18", "1986.470a", "1987.12", "1988.133", "1989.138", "1991.159", "1993.28", "1993.382a,b", "1994.285a-m", "1994.498", "1994.605.21", "1995.141", "1995.537", "1996.426.1-.14", "1997.271", "1997.442.7.2", "1999.164", "1999.390", "1999.391", "1999.399", "2000.1", "2001.272", "2002.297,2002.568", "2002.433", "2002.501", "2003.29", "2003.42.54", "2005.273", "2006.156", "2006.250", "2006.273a,b", "2007.142", "2007.191", "2007.196.1,2", "2007.215.2", "2007.236", "2007.256", "2007.264", "2007.328", "2007.332.1", "2007.340", "2007.354", "2007.359", "2007.368", "2007.392", "2007.406", "2007.471.1", "2007.477", "2007.478.2a,b", "2007.479.2", "2007.61-.65", "2008.1", "2008.105.2", "2008.109", "2008.120.1,.2", "2008.136", "2008.141.2a,b", "2008.145", "2008.256", "2008.26", "2008.2a,b", "2008.30", "2008.368a,b", "2008.68", "2008.8", "2009.41", "2009.42", "21.168", "22.60.53", "22.60.58", "23.160.32a,b", "23.160.52", "23.21.2", "23.225.6a,b", "24.109.81", "24.109.86", "24.109.88", "25.110.3", "25.110.4", "25.78.43", "25.8", "26.159.1", "26.159.2", "26.199.63", "26.57.50", "26.60.1", "26.60.31-.33", "26.60.5", "27.122.2a,b", "28.121", "28.225.65", "29.100.122", "29.100.130", "29.100.131", "29.100.493-4", "29.100.498", "29.100.566", "29.100.58", "29.100.59", "29.100.61", "29.100.62", "29.100.63", "29.100.668", "29.100.717", "29.160.35", "30.66.2", "31.134.5", "31.134.8", "32.100.36", "32.100.40a", "32.100.40bc", "32.100.47", "32.12", "32.130.3b,47.101.1", "32.142.2", "32.53.1", "32.53.2", "32.88.15", "32.88.17", "33.77", "34.74a,b", "35.145.26a,.25b", "37.14.53", "37.80.3", "38.27", "41.190.20a-c", "41.190.21", "43.121.1", "46.128", "46.34.43", "46.34.79", "49.55.50", "49.7.20a-c", "49.7.21", "49.95.2202", "50.145.9ab", "52.585.66", "54.1.1", "54.1.2", "54.169", "55.94.1,2", "56.190", "56.522.103,63.693.14", "56.522.104", "56.522.48", "56.522.50", "56.522.52", "56.522.55", "56.522.56", "56.522.62", "56.522.67", "56.522.72", "56.522.74", "56.522.76", "56.522.79", "56.522.94", "56.522.95", "56.522.98", "57.11.7", "58.53", "58.75.1-22", "58.75.130a,b", "58.75.131", "58.75.16", "58.75.21-22", "58.75.3", "59.108", "59.69.1", "60.50a", "62.256.7", "63.201.2", "65.109.2", "65.59.1", "68.49", "69.194.1", "6A123", "6A80", "74.51.2393", "74.51.2456", "7A17", "84.8.2", "85.1", "89.4.154", "89.4.1586", "89.4.165", "89.4.1963", "89.4.200", "89.4.2161", "89.4.2243", "89.4.3182", "89.4.611", "89.4.614", "89.4.616", "89.4.647", "8A291", "90.12a,b", "90.61.2", "90.61.3", "91.1.211", "92.11.10", "92.11.8", "93.3.11a,b", "96.32.12", "96.32.16", "97.33", "97.34", "JP2003", "JP2065", "JP2113", "JP2187", "L.2009.6", "M10C49", "M16C106,107", "M6C480", "M6C62", "M8C205a", "MC39", "TAA1175", "TAA18", "TAA242", "TAA364", "TAA368", "TAA55", "TAA622", "TAA678");

	objCurrentCount = 0;
	totalObjects = objAds.length;
function objRandom() {
	totalObjects = Math.floor(Math.random() * objAds.length);
	//ajaxpage('content/ho/ho_'+objAds[totalObjects]+'_inc.htm', 'contentArea3')
	$("#contentArea3").load("content/ho_ads/ho_"+objAds[totalObjects]+".htm");
	objCurrentCount = totalObjects;
}

function objCycle(dir) {
	if (dir == "prev") {
		if (objCurrentCount == 0) { 
			objCurrentCount = objAds.length - 1;
		} else { 
			objCurrentCount = objCurrentCount - 1;
		}
	} else {
		if (objCurrentCount == objAds.length - 1) { 
			objCurrentCount = 0;
		} else { 
			objCurrentCount = objCurrentCount + 1;
		}
	}
	//ajaxpage('content/ho/ho_'+objAds[objCurrentCount]+'_inc.htm', 'contentArea3')
	$("#contentArea3").load("content/ho_ads/ho_"+objAds[objCurrentCount]+".htm", setTimeout("setupPreview()",500));
}


function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

function timeHeadsRandom() {
	headAds02 = new Array();
	headAds03 = new Array();
	headAds04 = new Array();
	headAds05 = new Array();
	headAds06 = new Array();
	headAds07 = new Array();
	headAds08 = new Array();
	headAds09 = new Array();
	headAds10 = new Array();
	headAds11 = new Array();
	headAdsLeft = new Array();
	headAdsRight = new Array();
	
	chooseRandomType = Math.floor(Math.random() * 20);
	
		// HEADS - Left Facing //
		headAdsLeft[0] = "07.230.2";
		headAdsLeft[1] = "33.8.7";
		headAdsLeft[2] = "11.100.2";
		headAdsLeft[3] = "42.11.30";
		headAdsLeft[4] = "1971.115.1ab";
		headAdsLeft[5] = "1999.484.2";
		headAdsLeft[6] = "89.15.19";
		headAdsLeft[7] = "66.695.7";
		headAdsLeft[8] = "54.82";
		headAdsLeft[9] = "1991.212";

		// HEADS - Right Facing //
		headAdsRight[0] = "1988.380.1";
		headAdsRight[1] = "30.8.54";
		headAdsRight[2] = "12.173";
		headAdsRight[3] = "99.35.218";
		headAdsRight[4] = "51.93ab";
		headAdsRight[5] = "16.32.194";
		headAdsRight[6] = "46.85.15";
		headAdsRight[7] = "JP2822";
		headAdsRight[8] = "1975.1.201";
		headAdsRight[9] = "1997.129.8";

		// HEADS - 02 //
		headAds02[0] = "47.100.80";
		headAds02[1] = "48.111";
		headAds02[2] = "40.156";
		headAds02[3] = "68.148";
		headAds02[4] = "59.2";
		headAds02[5] = "62.70.2";
		headAds02[6] = "1980.83.12";
		
		totalHeads02 = Math.floor(Math.random() * headAds02.length);
	
	
		// HEADS - 03 //
		headAds03[0] = "29.3.2";
		headAds03[1] = "1972.96";
		headAds03[2] = "1983.424";
		headAds03[3] = "26.7.1394";
		headAds03[4] = "56.138";
		headAds03[5] = "1979.206.1073";
		headAds03[6] = "1989.281.12";
		
		totalHeads03 = Math.floor(Math.random() * headAds03.length);

	
		// HEADS - 04 //
		headAds04[0] = "26.7.1412";
		headAds04[1] = "1979.206.1134";
		headAds04[2] = "03.14.5";
		headAds04[3] = "32.143.2";
		headAds04[4] = "10.132.1";
		headAds04[5] = "12.233";
		headAds04[6] = "25.78.44a-d";
		headAds04[7] = "26.7.1428";
		headAds04[8] = "32.11.1";
		headAds04[9] = "32.11.2";
		headAds04[10] = "55.121.5";
		headAds04[11] = "1977.187.33";
		headAds04[12] = "1982.317.3";
		headAds04[13] = "1992.165.19";
		headAds04[14] = "1996.178";
		headAds04[15] = "1999.316ab";
		headAds04[16] = "2000.38";
		headAds04[17] = "2002.8";
		headAds04[18] = "2002.66";
		headAds04[19] = "2003.154";
		headAds04[20] = "2007.24";
		
		totalHeads04 = Math.floor(Math.random() * headAds04.length);
	
	
		// HEADS - 05 //
		headAds05[0] = "11.90";
		headAds05[1] = "1980.416ab";
		headAds05[2] = "07.286.115";
		headAds05[3] = "14.37";
		headAds05[4] = "18.9.2";
		headAds05[5] = "26.123";
		headAds05[6] = "65.126";
		headAds05[7] = "67.107";
		headAds05[8] = "1975.268.414";
		headAds05[9] = "1978.412.53";
		headAds05[10] = "1979.6";
		headAds05[11] = "1979.206.478";
		headAds05[12] = "1980.416ab";
		headAds05[13] = "1991.76";
		headAds05[14] = "1993.342";
		headAds05[15] = "1998.209";
		headAds05[16] = "1999.272.1,2";
		headAds05[17] = "1991.127";
		headAds05[18] = "1991.300";
		
		totalHeads05 = Math.floor(Math.random() * headAds05.length);
	
	
		// HEADS - 06 //
		headAds06[0] = "19.186";
		headAds06[1] = "1998.69,1999.99";
		headAds06[2] = "21.76";
		headAds06[3] = "66.25";
		headAds06[4] = "12.37.136";
		headAds06[5] = "66.196.35";
		headAds06[6] = "67.234";
		headAds06[7] = "1977.126";
		headAds06[8] = "1981.158";
		headAds06[9] = "1992.336";
		headAds06[10] = "2000.531";
		headAds06[11] = "2003.222";
		headAds06[12] = "2005.512";
		
		totalHeads06 = Math.floor(Math.random() * headAds06.length);
	
	
		// HEADS - 07 //
		headAds07[0] = "17.190.678";
		headAds07[1] = "2004.442";
		headAds07[2] = "2005.393";
		headAds07[3] = "1980.263.4";
		headAds07[4] = "79.8.10";
		headAds07[5] = "1972.147";
		headAds07[6] = "1977.173";
		headAds07[7] = "1978.521.3";
		headAds07[8] = "1979.206.1062";
		headAds07[9] = "41.190.13";
		headAds07[10] = "1981.365.2";
		headAds07[11] = "1982.480";
		headAds07[12] = "1987.144";
		headAds07[13] = "1988.117.11";
		headAds07[14] = "1990.132";
		headAds07[15] = "1991.304";
		headAds07[16] = "1994.403";
		headAds07[17] = "1995.176";
		headAds07[18] = "1997.113";
		headAds07[19] = "2001.78";
		headAds07[20] = "2004.442";
		headAds07[21] = "2004.453";
		headAds07[22] = "17.190.229";
		headAds07[23] = "23.110.56";
		headAds07[24] = "29.160.32";
		headAds07[25] = "41.100.23";
		headAds07[26] = "41.100.132";
		//headAds07[27] = "1980.34.34";
		headAds07[27] = "1979.402";
		headAds07[28] = "1982.220.2";
		headAds07[29] = "1982.220.8";
		headAds07[30] = "1988.355";
		//headAds07[32] = "1981.218";
		
		totalHeads07 = Math.floor(Math.random() * headAds07.length);
	
	
		// HEADS - 08 //
		headAds08[0] = "57.51.24";
		headAds08[1] = "59.49.1";
		headAds08[2] = "1979.206.86";
		headAds08[3] = "11.149.1";
		headAds08[4] = "08.19";
		headAds08[5] = "11.15";
		headAds08[6] = "12.194";
		headAds08[7] = "13.64.3ab";
		headAds08[8] = "14.40.626-27";
		headAds08[9] = "14.40.640";
		headAds08[10] = "17.50.18.147";
		headAds08[11] = "17.190.582";
		headAds08[12] = "17.190.905";
		headAds08[13] = "20.64.21";
		headAds08[14] = "24.197.2";
		headAds08[15] = "29.100.16";
		headAds08[16] = "32.100.82";
		headAds08[17] = "32.100.89";
		headAds08[18] = "41.100.245";
		headAds08[19] = "49.7.19";
		headAds08[20] = "49.7.108";
		headAds08[21] = "49.38";
		headAds08[22] = "49.97.114";
		headAds08[23] = "51.90";
		headAds08[24] = "55.93";
		headAds08[25] = "57.51.24";
		headAds08[26] = "57.506";
		headAds08[27] = "59.49.2";
		headAds08[28] = "63.65";
		headAds08[29] = "1972.63a,b";
		headAds08[30] = "1975.1.130";
		headAds08[31] = "1977.394.15";
		headAds08[32] = "1979.206.380";
		headAds08[33] = "1990.332";
		headAds08[34] = "1991.27.2";
		headAds08[35] = "1994.143";
		headAds08[36] = "65.14.1-.4";
		headAds08[37] = "1991.9,1987.217";
		headAds08[38] = "2000.641";
		headAds08[39] = "04.3.286a";
		
		totalHeads08 = Math.floor(Math.random() * headAds08.length);
	
	
		// HEADS - 09 //
		headAds09[0] = "50.583.4";
		headAds09[1] = "1996.7";
		headAds09[2] = "07.160";
		headAds09[3] = "1997.81.1";
		headAds09[4] = "07.225.510.118";
		headAds09[5] = "17.134.3";
		headAds09[6] = "20.155.2";
		headAds09[7] = "31.109";
		headAds09[8] = "42.25.8";
		headAds09[9] = "44.30";
		headAds09[10] = "46.155";
		headAds09[11] = "47.103.23";
		headAds09[12] = "51.501.6469";
		headAds09[13] = "55.121.23";
		headAds09[14] = "60.30";
		headAds09[15] = "63.176";
		headAds09[16] = "64.164.385";
		headAds09[17] = "1972.118.238";
		headAds09[18] = "1975.1.148";
		headAds09[19] = "1977.187.36";
		headAds09[20] = "1991.17.2";
		headAds09[21] = "1994.35.26";
		headAds09[22] = "1994.383";
		headAds09[23] = "1996.100.1";
		headAds09[24] = "2002.468";
		headAds09[25] = "2006.98";
		headAds09[26] = "2006.418";
		headAds09[27] = "JP2453";
		headAds09[28] = "1979.395";
		headAds09[29] = "1979.396.1";
		headAds09[30] = "1982.324";
		headAds09[31] = "1985.124";
		headAds09[32] = "1989.329";
		headAds09[33] = "1993.332.1,2";
		headAds09[34] = "2006.101";
		headAds09[35] = "2006.235.32";
		
		totalHeads09 = Math.floor(Math.random() * headAds09.length);
	
	
		// HEADS - 10 //
		headAds10[0] = "1984.1203.1";
		headAds10[1] = "1998.57";
		headAds10[2] = "1972.145.2";
		headAds10[3] = "89.21.3";
		headAds10[4] = "94.9.2";
		headAds10[5] = "94.23.3";
		headAds10[6] = "1973.133";
		headAds10[7] = "1975.312.7";
		headAds10[8] = "1978.412.591,2";
		headAds10[9] = "1979.206.266";
		headAds10[10] = "1980.1077";
		headAds10[11] = "1984.1203.1";
		headAds10[12] = "1996.100.7";
		headAds10[13] = "1996.435";
		headAds10[14] = "1997.371";
		headAds10[15] = "1997.382.38";
		headAds10[16] = "2003.303";
		headAds10[17] = "2005.100.75";
		headAds10[18] = "2005.100.88";
		headAds10[19] = "2005.100.387.1-.10";
		headAds10[20] = "L.1997.84.6";
		headAds10[21] = "06.1328";
		headAds10[22] = "14.135";
		headAds10[23] = "16.95";
		headAds10[24] = "20.106.2";
		headAds10[25] = "38.65";
		headAds10[26] = "38.104";
		headAds10[27] = "49.58.1";
		headAds10[28] = "56.517.4";
		headAds10[29] = "64.188";
		headAds10[30] = "67.250";
		headAds10[31] = "1984.526";
		headAds10[32] = "1996.418";
		headAds10[33] = "2001.756";
		headAds10[34] = "2003.431";
		headAds10[35] = "2003.520";
		headAds10[36] = "89.4.2161";
		
		totalHeads10 = Math.floor(Math.random() * headAds10.length);
	
	
		// HEADS - 11 //
		headAds11[0] = "67.187.107";
		headAds11[1] = "33.43.29";
		headAds11[2] = "64.148";
		headAds11[3] = "1996.403.1";
		headAds11[4] = "29.100.370";
		headAds11[5] = "1970.727.1";
		headAds11[6] = "1972.79";
		headAds11[7] = "1986.267.277";
		headAds11[8] = "1996.281";
		headAds11[9] = "1996.343";
		headAds11[10] = "1996.403.5";
		headAds11[11] = "1997.149.10";
		headAds11[12] = "1997.364";
		headAds11[13] = "1999.210";
		headAds11[14] = "2000.329";
		headAds11[15] = "2001.307";
		headAds11[16] = "2001.415";
		headAds11[17] = "2001.474";
		headAds11[18] = "2002.456.17";
		headAds11[19] = "1992.146";
		headAds11[20] = "1992.391";
		headAds11[21] = "1999.363.41";
		
		totalHeads11 = Math.floor(Math.random() * headAds11.length);
	
}

function changeTimeBar(whichTime, whichDir) {
	var el = document.getElementById('tb'+whichTime);
	if (whichDir == '_on') {
		el.src = 'art/tp_bar_on.gif';
	} else {
		el.src = 'art/tp_bar.gif';
	}
}

	function showEnlarge(accession) {
		ajaxpage('/toah/content/ho/preview/ho_'+accession+'.htm', 'previewobj');
		document.getElementById('previewobj').style.display = "block";
		//divName = 'previewobj';
	}
	function hideEnlarge() {
		ajaxpage('/toah/content/blank.html', 'previewobj');
		document.getElementById('previewobj').style.display = "none";
	}
	
// THIS IS FOR THE CONTACT US OPTION LIST //
function showContent1() {
    document.getElementById('contact1').style.display = 'block';
    document.getElementById('contact2').style.display = 'none';
    document.getElementById('contact3').style.display = 'none';
    document.getElementById('leftcol1').className = 'cur';
    document.getElementById('leftcol2').className = 'none';
    document.getElementById('leftcol3').className = 'none';
    return true;
}
function showContent2() {
    document.getElementById('contact1').style.display = 'none';
    document.getElementById('contact2').style.display = 'block';
    document.getElementById('contact3').style.display = 'none';
    document.getElementById('leftcol1').className = 'none';
    document.getElementById('leftcol2').className = 'cur';
    document.getElementById('leftcol3').className = 'none';
    return true;
}
function showContent3() {
    document.getElementById('contact1').style.display = 'none';
    document.getElementById('contact2').style.display = 'none';
    document.getElementById('contact3').style.display = 'block';
    document.getElementById('leftcol1').className = 'none';
    document.getElementById('leftcol2').className = 'none';
    document.getElementById('leftcol3').className = 'cur';
    return true;
}
function Start2(page) {
OpenWin = this.open(page, "CtrlWindow2", "toolbar=yes,menubar=no,location=no,scrollbars=yes,resizable=yes,width=750,height=400,left=0,top=0,screenX=100,screenY=50");
OpenWin.focus();
}


// ############ TOOLTIPS ############ //

function showSubText(timePeriod) {

}
		
function hidetip(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidetip(){

}

function clearhidetip(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

