﻿var ie5;
var ns6;
var blnFirstRun = false;

function startup() {
	ie5=document.all&&document.getElementById;
	ns6=document.getElementById&&!document.all;
}

function delayPositionThings() {
		setTimeout("positionThings()", 750);
}

function positionThings() {
	var pageSize = getPageSize();
	var pageHeight = (ie5 ? pageSize[1] : pageSize[3]);
	g("divOverlayLarge").style.height = g("tblMenu").offsetHeight + "px";
	g("divOverlayLarge").style.left = rxpos("tblMenu") + g("tblMenu").offsetWidth + "px";
	g("divOverlayLarge").style.top = rypos("tblMenu") + "px";
	
	g("divOverlaySmall").style.left = rxpos("tblMenu") + "px";
	g("divOverlaySmall").style.top = "0px";
	g("divOverlaySmall").style.width = rxpos("divOverlayLarge") + g("divOverlayLarge").offsetWidth - rxpos("tblMenu") + "px";
	
	g("divFlags").style.left = rxpos("divMain") + g("divMain").offsetWidth + p(crf*10) + "px";
	g("divFlags").style.top = p(crf*10) + "px";
	
	if(blnShowLawyers&&blnActiveLawyer || blnHideOverlayLarge == 1) {
		g("divOverlayLarge").style.display = "none";
	}

/*
	if (blnShowNewsbox == 1 && g("divNewsbox") && g("tblMenu") && g("imgTop"))
	{

		g("divNewsbox").style.left = rxpos("tblMenu") + "px";
		g("divNewsbox").style.top = g("imgTop").offsetHeight + "px";
	}
*/
}

function toggleInfo() {
	if(g('masterContainer1').style.display=="block") {
		g('masterContainer1').style.display = "none";
		g('documentContainer1').style.display = "none";
		g('arrowContainer1').style.display = "none";
		g('imgTextArea').style.display = "none";
		g('lukknap').style.display = "none";
	}
	else {
		g('masterContainer1').style.display = "block";
		g('documentContainer1').style.display = "block";
		g('arrowContainer1').style.display = "block";
		g('imgTextArea').style.display = "block";
		g('lukknap').style.display = "block";
	}
}

function printThis(v)
{ 
	if(v!=0) {
		document.forms.printform.printboat.value = v;
	}
	document.forms.printform.printwhat.value = document.getElementById("documentContainer").innerHTML;
	document.forms.printform.submit();
}

function printerfocus()
{
	printframe.focus();
	printframe.print();
}
