function enabledisable(chkSelfId)
{
	var chkSelfObj = document.getElementById(chkSelfId);
	changeTrBgCol(chkSelfObj);
}

function changeTrBgCol(chkObj)
{
	if(chkObj.checked == true)
	{
		chkObj.parentNode.className='blcontContainerBg';
		chkObj.parentNode.parentNode.className='blcontContainerBg';
	}
	else
	{
		chkObj.parentNode.className='wtcontContainerBg';
		chkObj.parentNode.parentNode.className='wtcontContainerBg';
	}
}



	document.include = function (url)
	{
		  if ('undefined' == typeof(url)) return false;
		  var p,rnd;
		  if (document.all){
		   // For IE, create an ActiveX Object instance
		   p = new ActiveXObject("Microsoft.XMLHTTP");
		  }
		  else {
		   // For mozilla, create an instance of XMLHttpRequest.
		   p = new XMLHttpRequest();
		  }
		  // Prevent browsers from caching the included page
		  // by appending a random  number
		  rnd = Math.random().toString().substring(2);
		  url = url.indexOf('?')>-1 ? url+'&rnd='+rnd : url+'?rnd='+rnd;
		  // Open the url and write out the response
		  p.open("GET",url,false);
		  p.send(null);
		  document.write( p.responseText );
	}

/****added by rahi****/

function chagecolor(id)
{

	var m = document.getElementById("chck" + id).checked;
	if (m == 1)
	{
	document.getElementById(id).className="changtoyello textnormal";
	}
	document.getElementById(id).className="changtoyello textnormal";

}

function chngeback(id)
{
	var m = document.getElementById("chck" + id).checked;
	if (m == 1)
	{
	document.getElementById(id).className="changtoyello textnormal";
	}
	else
	{
	document.getElementById(id).className="changtowhite textnormal";
	}
}

function togglecolor(id)
{
//document.getElementById("x").className="changtoyello"
var colr= document.getElementById(id).className
	if (colr=="changtowhite")
	{
		document.getElementById(id).className="changtoyello textnormal"
	}
	else if (colr=="changtoyello")
	{
		document.getElementById(id).className="changtowhite textnormal"
	}
}
function openFeedback(event, id) {
	
  var el, x, y;
  el = document.getElementById(id);
  if (window.event) 
  {
    x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop + + document.body.scrollTop;
  }
  else 
  {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }
  
  x = 525; y =80;
  el.style.left = x + "px";
  el.style.top  = y + "px";
  el.style.visibility = "visible";
}
function showPopupLayerView(divId,txtTitle,strContentDivId,e)
{
	var objContentDiv = document.getElementById(strContentDivId);
	var objDiv = document.getElementById(divId);
	if(objDiv == null && objContentDiv)
	{
		var claimsPopDiv = document.createElement("DIV")
		claimsPopDiv.setAttribute("id",divId)
		claimsPopDiv.className="claimspopupCls"
		claimsPopDiv.style.top=e.clientY+10;
		claimsPopDiv.style.left=e.clientX+10;
		
		var claimsTitleBarDiv = document.createElement("DIV");
		claimsTitleBarDiv.className="claimstitlebarpopupCls"
		claimsTitleBarDiv.onmousedown = function(){dragStart(event,divId)};

		var claimsTitleBarIcons = document.createElement("DIV");
		claimsTitleBarIcons.className="aright";
		
		//claimsTitleBarIcons.innerHTML='<a href="#" onclick="closeDisPop(\''+divId+'\')"><span class="linkClose">CLOSE</span></a><a href="#"><img src="images/pop_close_button.gif" alt="" width="9" height="9" border="0" hspace="5" vspace="5" align="absmiddle" onclick="closeDisPop(\''+divId+'\')"></a>'
		var contentDiv = document.createElement("DIV")
		contentDiv.className="clsContentDiv"
		
		var contentTitleDiv = document.createElement("DIV")
		contentTitleDiv.className="titleText"
		contentTitleDiv.innerHTML=txtTitle

		var contentDescDiv = document.createElement("DIV")
		contentDescDiv.className="txt";
		objContentDiv.style.display = '';
		contentDescDiv.appendChild(objContentDiv);

		claimsTitleBarDiv.appendChild(claimsTitleBarIcons);
		claimsPopDiv.appendChild(claimsTitleBarDiv);
		contentDiv.appendChild(contentTitleDiv);
		contentDiv.appendChild(contentDescDiv);
		claimsPopDiv.appendChild(contentDiv);
		document.body.appendChild(claimsPopDiv);
	}
	else
	{
		objDiv.style.display = 'none';
	}
}
function closeDisPop(divId)
{
	var objDiv = document.getElementById(divId)
	objDiv.style.display = 'none';
}
function showMenuTimernew()
{	
	
	var t=setTimeout("document.getElementById('myMenuConfirmationnew').style.visibility='hidden'",1200);	
	
}

