function hoverItem(elm)
{

}

function openDocumentViewer(url, id) {
    var opener = window.open(url, 'DocumentViewer'+id, 'location=no,menubar=no,scrollbars=no,resizable=yes');
    opener.moveTo(0, 0)
    opener.resizeTo(screen.availWidth, screen.availHeight)
}


function openDialog(name)
{
  var myName = new String(name);
  myName = myName.toLowerCase();
  switch(myName)
  {
    case "category":
      var hwnd = window.open("../Dialogs/SearchCategories.aspx",null,"status=no,toolbar=no,menubar=no,location=no");
      break; 
     case "digitalcopyinfo":
      var hwnd = window.open("../Dialogs/DigitalCopyInfo.aspx",null,"status=no,toolbar=no,menubar=no,location=no");
      hwnd.resizeTo(400,250);
      hwnd.moveTo(150,300);
      break;
  }
}


function resizeMe(x,y)
{
  try
  {
    window.resizeTo(x,y);
  }
  catch(e)
  {}
}

function enterKey(Name)
{
	if(window.event.keyCode == 13)
	{
		window.event.keyCode = 9;
		var Search = document.getElementById(Name);
		if(Search!=null)
		{
			Search.click();
		}
	}
}

function setFocus(Name)
{
	var ctrl = document.getElementById(Name);
	if(ctrl!=null)
	{
		ctrl.focus();
	}
}


function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=200,left = 640,top = 400');");
}

function doOpen(url, target) {
    var iMyWidth;
    var iMyHeight;
    //half the screen width minus half the new window width (plus 5 pixel borders).
    iMyWidth = (window.screen.width / 2) - (75 + 10);
    //half the screen height minus half the new window height (plus title and status bars).
    iMyHeight = (window.screen.height / 2) - (100 + 50);
    //Open the window.
    var w = window.open(url, target, "status=no, height=100, width=150, resizable=yes, left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
    w.focus();
    return false;
}

