
/*
Copyright 1997-2008 BigBearLake.Net
All Rights Reserved
Written 2000 Sacha Berwin
Updated 2008 Sacha Berwin
CA Tools Ver. 3.1
*/
var warning="Right mouse button clicking on this web site is disabled!  Sorry BIGBEARLAKE.NET Staff. If you would like to open a link in a new window, hold SHIFT on the keyboard and click on the link.";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(warning);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(warning);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;



function OpenADWindow(strURL)
		{
		window.open(strURL, '_blank', 'location=no,resizable=yes,status=no,toolbar=yes,menubar=no,width=630,height=400');
		}



closeSubMenu = '0';


var isIE4 = document.all ? 1 : 0;
var isIE5 = (isIE4 && navigator.appVersion.indexOf("5.")) >= 0 ? 1 : 0;
var isIE6 = (isIE4 && navigator.appVersion.indexOf("6.")) >= 0 ? 1 : 0;
var isN4 = (navigator.appName.indexOf("Netscape") >= 0 &&
                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
var curLayer = '';
var fade,fo;
fade = 0;
				
function showLayer(layer) 
{
  curLayer = layer;
  if (isN4) {layer.visibility = 'show';}
  if (isIE4) {layer.style.visibility = 'visible';}
}


function clipLayer(layer, clipleft, cliptop, clipright, clipbottom) {

  if (isN4) 
  {
    layer.clip.left   = clipleft;
    layer.clip.top    = cliptop;
    layer.clip.right  = clipright;
    layer.clip.bottom = clipbottom;
  }
  if (isIE4)
  	{
    layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' ' + clipleft +')';
	}
}


function showMenu(itemID)
{
	fade = 0;
	closeSubMenu = '0';
	if (curLayer !== '') 
	{
		hideMenu(curLayer);
	}
	curLayer = itemID;
	if (isN4) 
	{
		document.getElementById(itemID).style.display = 'block';
	}
  	else if(navigator.appVersion.match(/MSIE 6./))
	{
		document.getElementById(itemID).style.display = 'block';
	}
	else
	{
		document.getElementById(itemID).style.display = 'block';
	}
}


function fadeIn()
{

if(fade<90){
fade+=50;
fo.filters.alpha.opacity  = fade;
setTimeout('fadeIn()', 0);
}
if(fade>=90){	

fo.filters.alpha.opacity  = 92;

}
}





function hideMenu(itemID)
{
	if (isN4) {document.getElementById(itemID).style.display = 'none';}
	else if (isIE4) {document.getElementById(itemID).style.display = 'none';}
	else {document.getElementById(itemID).style.display = 'none';}
}

function hideMenu2(itemID)
{
	hideMenu(curLayer);
}

function hideAllMenus()
{
Menu1.style.visibility = 'hidden';

}

function onMenu()
{
	closeSubMenu = '0';
}

function closeMenu(menu)
{
	if (closeSubMenu == '1')
	{
		hideMenu(menu);
	}
}

function btnTime(menu,timeout)
{
	closeSubMenu = '1';
	setTimeout('closeMenu(\'' + menu + '\')',timeout);
}

function createSubMenuChoice(subName,link)
{
	document.write("<TR><TD WIDTH='5' BGCOLOR='#2E5BA7'></TD><TD BGCOLOR='#2E5BA7'><A HREF='" + link + "'>" + subName + "</A></TD></TR>");
}

function createSubMenu(top,left,divID,tblID)
{
	document.write("<DIV ID='" + divID + "' STYLE='POSITION : absolute; Z-INDEX : 1; TOP : " + top + "; LEFT : " + left + "; VISIBILITY : hidden;'>");
	document.write("<TABLE ID='" + tblID + "' BORDER='0' WIDTH='150' HEIGHT='' CELLPADDING='0' CELLSPACING='0' onMouseOver='onMenu()' onMouseOut='btnTime(" + divID + ",100)'>");
}

function createSubMenuEnd()
{
	document.write("</TABLE></DIV>");
}


function createMenu()
{
	document.write("<TABLE ID='mTitle' VALIGN='top' WIDTH='100%' HEIGHT='20' CELLPADDING='0' CELLSPACING='0' BORDER='0'><TR>");

}

function createMenuTitle(title,link,divID)
{
	document.write("<TD WIDTH='' BGCOLOR='#2E5BA7'></TD><TD BGCOLOR='#2E5BA7' NOWRAP><A HREF='" + link + "' onMouseOver='showMenu(" + divID + ")' onMouseOut='btnTime(" + divID + ",2500)'><DIV>" + title + "</DIV></A></TD>");
}

function createMenuEnd()
{
	document.write("<TD BGCOLOR='#2E5BA7' WIDTH='' ></TD></TR></TABLE>");
}


function getLayer(name) {

  if (isN4){
    return findLayer(name, document);}
  if (isIE4) {  return eval('document.all.' + name);}

  return null;
}

function findLayer(name, doc) {

  var i, layer;

  for (i = 0; i < doc.layers.length; i++) {
    layer = doc.layers[i];
    if (layer.name == name){
      return layer;}
    if (layer.document.layers.length > 0) {
      layer = findLayer(name, layer.document);
      if (layer != null){
        return layer;}
    }
  }

  return null;
}