try {
  document.execCommand("BackgroundImageCache", false, true);
} catch(err) {}

function viewinfo(x,y)
{
	page = x
	catalog = y
	remote = window.open("/print.cfm/page/" + page + "/catalog/" + catalog,"PrintFriendly88","width=690,height=700,scrollbars=yes");
	remote.moveTo(0,0);
}

function openhelp(x)
{
	remote = window.open('/help.cfm/catalog/' + x,"PrintFriendly89","width=650,height=550,scrollbars=1");
}

function clearinput(x)
{
if (x.value == x.defaultValue )
	{
	x.value='';
	}
}

function resetinput(x)
{
if (x.value=='')
	{
	x.value=x.defaultValue
	}
}

function go(x,y)
{
	box = x;
	destination = x.options[x.selectedIndex].value;
	if (destination && destination != 'home' && destination != 'null')
	location.href = '/lg_display.cfm/page/' + destination + '/catalog/' + y;
	else if (destination == 'home')
	{
	location.href = '/index.cfm/catalog/' + y;
	}
	
}

function go_vi(x)
{
	box = x;
	destination = x.options[x.selectedIndex].value;
	if (destination) location.href = destination;
}

function green_go_on(x)
{
	x.style.backgroundPosition = '0px -30px';
}

function green_go_off(x)
{
	x.style.backgroundPosition = '0px 0px';
}

function bookmarksite(title, url)
{
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar) // firefox
window.sidebar.addPanel(unescape(title), unescape(url), "");
}

function imageswap(myImage)
{
myImage = myImage.replace(/_vi/,"_mv");
document.getElementById('cover_image').src = myImage;
}

function imagerestore(oldImage)
{
document.getElementById('cover_image').src = oldImage;
}



function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else return results[1];
}

function topBottomScroll(myMapH)
{
var myTarget = gup( 'target' );
var myTopVar = (document.getElementById('header_pcol').offsetHeight + 110);
var myBottomVar = (parseInt(myTopVar) + parseInt(myMapH));

if(myTarget)
	{
	if (myTarget=="top")
		{
		scroll(0,myTopVar);
		}
	else if (myTarget=="bottom")
		{
		scroll(0,myBottomVar);
		}
	}
}

document.onkeyup = refreshMe;

function refreshMe(e)
{
var str = location.href
if (str.match("\\?"))
	  var y = "&"
	  else
	  var y = "?"
	  
   var KeyID = (window.event) ? event.keyCode : e.keyCode;
   
   switch(KeyID)
   {
	  case 123:
	  location.href = location.href + y + 'refresh=yes';
	  break;   }
}

function showPrintControl()
{
document.getElementById('print_control').style.display = 'block';
}
function hidePrintControl()
{
document.getElementById('print_control').style.display = 'none';
}