// Notation: Jared's proprietary Reverse Hungarian Notation
// A: Array
// AA: Associative Array
// C: Character string
// N: Numeric
// O: Object pointer
// L: Logical
// _LP: Local parameter

var LastDivShownC="default"
var LastDivShownO
var LastDivIDShown
var ViewerC
var LayoutCookieAA = new Array();

TimerIDN = 0;
DivIDC = "";

function ToggleVis(AffectedC_LP) {
  if (document.layers) {
    DivToShowO = document.layers[AffectedC_LP];
	if (document.layers[LastDivShownC]) {
		LastDivShownO = document.layers[LastDivShownC];
	}
  } else if (document.all) {
    DivToShowO = document.all(AffectedC_LP).style;
	if (document.all(LastDivShownC)) {
		LastDivShownO = document.all(LastDivShownC).style;
	}	
  }
  if (DivToShowO.visibility == visible) {
    DivToShowO.visibility = hidden;
  } else {
  	if (LastDivShownO) {
		LastDivShownO.visibility = hidden;
	}
    DivToShowO.visibility = visible;
  }
  LastDivShownC=AffectedC_LP;
}

function ShowLayer(DivIDC_LP) {
	var DivToShowO = document.getElementById(DivIDC_LP);
	DivToShowO.style.display = "block";
	DivToShowO.style.visibility = "visible";
}

function HideLayer(DivIDC_LP) {
	var DivToHideO = document.getElementById(DivIDC_LP);
	DivToHideO.style.display = "none";
}

function MoveLayer(DivIDC_LP,LeftN_LP,TopN_LP) {
	DivToMoveO = document.getElementById(DivIDC_LP);
	DivToMoveO.style.pixelLeft = (LeftN_LP);
	DivToMoveO.style.pixelTop = (TopN_LP);
}

function LinkExpand(DivIDC_LP,DelayN_LP) {
	DivIDC = DivIDC_LP;
	TimerIDN = setTimeout("ShowLayer(DivIDC)",DelayN_LP);
}

function LinkRetract(DivIDC_LP) {
	clearTimeout(TimerIDN);
	HideLayer(DivIDC_LP);
}

function readCookie(CookieNameC_LP, ReturnAA_LP) {
	if (document.cookie=='') {
		return false;
	}
	var AllCookiesC = document.cookie;
	var AllCookiesA = AllCookiesC.split(";");
	var AllCookiesAA = new Array();
	var PairTempA = new Array();
	var SelectedCookieC = "";
	for (CounterN = 0; CounterN < AllCookiesA.length; CounterN++) {
		PairTempA= AllCookiesA[CounterN].split("=");
		AllCookiesAA[PairTempA[0]]=PairTempA[1];
		if (PairTempA[0]==CookieNameC_LP) {
			SelectedCookieC=PairTempA[1];
		}
	}
	SelectedCookieA = SelectedCookieC.split("&");
	var StoredPairC = ""
	for (CounterN = 0; CounterN < AllCookiesA.length; CounterN++) {
		StoredPairC = unescape(SelectedCookieA[CounterN]);
		PairTempA = StoredPairC.split(":");
		ReturnAA_LP[unescape(PairTempA[0])]=unescape(PairTempA[1]);
	}
}


//readCookie("jared_homesite_cookie",LayoutCookieAA);
//ViewerC=LayoutCookieAA["user"];
