//	Frames.js makes sure that the frames within the document work smoothly

function openFrame(whichFile) {
	top.location.href = "../Default.htm";
	DelCookie("open_file");
	SetCookie("open_file", whichFile);
}

function framed() {
	//	If there are no frames, i.e. length equals 0 which is a boolean false, load the file that defines the frames
	if (window.parent.frames.length) {
		if (window.parent.tree.document.readyState == "loading")
			return;
		else
			window.parent.tree.alignLink();
			
		// Check for an open TOC
		if (parent.tree.show == false) {
			// show the TOC toggle on the content page
			parent.content.document.all.contentTOCtogButton.style.visibility = "visible";
		}
		if (parent.tree.show == true && parent.toc.cols == "0,*") {
			// show the TOC toggle on the content page
			parent.tree.show = false
			parent.tree.tocResize();
			parent.tree.tocResize();  // run twice to open and reclose TOC on content pane from help section
		}
	}
	else
		openFrame(document.location.href);
}
