$(document).ready(function() {
    
 $("li#ho, li#pe, li#su, li#ad, li#ti, li#pr").hover(function(){   
		$(this).css("background-position", "0 -23px");
		}, function(){
		$(this).css("background-position", "0 0");
		 });



  $("li#he, li#st, li#gd, li#di, li#fg, li#rg, li#ls").hover(function(){   
		$(this).css("background", "#b19551");
		}, function(){
		$(this).css("background", "#332031");
		 });


  $("#advancedSearchRubric, #personSearchRubric, #subjectSearchRubric").hover(function(){   
		$(this).css("background-position", "0 -46px");
		}, function(){
		$(this).css("background-position", "0 0");
		 });

  $("li .timelineDate").hover(function(){   
		$(this).css("background-color", "#e46d2c");
		}, function(){
		$(this).css("background-color", "#7B352F");
		 });

	$("#prodImg").load( function() { $(this).css("display", "block");
		 } );
		 
    $(".clearForm .clear_form, .searchbutton .search_button").hover(function(){   
		$(this).css("top", "-28px");
		}, function(){
		$(this).css("top", "0");
		 });

		});


prodImg = new Image (110,18);
prodImg.src = "/images/history/product_shots/noProductShot.gif"

function showProduct(prodNum) {

   var browsePubList1 = document.getElementById ? 
		   document.getElementById("browsePubList") : 
		   document.all.browsePubList;
	var prodImg = document.getElementById ? 
		   document.getElementById("prodImg") : 
		   document.all.prodImg;

prodImg.src="/images/history/product_shots/"+prodNum;
}

function showTimelineText(y) {
var timelineTexta = document.getElementById ? 
		   document.getElementById("timelineText1") : 
		   document.all.timelineText1;
var timelineText0 = document.getElementById ? 
		   document.getElementById("timelineText0") : 
		   document.all.timelineText0;

var x = timelineTexta.getElementsByTagName("div");

var z = x[y];
var zz = document.getElementById ? 
		   document.getElementById("z") : 
		   document.all.z;

timelineText0.innerHTML = z.innerHTML;timelineText0.style.color = "white";	   
		   
}

function resetTimelineText0() {
var timelineText0 = document.getElementById ? 
		   document.getElementById("timelineText0") : 
		   document.all.timelineText0;
		   timelineText0.innerHTML = "Roll over chronology images for more info";
		   	timelineText0.style.color = "#b49966";
}

// Ride the carousel...
jQuery(document).ready(function() {
    jQuery("#mycarousel").jcarousel({
        itemVisible: 6,
        itemScroll: 4
    });
});

$(document).ready(function() {
    $("#errorMessage").hide();
   
    //$("#TM_about a").click(function() 
		 //{ $("#errorMessage").show(); }
		//);  
    
  //  $("#errorMessage a").click(function() 
		//{  
		   //$("#errorMessage").hide(); }
		//);  
});

