function leaveFidelity(URL) {

var message="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 preparation of the content supplied at the unaffiliated site and does not guarantee or assume any responsibility for its content";

if (confirm(message)) {
callupWindow = window.open (URL,"newwindow",config="height=380,width=617,left=80,top=80,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes,location=no,directories=no,status=no");
	}
}

var agt=navigator.userAgent.toLowerCase();
var is_major=parseInt(navigator.appVersion); 
var isNS4 = (agt.indexOf("mozilla/4")!= -1) && (agt.indexOf("msie")==-1);
var isNS6 = (agt.indexOf("netscape6")!= -1);
var isNS = (isNS4 || isNS6);
var isIE=(agt.indexOf("msie") != -1);
var isIE3=(isIE && (is_major < 4)); 
var isIE4 = (agt.indexOf("msie 4")!= -1);
var isIE5 = (agt.indexOf("msie 5")!= -1);
var isIE5up=(isIE  && !isIE3 && !isIE4 )? true : false;
var isIE6 = (agt.indexOf("msie 6")!= -1);
var isMac=(agt.indexOf("mac")!=-1);
var isMac68k=(this.mac && ( (agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1) ) );
var isMacppc=(this.mac && ( (agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1) || (agt.indexOf("mac_")!=-1)  ) );
if (isMac || isMac68k || isMacppc){
  isMac=true;
}else{ 
  isMac=false; 
}

function setCookie(name, value) {
  	document.cookie = name + "=" + escape(value) + ";path=/";
}

function launchLegal(url) {
     important = window.open(url,"important",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,height=400, width=480');
}

function openWindow(urlToLoad, theWidth, theHeight, theName, theOptions,virtual) {
  var windowWidth;
  var windowHeight;
  var windowOptions;
  if (theWidth != null || theWidth) {windowWidth = theWidth; } else { windowWidth = 700; }
  if (theHeight != null|| theHeight) {windowHeight = theHeight; } else { windowHeight = 500; }
  var windowName = (theName != null) ? (theName) : ("newWin");
  if (theOptions != null || theOptions) { windowOptions = ("width=" + windowWidth + ",height=" + windowHeight + "," + theOptions); } else { windowOptions = ("width=" + windowWidth + ",height=" + windowHeight + ",toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); }
  var newWin = window.open(urlToLoad, windowName, windowOptions);
  newWin.opener = self;
  newWin.focus();
  if (newWin.opener == null) newWin.opener = window;
}

function legalPop(){
alert('You are about to leave the Fidelity Web site for a Web site\n that is unaffiliated with Fidelity. Fidelity has not been involved\n in the preparation of the content supplied at the unaffiliated site \nand does not guarantee or assume any responsibility for its content.');
}

function legalPopCommercial(){
alert('This hyperlink will leave the Fidelity Investments Web site. \nThe link is provided to a third party Web site and Fidelity \ndoes not guarantee that the information supplied is \naccurate, complete or timely, or make any warranties \nwith regard to the results obtained from its \nuse or otherwise.');
}

function legalPopEducational(){
alert('This hyperlink will leave the Fidelity Investments Web site. \nThe link is provided to a Web site that is for educational purposes, \nand Fidelity does not guarantee that the \ninformation supplied is accurate, complete or timely, \nor make any warranties with regard to the results \nobtained from its use or otherwise.');
}

function closeWindow() {
	self.close();
	return true;
}

function updateParent(newURL){
window.opener.top.location = newURL;
}
//funtion to show the user the current page they are on.
function showCurrentPage(accItem){  
    if (accItem){
    //document.getElementById(accItem).style.fontWeight = "bold"
    document.getElementById(accItem).parentNode.style.backgroundColor = "#BAD8EA";
  }
}

function printPopup(){
	var popUrl = document.location+"&print=true";
	window.open(popUrl,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=700, height=530");
}

function printClear(){
	document.getElementById("print").style.display = "none";
	objLinks = document.getElementsByTagName("a");
	for(i=0;i<objLinks.length;i++){
		objLinks[i].onclick="";
		objLinks[i].removeAttribute("href");
	}
	footer = document.getElementById("fidfooter");
	footer.width = "650";

}