/****added by rahi****/

/* Added By Karuna */
function showhideDiv(target,sender)
{
	document.getElementById(target).style.display='inline';
		document.getElementById(sender).style.display='none';
}
function download()
{

if(document.frmconfirm.printOption[0].checked)
	{document.location.href="m-confirmation.htm";}
if(document.frmconfirm.printOption[1].checked)
	document.location='requestFSKK.htm';
}
function FadeOut($WhichDiv) {
	for( var i = 0 ; i <= 100 ; i++ ) {
		   setTimeout( 'setOpac(\''+$WhichDiv+'\',' + (100 - i) + ')' , 8 * i );
	}
	setTimeout('ToggleDiv(\''+$WhichDiv+'\')', 8 * i);
	setOpac($WhichDiv,100); // set it to opaque (just in case)
}

// Function used to set the opacity of a div (from 0 to 10)
function setOpac( $WhichDiv, value ) {
	document.getElementById($WhichDiv).style.opacity = value / 100;
	document.getElementById($WhichDiv).style.filter = 'alpha(opacity=' + value + ')';
}

// Functions used to show Today's quick links on Home Page
function callLoader() 
{
			document.getElementById('loader').style.display='block'; document.getElementById('hidepoll').style.display='none';
				setTimeout("document.getElementById('loader').style.display='none';document.getElementById('showpoll').style.display='block';",1000);
	}
	function callLoader2() {
			document.getElementById('hidepoll').style.display='block';
			document.getElementById('showpoll').style.display='none';
	}
// Functions used for Fidelity News/Mutual Fund Tabs on Home Page
var	CurrentNewsSection = "First";
					var	FirstNewsSectionItems =	3;
					var	SecondNewsSectionItems = 2;
					function SelectNewsSection(Section)
						{
							//Resetting	styles
							document.getElementById("FirstNewsSectionLink").className =	"block";
							document.getElementById("SecondNewsSectionLink").className = "block";
							

							//Hiding containers
							document.getElementById("FirstNewsContainer").style.display	= "none";
							document.getElementById("SecondNewsContainer").style.display = "none";
						

							//Enabling style for selected tab
							document.getElementById(Section	+ "NewsSectionLink").className = "newsContainerSelectedTopLink";

							//Showing selected container
							this.isIE =	(window.ActiveXObject)?true:false;
							if(this.isIE){document.getElementById(Section +	"NewsContainer").style.display = "block";}
							else{document.getElementById(Section + "NewsContainer").style.display =	"block";}
							

							//Setting current tab
							CurrentNewsSection = Section;

						}
						function callLoaderRefresh() 
{
			document.getElementById('loader').style.display='block'; document.getElementById('myMenuSearch').style.display='none';
				setTimeout("document.getElementById('loader').style.display='none';",1000);
	}
	/* Functions for font resizing */
		 function LargeFont()
        {
			document.getElementById("resizeFonts").href="../css/LargeFont.css";
		document.getElementById("smallfont1").style.fontSize="10px"
			document.getElementById("smallfont1").style.fontWeight="normal";
			document.getElementById("smallfont1").style.cursor="pointer";
			
			document.getElementById("normaltext1").style.fontWeight="normal";
			document.getElementById("normaltext1").style.cursor="pointer";
		
			document.getElementById("Largefont").style.fontWeight="bold";
			document.getElementById("Largefont").style.cursor="text";
			 
        }
 function SmallFont()
        {
            document.getElementById("resizeFonts").href="../css/SmallFont.css";
			document.getElementById("smallfont1").style.fontSize="11px"
			document.getElementById("smallfont1").style.fontWeight="bold";
			document.getElementById("smallfont1").style.cursor="text";
			
			document.getElementById("normaltext1").style.fontWeight="normal";
			document.getElementById("normaltext1").style.cursor="pointer";
		
			document.getElementById("Largefont").style.fontWeight="normal";
			document.getElementById("Largefont").style.cursor="pointer";
        }
function SmallNormal()
{

	
document.getElementById("resizeFonts").href="";
 document.getElementById("smallfont1").style.fontSize="10px"
			document.getElementById("smallfont1").style.fontWeight="normal";
			document.getElementById("smallfont1").style.cursor="pointer";
			
			document.getElementById("normaltext1").style.fontWeight="bold";
			document.getElementById("normaltext1").style.cursor="text";
		
			document.getElementById("Largefont").style.fontWeight="normal";
			document.getElementById("Largefont").style.cursor="pointer";
			 
}