//' ******************************************************************************
//'	Name:			help_popup_window
//'	Description:	Displays a help window that will be customizable for each 
//'					link in the system
//'	Written by:		Kyle Parker
//'	Date:			April 4, 2001
//'	Stored procedures:	
//'	Stylesheet:					
//'	Server Side includes:		
//'	Components called:			
//'	Redirect:						
//' *******************************************************************************

function SelectIt(PageURL)
{
	var aw = screen.availWidth; var ah = screen.availHeight; aw = 400; ah = 400; url = PageURL;
	NewWindow=window.open(url,"_NewWindow_","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,left=100,top=10,width=600,height=" + ah)
}
function SelectItDim(PageURL,Width,Height)
{
	var aw = screen.availWidth; var ah = screen.availHeight; aw = Width; ah = Height; url = PageURL;
	NewWindow=window.open(url,"_NewWindow_","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,left=100,top=10,width="+aw+",height="+ah)
}
function SelectItToolbar(PageURL,Width,Height)
{
	var aw = screen.availWidth; var ah = screen.availHeight; aw = Width; ah = Height; url = PageURL;
	NewWindow=window.open(url,"_NewWindow_","toolbar=1,location=0,status=1,menubar=0,scrollbars=1,resizable=1,left=100,top=10,width="+aw+",height="+ah)
}


var fontSize   = 10;
var fontFamily = 'verdana,arial,tahoma';
function stSetObj() { stObj = (document.getElementById) ? document.getElementById('ArticleBodyText') : document.all('ArticleBodyText'); };
function Bigger() { fontSize += 1;  if (fontSize > 19) fontSize = 19; stSetObj(); stObj.style.fontSize = fontSize + 'pt'; stSavePrefs(); };
function Smaller() { fontSize -= 1; if (fontSize < 8) fontSize = 8; stSetObj(); stObj.style.fontSize = fontSize + 'pt'; stSavePrefs(); };function stSavePrefs()
{
	tCookie = 'stPrefs='; tCookie = tCookie + '^fontSize=' + fontSize + '^fontFamily=' + fontFamily; var expire = new Date ();
   	expire.setTime (expire.getTime() + (6 * 24 * 3600000));	expire = expire.toGMTString(); fCookie = tCookie + '; path=/; expires=' + expire; 
  	document.cookie = fCookie;
};
function stLoadPrefs()
{
	stPrefString = null; tArray = document.cookie.split(';');
	for (tA = 0; tA < tArray.length; tA++)
	{ if (tArray[tA].indexOf('stPrefs=') > -1) { tPos = tArray[tA].indexOf('=') + 2; stPrefString = tArray[tA].substring(tPos, tArray[tA].length); } }
	if (stPrefString != null)
	{
		tArray = stPrefString.split('^');
		for (tA = 0; tA < tArray.length; tA++)
		{
			if (tArray[tA].indexOf('fontSize') > -1) { tFontSize = tArray[tA].split('='); fontSize  = parseInt(tFontSize[1]); }
			if (tArray[tA].indexOf('fontFamily') > -1) { tFontFamily = tArray[tA].split('='); fontFamily  = (tFontFamily[1]); }
		}
	}
};
function stSetElm() { stSetObj(); stObj.style.fontSize = fontSize + 'pt'; stObj.style.fontFamily = fontFamily; stSavePrefs(); };
function stInit() { stLoadPrefs(); stSetElm(); };
