// global variables
var refinepanelvisible=false;
var alphafilterpanelvisible=false;
// Toggles visibility of an object specified by ID
// It converts the id to an object reference and then
// calls switchObj(obj)
function switchID(idstr){
switchObj(document.getElementById(idstr));
}
function switchObj(obj){
if (obj.style.display == "none"){
obj.style.display = "block";
}
else{
obj.style.display = "none";
}
}
function switchrefinement(idstr){
}
function hideit(idstr){
if (document.getElementById(idstr)!=null)
{
document.getElementById(idstr).style.display = "none";
}
}
function showBlock(idstr){
// note: this assumes that the object can be a block display
if (document.getElementById(idstr)!=null)
{
document.getElementById(idstr).style.display = "block";
}
}
function showInline(idstr){
// note: this assumes that the object can be an inline display
if (document.getElementById(idstr)!=null)
{
document.getElementById(idstr).style.display = "inline";
}
}
// toggle display for the content refinement panel called "refinepanel"
function switchRefinepanel(dividstr,iconopen,iconclose){
if(refinepanelvisible){
hideit(dividstr)
hideit(iconclose)
showInline(iconopen)
refinepanelvisible=false;
} else {
showBlock(dividstr)
showInline(iconclose)
hideit(iconopen)
refinepanelvisible=true;
}
}
// toggle display for the alpha filter panel called "letterbox"
function switchLetterbox(dividstr,iconopen,iconclose){
if(alphafilterpanelvisible){
hideit(dividstr)
hideit(iconclose)
showInline(iconopen)
alphafilterpanelvisible=false;
} else {
showBlock(dividstr)
showInline(iconclose)
hideit(iconopen)
alphafilterpanelvisible=true;
}
}
function win(strName,strURL) {
//alert(strName + " " + strURL)
halfWindow = window.open(strURL,strName, "width=515,height=450,scrollbars=yes,top=0,left=140,resizable=1,status=0");
halfWindow.focus();
}
function fullWin(strName,strURL) {
//alert(strName + " " + strURL)
halfWindow = window.open(strURL,strName, "width=515,height=450,location=1,scrollbars=yes,top=0,left=140,resizable=1,directories=1,status=1,toolbar=1,menubar=1");
halfWindow.focus();
}
function bigWin(strName,strURL) {
var browserVersion = navigator.appVersion;
var browserVersionNum = parseFloat(browserVersion);
if (browserVersionNum >= 4) {
var availheight=screen.availHeight;
var availwidth=screen.availWidth;
}
if (browserVersionNum >= 4) {
if(availheight < 600 && availwidth < 800) { // < 640x480
halfWindow = window.open(strURL,strName, "width=500,height=300,top=0,left=100,location=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,directories=1");
} else if(availheight < 768 && availwidth < 1024) { // 800x600
halfWindow = window.open(strURL,strName, "width=600,height=400,top=0,left=100,location=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,directories=1");
} else { // 1024x768 +
halfWindow = window.open(strURL,strName, "width=800,height=500,top=0,left=100,location=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,directories=1");
}
return;
} else {
halfWindow = window.open(strURL,strName, "width=500,height=300,top=0,left=100,location=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes,status=yes,directories=1");
return;
}
halfWindow.focus();
}
function SmallWin(strURL) {
halfWindow = window.open(strURL, "Email", "width=480,height=420,scrollbars=yes,top=20,left=100,resizable,status");
halfWindow.focus();
}
function newWindow(half){
stateWin = window.open(half, 'STATE', 'width=515,height=450,top=0,left=140,scrollbars=yes,top,resizable,status')
stateWin.focus()
}
// Sets the classname on a given tag by ID
function ChangeClassName(id, newClass)
{
if (document.getElementById(id))
document.getElementById(id).className=newClass;
}
// Toggles between two CSS classes
function toggleClasses(id, cssClass1, cssClass2)
{
var element = document.getElementById(id);
if (element.className == cssClass1)
{
element.className = cssClass2;
}
else
{
element.className = cssClass1;
}
}
// this will show the enhanced items, turn off the DISPLAY link
function showMoreNavigatorItems(id) {
ChangeClassName(id, "visible");
ChangeClassName(id + "Control","hidden");
}
// this hides the enhanced items and turns the display link back on
function showFewerNavigatorItems(id) {
ChangeClassName(id, "hidden");
ChangeClassName(id + "Control", "visible");
}
