﻿BswingPage = new function(){

	this._site_root = null;
	
	this.Init = function(site_root){
		this._site_root = site_root;					
		this.ReSize();
		
	}
	
	this.ReSize = function(){
		
		
		if($("functionTab")){
			var pos = Math.floor(((YAHOO.util.Dom.getViewportWidth() - 774) / 2) + 422);
						
			if(document.all){
				$("functionTab").style.left = pos + "px";
				$("functionTab").style.top = 58 + "px";
			} else {
				$("functionTab").style.left = pos + "px";
				$("functionTab").style.top = 59 + "px";
			}
		}
	}
		
}

/*===============================================

quickLinks

uses form select menu to change page location

================================================*/

function quickLinks(){

	var slct = document.quickLinksForm.qLinks.options[document.quickLinksForm.qLinks.selectedIndex].value;

	if (slct !== "null"){

		document.location=slct;

		}

}

/***************************************************
 the following functions hide and show divs for the 
 'Addtionl Information' text
****************************************************/

function hideDivs(exempt)  {
	 if (!document.getElementById) {
      return null;
    }
    if (!exempt) exempt = "";
    var divs =
      document.getElementById("div");
    for(var i=0; i < divs.length; i++)
    {
      var div = divs[i];
      var id = div.id;
      if ((id != "firstDoc") &&
		(id != exempt))
      {
        div.style.display = "none";
      }
    }
  }
  
  function hide(what) {
	 if (!document.getElementById) {
      return null;
    }
    hideWhat =
      document.getElementById(what);
    hideWhat.style.display = "none";
    
  }
  
  function show(what,other)  {
	 if (!document.getElementById) {
      return null;
    }
    showWhat =
      document.getElementById(what);
    showWhat.style.display = "block";
    hide(other);
  }




/* 
 * pop-up window functions
*/



function bswPopUp(url, name, width, height, scroll) {
	var properties = "scrollbars=" + scroll + ",width=" + width + ",height=" + height + ",resizable=yes"; 
	var bswPopUpWin = window.open(url, name, properties);
	bswPopUpWin.focus();
}


function popUpWin(url, name, width, height, scroll) {
	var properties = "scrollbars=" + scroll + ",width=" + width + ",height=" + height + ",resizable=yes"; 
	var bswPopUpWin = window.open(url, name, properties);
	bswPopUpWin.focus();
}

