/* Generated by KSW */
/* DO NOT CHANGE THIS CODE MANUALLY */
     
var baseLoc = '';	// base of location.href; has no end slash

function getBaseLoc()
{
	var leftHREF = location.href;
	var len = leftHREF.lastIndexOf('/ksw/');	// length of base HREF
	
	baseLoc = leftHREF.substr(0, len);			// no slash at end
}

function getFrameWidth()
{ 
     var x = 188; 
     if (self.innerWidth) // all except Explorer 
     	x = self.innerWidth; 
     else if (document.body) // all Explorers except 6 strict
     	x = document.body.clientWidth; 
     else if (document.documentElement && document.documentElement.clientWidth) // Explorer 6 Strict Mode 
     	x = document.documentElement.clientWidth; 
     return x; 
} 

function getFrameHeight()
{ 
     var y = 800; 
     if (self.innerHeight) // all except Explorer 
     	y = self.innerHeight; 
     else if (document.body) // all Explorers except 6 strict
     	y = document.body.clientHeight; 
     else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode 
     	y = document.documentElement.clientHeight; 
     return y; 
}

function resizeMainDiv()
{
	var mainDiv= document.getElementById('mainDiv');
	var footerDiv = document.getElementById('footer');
	var extraHeight = footerDiv.offsetHeight + mainDiv.offsetTop;
	var fHeight = getFrameHeight();
	
	mainDiv.style.width = getFrameWidth();
	
	if (fHeight -  extraHeight > 0)
		mainDiv.style.height = fHeight -  extraHeight;
}

function closeFrame(strict)
{
     if ((window.parent.frames[1] == null) || (window.parent.frames[1] == undefined))
     	return false;
     if ((typeof(top.right.location.href) != 'string') || (top.right.location.href == ''))
     	return false;
     if (top.right.location.href.indexOf(baseLoc) == -1)
     	return false;
     if (strict == true && !top.right.document.getElementById('returnlinks'))
     	return false;
     top.location = top.right.location;	// will cause script error if top.right.location external
}

function addToFav()
{
 	alert(	"Add page to Favorites as follows:\n\n"		+
	 		"1. Close left frame.\n"					+
	 		"2. Add page to Favorites.\n\n"				+
	 		"(Return as usual by pressing 'Back')"		);
}
