//font size functions
//function must be on top
menuFlag = false;
function getQuery(name) 
{
	var strQuery = window.location.search;
	var startOfSource = strQuery.indexOf(name + "=");
	//var endOfSource = strQuery.indexOf("&", startOfSource + 2);
	var endOfSource = strQuery.length;
	return strQuery.substring(startOfSource + 3, endOfSource);
		
}
	
function getURL()
{
	theUrl = document.URL;
	return theUrl.substring(0, theUrl.indexOf("?"));
}

	
function fontLarger()
{
	var fSize = getQuery('fs');
	if (fSize.length == 0)
	{
		if (getCookie("fontSize"))
		{
			fSize = parseInt(getCookie("fontSize"));
			if(eval(fSize < 16)) window.location = document.URL + "?fs=" + (fSize + 2);
			setCookie("fontSize", fSize);
		}
		else
		{
		window.location = document.URL + "?fs=14";
		setCookie("fontSize", "14")
		}
	}
	else
	{
		if (eval(fSize < 16)) 
		{
			window.location = getURL() + "?fs=" + (parseInt(fSize) + 2);
			setCookie('fontSize', (parseInt(fSize) + 2));
		}
		else
		{
			return;
		}
	}
}


function fontSmaller()
{
	var fSize = getQuery("fs");
	if (fSize.length == 0)
	{
		if (getCookie("fontSize"))
		{
			fSize = parseInt(getCookie("fontSize"));
			if(eval(fSize > 10)) window.location = getURL() + "?fs=" + (fSize - 2);
			setCookie("fontSize", fSize);
		}
		else
		{
		window.location = document.URL + "?fs=10";
		setCookie("fontSize", "10")
		}
	}
	else
	{
		if (eval(fSize > 10)) 
		{
			window.location = getURL() + "?fs=" + (parseInt(fSize) - 2);
			setCookie('fontSize', (parseInt(fSize) - 2));
		}
		else
		{
			return;
		}
	}
}


//rollover functions
if (document.images) {

function imgAct(imgName) {
        if (document.images) {
                document[imgName].src = eval(imgName + "on.src");
               
                }
        }

function imgInact(imgName) {
        if (document.images) {
                document[imgName].src = eval(imgName + "off.src");
               
                }
        }

}	

//cookie functions
function setCookie(name, value, expires) {
	document.cookie = name + "=" + escape(value) + "; path=/" +
	((expires ==null) ? "" : "; expires=" +
	expires.toGMTString());
}

function getCookie(name){
        var cname = name + "=";
        var dc = document.cookie; 
        if (dc.length > 0) {         
                begin = dc.indexOf(cname); 
                if (begin != -1) { 
                     begin += cname.length; 
                     end = dc.indexOf(";", begin);
                     if (end == -1) end = dc.length; 
                           return unescape(dc.substring(begin, end));
                }
        }
	return null;
}

function deleteCookie(name)
{
	var threeDays = 3 * 24 * 60 * 60 * 1000;
	var expDate = new Date();
	expDate.setTime(expDate.getTime() - threeDays);
	document.cookie = name + "=clearMe; expires=" + expDate.toGMTString();
}

//tmtC_cssOnBrowser
tmt_css_NN = "../../lifescan_ns.css";
tmt_css_IE = "../../lifescan.css";
if(document.layers){
   document.write("<link rel='stylesheet' href='" + tmt_css_NN + "' type='text/css'>");
}
else{
   document.write("<link rel='stylesheet' href='" + tmt_css_IE + "' type='text/css'>");
}//tmtC_cssOnBrowserEnd

function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}