/*advanced = new Image (110,18);
advanced.src = "/images/history/histrc/b_advanc.gif"
advancedh = new Image (110,18);
advancedh.src = "/images/history/histrc/b_advanch.gif"
advanced2 = new Image (110,18);
advanced2.src = "/images/history/histrc/advancedsearch.gif"
advanced2h = new Image (110,18);
advanced2h.src = "/images/history/histrc/advancedsearchh.gif"
backlib = new Image (110,18);
backlib.src = "/images/history/histrc/b_backlib.gif"
backlibh = new Image (110,18);
backlibh.src = "/images/history/histrc/b_backlibh.gif"
chron = new Image (110,18);
chron.src = "/images/history/histrc/b_chronology.gif"
chronh = new Image (110,18);
chronh.src = "/images/history/histrc/b_chronologyh.gif"
chron2 = new Image (110,18);
chron2.src = "/images/history/histrc/b_chron.gif"
chron2h = new Image (110,18);
chron2h.src = "/images/history/histrc/b_chronh.gif"
clear = new Image (110,18);
clear.src = "/images/history/histrc/b_clear.gif"
clearh = new Image (110,18);
clearh.src = "/images/history/histrc/b_clearh.gif"
reset = new Image (110,18);
reset.src = "/images/history/histrc/b_clear.gif"
reseth = new Image (110,18);
reseth.src = "/images/history/histrc/b_clearh.gif"
dict = new Image (110,18);
dict.src = "/images/history/histrc/b_dict.gif"
dicth = new Image (110,18);
dicth.src = "/images/history/histrc/b_dicth.gif"
faculty = new Image (110,18);
faculty.src = "/images/history/histrc/b_faculty.gif"
facultyh = new Image (110,18);
facultyh.src = "/images/history/histrc/b_facultyh.gif"
forum = new Image (110,18);
forum.src = "/images/history/histrc/b_digforum.gif"
forumh = new Image (110,18);
forumh.src = "/images/history/histrc/b_digforumh.gif"
forum2 = new Image (110,18);
forum2.src = "/images/history/histrc/b_forum.gif"
forum2h = new Image (110,18);
forum2h.src = "/images/history/histrc/b_forumh.gif"
ggdbs = new Image (110,18);
ggdbs.src = "/images/history/histrc/b_ggdbs.gif"
ggdbsh = new Image (110,18);
ggdbsh.src = "/images/history/histrc/b_ggdbsh.gif"
guide = new Image (110,18);
guide.src = "/images/history/histrc/b_research.gif"
guideh = new Image (110,18);
guideh.src = "/images/history/histrc/b_researchh.gif"
help = new Image (110,18);
help.src = "/images/history/histrc/b_help.gif"
helph = new Image (110,18);
helph.src = "/images/history/histrc/b_helph.gif"
home = new Image (110,18);
home.src = "/images/history/histrc/b_home.gif"
homeh = new Image (110,18);
homeh.src = "/images/history/histrc/b_homeh.gif"
libhome = new Image (110,18);
libhome.src = "/images/history/histrc/b_libhome.gif"
libhomeh = new Image (110,18);
libhomeh.src = "/images/history/histrc/b_libhomeh.gif"
news = new Image (110,18);
news.src = "/images/history/histrc/b_newsdigest.gif"
newsh = new Image (110,18);
newsh.src = "/images/history/histrc/b_newsdigesth.gif"
news2 = new Image (110,18);
news2.src = "/images/history/histrc/b_news.gif"
news2h = new Image (110,18);
news2h.src = "/images/history/histrc/b_newsh.gif"
person = new Image (110,18);
person.src = "/images/history/histrc/b_person.gif"
personh = new Image (110,18);
personh.src = "/images/history/histrc/b_personh.gif"
person2 = new Image (110,18);
person2.src = "/images/history/histrc/personsearch.gif"
person2h = new Image (110,18);
person2h.src = "/images/history/histrc/personsearchh.gif"
results = new Image (110,18);
results.src = "/images/history/histrc/b_results.gif"
resultsh = new Image (110,18);
resultsh.src = "/images/history/histrc/b_resultsh.gif"
revise = new Image (110,18);
revise.src = "/images/history/histrc/b_revise.gif"
reviseh = new Image (110,18);
reviseh.src = "/images/history/histrc/b_reviseh.gif"
search = new Image (110,18);
search.src = "/images/history/histrc/b_search.gif"
searchh = new Image (110,18);
searchh.src = "/images/history/histrc/b_searchh.gif"
searchhist = new Image (110,18);
searchhist.src = "/images/history/histrc/b_searchhist.gif"
searchhisth = new Image (110,18);
searchhisth.src = "/images/history/histrc/b_searchhisth.gif"
submit = new Image (110,18);
submit.src = "/images/history/histrc/b_search.gif"
submith = new Image (110,18);
submith.src = "/images/history/histrc/b_searchh.gif"
sources = new Image (110,18);
sources.src = "/images/history/histrc/b_sources.gif"
sourcesh = new Image (110,18);
sourcesh.src = "/images/history/histrc/b_sourcesh.gif"
subject = new Image (110,18);
subject.src = "/images/history/histrc/b_subject.gif"
subjecth = new Image (110,18);
subjecth.src = "/images/history/histrc/b_subjecth.gif"
subject2 = new Image (110,18);
subject2.src = "/images/history/histrc/subjectsearch.gif"
subject2h = new Image (110,18);
subject2h.src = "/images/history/histrc/subjectsearchh.gif"
tabaha = new Image (110,18);
tabaha.src = "/images/history/histrc/off_tabaha.gif"
tabahah = new Image (110,18);
tabahah.src = "/images/history/histrc/over_tabaha.gif"
tabahl = new Image (110,18);
tabahl.src = "/images/history/histrc/off_tabahl.gif"
tabahlh = new Image (110,18);
tabahlh.src = "/images/history/histrc/over_tabahl.gif"
tabiac = new Image (110,18);
tabiac.src = "/images/history/histrc/off_tabiac.gif"
tabiach = new Image (110,18);
tabiach.src = "/images/history/histrc/over_tabiac.gif"
tabisi = new Image (110,18);
tabisi.src = "/images/history/histrc/off_tabisi.gif"
tabisih = new Image (110,18);
tabisih.src = "/images/history/histrc/over_tabisi.gif"
tips = new Image (110,18);
tips.src = "/images/history/histrc/b_searchtips.gif"
tipsh = new Image (110,18);
tipsh.src = "/images/history/histrc/b_searchtipsh.gif"
update = new Image (110,18);
update.src = "/images/history/histrc/b_update.gif"
updateh = new Image (110,18);
updateh.src = "/images/history/histrc/b_updateh.gif"
view = new Image (110,18);
view.src = "/images/history/histrc/b_viewmk.gif"
viewh = new Image (110,18);
viewh.src = "/images/history/histrc/b_viewmkh.gif"

ibacklibOn = new Image;
ibacklibOn.src = "/images/history/b_backlibh.gif"
ibacklibOff = new Image;
ibacklibOff.src = "/images/history/b_backlib.gif"
*/
function img_act (tag) {
	document [tag].src = eval(tag + "h.src");
}

function img_inact (tag) {
    document [tag].src = eval(tag + ".src");
}

function submitForm (searchForm) {
    searchForm.submit();
}

function clearSU()
{
    document.basicSearch.SU.value='';
    document.basicSearch.SU.focus();
}

function popInfomarkWindow()
{
    width = 700;
    height = 450;
    xposition = (screen.width - width) / 2;
    yposition = (screen.height - height) / 2;

    remoteWindow = window.open("http://www.galegroup.com/infomarks", "infomarkWindow",
                               "alwaysRaised=no,resizable=yes,scrollbars=yes" +
                               ",width=" + width + ",height=" + height +
                               ",top=" + yposition + ",left=" + xposition +
                               ",screenX=" + xposition + ",screenY=" + yposition);

    if (remoteWindow == null)
        remoteWindow.opener = window;
    else
        remoteWindow.focus();
}

