﻿// JScript File

function openInBareWindow(url, name) {
  window.open(url, name, "scrollbars=no,toolbar=no;menubar=no,titlebar=no,status=no");
}

//////////////////////////////////////////////
//
//   Hide and show layer functions

function hideLayer(whichLayer) {
    if (document.getElementById) {
        if (document.getElementById(whichLayer)) {
            document.getElementById(whichLayer).style.display = "none";
        }
    } else if (document.all) {
        if (document.all[whichlayer]) {
            document.all[whichlayer].style.display = "none";
        }
    } else if (document.layers) {
        if (document.layers[whichLayer]) {
            document.layers[whichLayer].display = "none";
        }
    }
}

function showLayer(whichLayer) {
    if (document.getElementById) {
        if (document.getElementById(whichLayer)) {
            document.getElementById(whichLayer).style.display = "block";
        }
    } else if (document.all) {
        if (document.all[whichlayer]) {
            document.all[whichlayer].style.display = "block";
        }
    } else if (document.layers) {
        if (document.layers[whichLayer]) {
            document.layers[whichLayer].display = "block";
        }
    }
}

function hideAllFlash() {
    hideLayer('flashiframe01');
    hideLayer('flashiframe02');
    hideLayer('flashiframe03');
    hideLayer('flashiframe04');
    hideLayer('flashiframe05');
    hideLayer('flashiframe06');
    hideLayer('flashiframe07');
    hideLayer('flashiframe08');
    hideLayer('flashiframe09');
    hideLayer('flashiframe10');
}

function showAllFlash() {
    showLayer('flashiframe01');
    showLayer('flashiframe02');
    showLayer('flashiframe03');
    showLayer('flashiframe04');
    showLayer('flashiframe05');
    showLayer('flashiframe06');
    showLayer('flashiframe07');
    showLayer('flashiframe08');
    showLayer('flashiframe09');
    showLayer('flashiframe10');
}


//------------------------------------------------------------------------------------
// SDI Submenu
// Copyright © 2005 Site-Drive Inc. All Rights Reserved.
// CONTACT INFO: Send all inquiries to scripts@site-drive.com
// FILE CREATED: November 16, 2005
// LAST MODIFIED: February 20, 2006
//------------------------------------------------------------------------------------
var SDIsubNowShowing = null;
var SDIsubTimer = null;
var SDIsubDefault = null;

function sdi_Navigation(subID) {
	sdi_subHideNow();//Immediately hides any open subnavigation
	sdi_subShow(subID);
}
function sdi_setNavigation(subID){
	SDIsubDefault = subID;
	sdi_Navigation(SDIsubDefault);
}

function sdi_subHide(){
	SDIsubTimer = setTimeout("sdi_subHideNow()", 1000);	
}

// Hide all except the given submenu
function sdi_subHideExcept(subID){
    SDIsubTimer = setTimeout("sdi_Navigation('" + subID + "')", 1000);
}

function sdi_subHideNow(){
sdi_subShowContinued();//Stop timer
	if(SDIsubNowShowing && SDIsubNowShowing != SDIsubDefault){
		sdi_setInactive(SDIsubNowShowing);//Close 
	}	
	if(SDIsubDefault){sdi_setCurrent(SDIsubDefault);}
	SDIsubNowShowing = null;	
}

function sdi_subShow(subID){
sdi_subShowContinued();//Stop timer
	if(SDIsubDefault && subID != SDIsubDefault){sdi_setInactive(SDIsubDefault);}
	sdi_setCurrent(subID);
	if(!SDIsubNowShowing){SDIsubNowShowing= subID};
}

function sdi_subShowContinued(){
	if(SDIsubTimer){clearTimeout(SDIsubTimer);}
	SDIsubTimer = null;
}

function sdi_setCurrent(m){
    document.getElementById("sub" + m).style.display = "block";
	//document.getElementById(m).className = "current";
}

function sdi_setInactive(m){
	document.getElementById("sub"+m).style.display = "none";
	//document.getElementById(m).className = "";
}


function openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
  return false;
}

