
function chgTDBg(oObj, sColor)
{	if (IE4 || DOM) 
	{	//IE4	
		oObj.style.backgroundColor = sColor;
	}
  	else if (NS4) 
	{	//NS 4	
		oObj.bgColor = sColor;
	}
}

function chgTextColor(oObj, sColor)
{	if (IE4 || DOM) 
	{	//IE4	
		oObj.style.color = sColor;
	}
  	else if (NS4) 
	{	//NS 4	
		document.oObj.color = sColor;
	}
}

function leaveFidelity(sUrl)
{	var sPrompt = "You are about to leave the Fidelity web site for a web site that is unaffiliated with Fidelity.  Fidelity has not been involved in the preperation of the content supplied at the unaffiliated site and does not guarantee or assume any responsibility for its content.";
	var nAnswer = confirm(sPrompt);
	
	if (nAnswer == 1)
	{	openWindow(sUrl);
	}
	else
	{	return;
	}
}

function leaveNF(sUrl)
{	var sPrompt = "You are about to leave the National Financial web site to a web site that is unaffiliated with National Financial. National Financial has not been involved in the preparation of the content supplied at the unaffiliated site and does not guarantee or assume any responsibility for its content.";
	var nAnswer = confirm(sPrompt);
	
	if (nAnswer == 1)
	{	openWindow(sUrl);
	}
	else
	{	return;
	}
}

function openWindow(sUrl)
{	var sName = "winLink";
	var sFeatures = "width=750,height=500,top=50,left=50,scrollbars=yes,menubar=yes,toolbar=yes,resizable=yes" 
	
	oWinWeb = window.open(sUrl, sName, sFeatures);
	oWinWeb.focus();
}

function openPDF(sUrl)
{	var sName = "winPDF";
	var sFeatures = "width=750,height=500,top=50,left=50,scrollbars=yes,menubar=no,toolbar=no,resizable=yes" 
	
	oWinPDF = window.open(sUrl, sName, sFeatures);
	oWinPDF.focus();
	
}

function openLegal(sUrl)
{	var sName = "winLegal";
	var sFeatures = "width=734,height=500,top=50,left=50,scrollbars=yes,menubar=yes,toolbar=no,resizable=yes" 
	
	window.open(sUrl, sName, sFeatures);
}

function openImage(sUrl)
{	var sName = "winImage";
	var sFeatures = "width=605,height=450,top=50,left=50,scrollbars=no,menubar=yes" 
	
	window.open(sUrl, sName, sFeatures);
}

function swapBox(sBox, sHeading, sText, sBoxColor, sTextColor, sTextColor2)
{	var oBox = document.getElementById(sBox);
	oBox.style.backgroundColor = sBoxColor;
	
	var oHeading = document.getElementById(sHeading);
	oHeading.style.color = sTextColor;
	
	var oText = document.getElementById(sText);
	oText.style.color = sTextColor2;
}

function swapLayer(oLayer, sBGColor)
{	oLayer.bgColor = sBGColor;
}

function swapBGColor(oObject, sColor)
{	oObject.style.backgroundColor = sColor;
}

function swapTextColor(sID, sColor)
{	var oObject = document.getElementById(sID);
	oObject.stlye.color = sColor;
}

function gotoPage(sUrl)
{	window.location = sUrl;
}



// ==============================web trends cookie ===========================
var WT=new Object();
function dcsGetCookie(name){
	var pos=document.cookie.indexOf(name+"=");
	if (pos!=-1){
		var start=pos+name.length+1;
		var end=document.cookie.indexOf(";",start);
		if (end==-1){
			end=document.cookie.length;
		}
		return unescape(document.cookie.substring(start,end));
	}
	return null;
}


function dcsGetCrumb(name,crumb){
	var aCookie=dcsGetCookie(name).split(":");
	for (var i=0;i<aCookie.length;i++){
		var aCrumb=aCookie[i].split("=");
		if (crumb==aCrumb[0]){
			return aCrumb[1];
		}
	}
	return null;
}

function dcsFPC(offset){
	var gFpc="WEBTRENDS_FPCRET";
	if (!offset){
		return;
	}
	var name=gFpc;
	var dCur=new Date();
	dCur.setTime(dCur.getTime()+(dCur.getTimezoneOffset()*60000)+(offset*3600000));
	var dExp=new Date(dCur.getTime()+315360000000);
	var dSes=new Date(dCur.getTime());
	if (document.cookie.indexOf(name+"=")!=-1){
		WT.co_f=dcsGetCrumb(name,"id");
		var dLst=new Date(parseInt(dcsGetCrumb(name,"lv")));
		dSes.setTime(parseInt(dcsGetCrumb(name,"ss")));
		if ((dCur.getTime()>(dLst.getTime()+1800000))||(dCur.getTime()>(dSes.getTime()+28800000))){
			dSes.setTime(dCur.getTime());
			WT.vt_f_s=1;
		}
		if ((dCur.getDay()!=dLst.getDay())||(dCur.getMonth()!=dLst.getMonth())||(dCur.getYear()!=dLst.getYear())){
			WT.vt_f_d=1;
		}
	}
	else{
		var tmpname=name+"_TMP=";
		document.cookie=tmpname+"1";
		if (document.cookie.indexOf(tmpname)!=-1){
			document.cookie=tmpname+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";
			if ((typeof(gWtId)!="undefined")&&(gWtId!="")){
				WT.co_f=gWtId;
			}
			else{
				WT.co_f="1";
				for (var i=2;i<=32;i++){
					WT.co_f+=Math.floor(Math.random()*16.0).toString(16);
				}
				WT.vt_f="1";
			}
			WT.vt_f_s=1;
			WT.vt_f_d=1;
		}
		else{
			WT.vt_f=2;
			return;
		}
	}
	WT.vt_sid=WT.co_f+"."+dSes.getTime();
	document.cookie=name+"="+"id="+WT.co_f+":lv="+dCur.getTime()+":ss="+dSes.getTime()+"; expires="+dExp.toGMTString()+"; path=/"+(((typeof(gFpcDom)!="undefined")&&(gFpcDom!=""))?("; domain="+gFpcDom):(""));
	// Set the value to just WT.co_f.  We do not need the other values since they are used by advanced tracking
	document.cookie="WEBTRENDS_RET"+"="+WT.co_f+"; expires="+dExp.toGMTString()+"; path=/"+(((typeof(gFpcDom)!="undefined")&&(gFpcDom!=""))?("; domain="+gFpcDom):(""));
}

dcsFPC(-5);