function writeHeader()
{
	document.write("<div class\"wrapper\">");
	document.write("<div class=\"sga_row1 spotted\">");
	document.write("<a class=\"sga_imglink\" href=\"index.htm\"><div class=\"sga_logo\"></div></a>");
	document.write("<div class=\"sga_header\">");
	document.write("<div class=\"sga_searchbar\"><br/><br/>");
	document.write("<form action=\"search.htm\" id=\"searchbox_000696051281913724587:kn2kqta6wwi\">");
	document.write("<input type=\"hidden\" name=\"cx\" value=\"000696051281913724587:kn2kqta6wwi\" />");
	document.write("<input type=\"hidden\" name=\"cof\" value=\"FORID:11\" />");
	document.write("<input type=\"text\" name=\"q\" size=\"25\" />");
	document.write("<br/><input type=\"submit\" name=\"sa\" value=\"Search\" class=\"sga_searchbutton\"/></form>");
	document.write("<script type=\"text/javascript\" src=\"http://www.google.com/coop/cse/brand?form=searchbox_000696051281913724587%3Akn2kqta6wwi&lang=en\"></script>");


	document.write("</div><div class=\"sga_menubar\">");

	createMainNav();

	document.write("</div></div></div>");

	document.write("<div class=\"sga_row2\">");
	document.write("<div id=\"breadCrumb\" class=\"sga_breadcrumb\"></div>");
	document.write("<div class=\"sga_toolbar\"><a class=\"sga_toolbarlink\" href=\"javascript:printwindowOpen()\">Print This Page</a>");
	document.write("&nbsp;&nbsp;|&nbsp;&nbsp;Text Size:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
	document.write("<input type=\"button\"  id=\"textLarge\" class=\"sga_textbutton\" onclick=\"changeSize('large');\" style=\"font-size: 13pt\" value=\"Aa\">");
	document.write("<input type=\"button\"  id=\"textMedium\" class=\"sga_textbutton\" onclick=\"changeSize('medium');\" style=\"font-size:11pt\" value=\"Aa\">");
	document.write("<input type=\"button\" id=\"textSmall\" class=\"sga_textbutton\" onclick=\"changeSize('small');\" style=\"font-size: 9pt\" value=\"Aa\">");

	
	document.write("</div></div>");

	document.write("<div class=\"sga_row3\"><div id=\"navBar\" class=\"sga_leftbar\">");

	document.write("</div><div id=\"mainContent\" class=\"sga_maincontent\">");
	
	


}



function writeFooter()
{
	document.write("</div><div class=\"sga_gutter\">");
	document.write("<div class=\"sga_copyrightinfo\">");
	document.write("<br/>");
	document.write("&copy; 2010 Services Group of America. All Rights Reserved.</div>");
	document.write("</div></div></div>");
	document.write("<div id=\"printTip\" class=\"sga_printtooltip\">Click for more information</div>");
	document.write("<div id=\"printBox\" class=\"sga_printinformation\"><div class=\"sga_closeicon\"><a href=\"javascript:printwindowClosed()\"><img border=\"0\" src=\"grfx/close.png\"></a></div><div class=\"sga_printtxt\">This page has been specifically formatted for optimal output on your printer. Click the print icon below to launch your browser's Print dialog and output the document in a printer-friendly format. To dismiss this box without printing, click the red X in the top left corner.</div><div class=\"sga_printicon\"><a href=\"javascript:printPage();\"><img src=\"grfx/printer.png\" border=\"0\"></a></div></div>");
	
	var side = document.getElementById("floatRight");
	var main = document.getElementById("mainContent");
	if ( side != null)
	{
		side.style.height = (main.offsetHeight + 150) + "px";
		
	}

	var styleCookie = getCookie("fontSize");
	if (styleCookie != null)
	{
	changeSize(styleCookie);
	}
	
	//GOOGLE ANALYTICS ADD-IN
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}


function doAnalytics()
{
		var pageTracker = _gat._getTracker("UA-3561708-4");
		pageTracker._initData();
		pageTracker._trackPageview();

}




function createBreadcrumb(title, barray)
{

	var str = "<a class=\"sga_breadcrumblink\" href=\"index.htm\">Home</a> :: ";
	if (barray != null || barray.length != 0)
	{
		for (var x = 0; x < barray.length; x++)
		{
			str += "<a class=\"sga_breadcrumblink\" href=\"" + barray[x].url + "\">" + barray[x].name + "</a> :: ";
		}
	}

	str += "<span id=\"breadcrumbLocation\" class=\"sga_breadcrumblocation\">" + title + "</span>";

	document.getElementById("breadCrumb").innerHTML = str;
}


function createMainNav()
{
	for (var x = 0; x < CAT.length; x++)
	{

	document.write("<a href=\"" + CAT[x].url + "\" class=\"sga_menulink\">" + CAT[x].name + "</a>");	
	if (x != (CAT.length - 1))
	{document.write("|");}
	}
}

function createSidebarNav(catNum, img, pagetitle)
{
var category = CAT[catNum];
var str = "<a href=\"" + category.url + "\" class=\"sga_maincategorylink\">" + category.name + "</a><br/>";
var cclass;
for (var x = 0; x < category.pages.length; x++)
{
	if (pagetitle != null && pagetitle == category.pages[x].name)
	{
	str += "<span class=\"sga_activesubcategorylink\">" + category.pages[x].name + "</span><br/>";
	}
	else
	{
	str += "<a href=\"" + category.pages[x].url + "\" class=\"sga_subcategorylink\">" + category.pages[x].name + "</a><br/>";
	}
}

if (img != null || img != "")
{
str += "<div class=\"sga_sideimg\" style=\"background-image: url(" + img + ");\"></div>";
}
document.getElementById("navBar").innerHTML = str;
}






function changeSize(sz)
{
	document.getElementById("textSmall").className =
	document.getElementById("textMedium").className =
	document.getElementById("textLarge").className = "sga_textbutton";

	var z;

	if (sz == "small")
	{
	z = "9pt";
	document.getElementById("textSmall").className = "sga_activetextbutton";
	}
	else if (sz == "medium")
	{
	z = "11pt";
	document.getElementById("textMedium").className = "sga_activetextbutton";
	}
	else if (sz == "large")
	{
	z = "13pt";
	document.getElementById("textLarge").className = "sga_activetextbutton";
	}

	document.getElementById("mainContent").style.fontSize = z;
	setCookie("fontSize", sz, getExpDate(180, 0, 0));  
}


function showPrinterDialog()
{
document.getElementById('printTip').style.display = "inline";
}


function hidePrinterDialog()
{
document.getElementById('printTip').style.display = "none";
}

function printwindowOpen()
{
document.getElementById('printBox').style.display = "inline";
}

function printPage()
{
printwindowClosed();
window.print();
}


function printwindowClosed()
{
document.getElementById('printTip').style.display = "none";
document.getElementById('printBox').style.display = "none";
}



///////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// COOKIES.JS ////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////




// utility function to retrieve a future expiration date in proper format;
// pass three integer parameters for the number of days, hours,
// and minutes from now you want the cookie to expire; all three
// parameters required, so use zeros where appropriate
function getExpDate(days, hours, minutes) {
    var expDate = new Date();
    if (typeof days == "number" && typeof hours == "number" && typeof hours == "number") {
        expDate.setDate(expDate.getDate() + parseInt(days));
        expDate.setHours(expDate.getHours() + parseInt(hours));
        expDate.setMinutes(expDate.getMinutes() + parseInt(minutes));
        return expDate.toGMTString();
    }
}

// utility function called by getCookie()
function getCookieVal(offset) {
    var endstr = document.cookie.indexOf (";", offset);
    if (endstr == -1) {
        endstr = document.cookie.length;
    }
    return unescape(document.cookie.substring(offset, endstr));
}

// primary function to retrieve cookie by name
function getCookie(name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg) {
            return getCookieVal(j);
        }
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break; 
    }
    return null;
}

// store cookie value with optional details as needed
function setCookie(name, value, expires, path, domain, secure) {
    document.cookie = name + "=" + escape (value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

// remove the cookie by setting ancient expiration date
function deleteCookie(name,path,domain) {
    if (getCookie(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}