// JavaScript Document

function determinedockingstate()
{
// chkdockedstate is the event called when we try to check the property

	System.Gadget.onUndock = chkdockedstate;
    System.Gadget.onDock = chkdockedstate;
}

// determine through a check which sizing function we should use

function chkdockedstate()
{
    if(System.Gadget.docked)
    {
		setTimeout("window.location.replace('main_docked.html')",0);
		System.Gadget.beginTransition();
		System.Gadget.endTransition(0, 0.05);
        document.body.style.width = "135px";
    	document.body.style.height = "133px";
    }
    else
    {
		setTimeout("window.location.replace('main_undocked.html')",0);
		System.Gadget.beginTransition();
		System.Gadget.endTransition(0, 0.1);
        document.body.style.width = "200px";
    	document.body.style.height = "400px";
	}
}

determinedockingstate();

function open_window(queryform) {
	if (queryform.location.value =="2") window.open("http://aj2vr6xy7z.cs.serialssolutions.com/results?SS_LibHash=AJ2VR6XY7Z&dbIDList=&searchType=basic&action=start&catGroupList=default&searchBy=Category&field=Keyword&term="+queryform.searchbox.value+"&catID=19851");
	if (queryform.location.value =="1") window.open("http://uclid.uc.edu/search/X?"+queryform.searchbox.value+"&b=&l=&Da=&Db=&m=&s=&v=&c=&SORT=D&searchscope=39");
	if (queryform.location.value =="3") window.open("http://aj2vr6xy7z.search.serialssolutions.com/?V=1.0&N=100&L=AJ2VR6XY7Z&S=AC_T_B&C="+queryform.searchbox.value);
	if (queryform.location.value =="4") window.open("http://journals.ohiolink.edu./lsearch/search.do?query="+queryform.searchbox.value+"&field=contents");
	if (queryform.location.value =="5") window.open("http://olc1.ohiolink.edu/search/~?searchtype=X&searcharg="+queryform.searchbox.value+"&SORT=D");
	if (queryform.location.value =="6") window.open("http://www.googlesyndicatedsearch.com/u/UCincinnati?q="+queryform.searchbox.value);
	if (queryform.location.value =="7") window.open("http://scholar.google.com/scholar?q="+queryform.searchbox.value+"&hl=en&lr=");
	if (queryform.location.value =="8") window.open("http://catalog.cincinnatilibrary.org/uhtbin/cgisirsi/x/0/0/123?searchdata1="+queryform.searchbox.value+"&srchfield1=GENERAL%5ESUBJECT%5EGENERAL%5E%5Ewords+org+phrase");
	return false;
}