// popup.js
// JavaScript file which contains all functions for popping up windows

var winRef;
var winRefer;

function openBookCO(bookid,copyid)
{
    var strURL
    strURL = "BookCheckoutPop.asp?bid=" + bookid + "&cid=" + copyid
    winRef = window.open(strURL,'BookCheckout','width=500,height=400,top=20,left=10');
    if (!winRef.opener)
      winRef.opener = self;
}
function openDOLStatus(itemid,distid)
{
    var strURL
    strURL = "DistOLStatus.asp?item=" + itemid + "&dist=" + distid
    winRef = window.open(strURL,'DistOLStatus','width=500,height=400,top=20,left=10');
    if (!winRef.opener)
      winRef.opener = self;
}
function openLibListOne(libid)
{
    var strURL
    strURL = "LibListPop.asp?lib=" + libid
    winRef = window.open(strURL,'LibListPop','width=400,height=300,top=20,left=20');
}
function openUserListOne(uid)
{
    var strURL
    strURL = "UserListPop.asp?userid=" + uid
    winRef = window.open(strURL,'UserListPop','width=400,height=450,top=20,left=20');
}
function openLibSelect()
{
    winRef = window.open('LibSelect.asp','LibSelect','width=400,height=300,top=20,left=20');
    if (!winRef.opener)
      winRef.opener = self;
}

function openCatSelect()
{
    winRef = window.open('CatSelect.asp','CatSelect','width=400,height=300,top=20,left=20');
    if (!winRef.opener)
      winRef.opener = self;
}

function openPubSelect()
{
    winRef = window.open('PubSelect.asp','PubSelect','width=400,height=300,top=20,left=20');
    if (!winRef.opener)
      winRef.opener = self;
}
function checkSearch()
{
	var valIt = document.searchForm.searchText.value;

		alert("Please register to use the ILSO.");
		document.searchForm.searchText.focus();
		return false;
}

