
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetAction_ACS_WC
	' Description:       Function called before the getPorfolioData function of control panel so asto decide
	'                    whether to load Quest Analysis page or not
	'
	' Created by :       106695, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       30/09/2003, 
	'
	' Parameters :       argAction
	'--------------------------------------------------------------------------------*/
	function jfn_SetAction_ACS_WC(argAction)
	{ 	  
	  intAction = "1" 
	  
	  if (argAction=="0")
	  { 
	    intAction =  "0"	    
	  }
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowAbout
	' Description:       Function called when the Show About link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	'--------------------------------------------------------------------------------*/
	function jfn_ShowAbout(){
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()	
		if (!winAboutQuest)
			winAboutQuest = window.open("AboutQuest.asp","_blank", strOptions)  
		else {
			if (!winAboutQuest.closed)
				winAboutQuest.focus();
			else
				winAboutQuest = window.open("AboutQuest.asp","_blank",  strOptions)

		}	
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_Disclaimer
	' Description:       Function called when the Disclaimer link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	'--------------------------------------------------------------------------------*/
	function jfn_Disclaimer(){
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()
		if (!winDisclaimer) 
			winDisclaimer = window.open("Disclaimer.asp","_blank", strOptions)
		else {
			if (!winDisclaimer.closed)
				winDisclaimer.focus();
			else
				winDisclaimer = window.open("Disclaimer.asp","_blank", strOptions)
		}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SiteMap
	' Description:       Function called when the Site Map link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	'--------------------------------------------------------------------------------*/
	function jfn_SiteMap(){
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()		
		if (!winSitemap) 
			winSitemap = window.open("Sitemap.asp","_blank", strOptions)
		else {
		
			if (!winSitemap.closed)
				winSitemap.focus();
			else
				winSitemap = window.open("Sitemap.asp","_blank", strOptions)
			}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_MyQuest
	' Description:       Function called when the My Quest link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified  :		 102661- 10/9/2003 - Pass Token String in the Query String - PVCS defect # 163
	'--------------------------------------------------------------------------------*/
	function jfn_MyQuest(){
	
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()
	
		if (!blnLogin) {
			// if not logged in.. then nothing to do..
			alert(strNOT_LOGGED_IN)
			return
		}

		if (!winMyQuest) 
			//102661- 10/9/2003 - Pass Token String in the Query String - PVCS defect # 163
			//winMyQuest = window.open("../CM/MyQuest.asp?SystemUserID=" + document.frmTabChanged.hdnSystemUserID.value ,"_blank", strOptions)
			winMyQuest = window.open("../CM/MyQuest.asp?SystemUserID=" + document.frmTabChanged.hdnSystemUserID.value + "&TokenString=" +  document.frmTabChanged.hdnTokenString.value,"_blank", strOptions)
						//"resizable=no,status=no,toolbar=no,menubar=no,location=no,height=590,width=640,top=100,left=150,directories=no,scrollbars=yes")  
		else {
			if (!winMyQuest.closed)
				winMyQuest.focus();
			else
				//102661- 10/9/2003 - Pass Token String in the Query String - PVCS defect # 163
				//winMyQuest = window.open("../CM/MyQuest.asp?SystemUserID=" + document.frmTabChanged.hdnSystemUserID.value,"_blank", strOptions)
				winMyQuest = window.open("../CM/MyQuest.asp?SystemUserID=" + document.frmTabChanged.hdnSystemUserID.value + "&TokenString=" +  document.frmTabChanged.hdnTokenString.value,"_blank", strOptions)
								//"resizable=no,status=no,toolbar=no,menubar=no,location=no,height=590,width=640,top=100,left=150,directories=no,scrollbars=yes")  
			}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_QuestMail
	' Description:       Function called when the Quest Mail link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	'--------------------------------------------------------------------------------*/
	function jfn_QuestMail(){
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()

		if (!blnLogin) {
			// if not logged in.. then nothing to do..
			alert(strNOT_LOGGED_IN)
			return
		}

		if (!winQuestmail) 
			// QSTP - 3368 , added Token String in the query String passed 
			winQuestmail = window.open("QuestMail.asp?strUserID=" + document.frmTabChanged.hdnSystemUserID.value + "&strSetUsageData=" + document.frmQuestMail.hdnAddUsageData.value + "&hdnRandom=" + Math.random() + "&TokenString=" +  document.frmTabChanged.hdnTokenString.value,"_blank", strOptions)
		else {
			if (!winQuestmail.closed)
				winQuestmail.focus();
			else
				winQuestmail = window.open("QuestMail.asp?strUserID=" + document.frmTabChanged.hdnSystemUserID.value + "&strSetUsageData=" + document.frmQuestMail.hdnAddUsageData.value + "&hdnRandom=" + Math.random() + "&TokenString=" +  document.frmTabChanged.hdnTokenString.value,"_blank", strOptions)
			}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowHelp
	' Description:       Function called when the Show Help link from the Meta 
	'						Information is selected
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Page Identifier
	'--------------------------------------------------------------------------------*/
	function jfn_ShowHelp(strPageName){
	
		var strOptions = "resizable=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()
		if (!winHelp) 
			winHelp = window.open("../../Help/Help.asp?LinkTo=" + strPageName,"_blank", strOptions)
		else {
			if (!winHelp.closed)
				winHelp.close()
				winHelp = window.open("../../Help/Help.asp?LinkTo=" + strPageName,"_blank", strOptions)
			}
	}
	
	
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowWelcomeTab
	' Description:       Function called when the Welcome Tab is selected from the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified On:		 06/June/2002 19:40
	'--------------------------------------------------------------------------------*/
	function jfn_ShowWelcomeTab(){
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		// set values for the form variables
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(objForm.hdnSectorName.value == "Market Average")
			{
				objForm.hdnSectorID.value = objForm.hdnQuestGroupID.value;
			}
		}
		//end
		objForm.hdnAutoExecute.value			= true
		objForm.hdnCurrentEntity.value			= "WELCOME"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "WELCOME"
		// set target - Left frame
		objForm.target							= "fraLeft"
		// set action			
		objForm.action							= "../WC/WelcomeControlPanel.asp"	
		// submit form.
		objForm.submit()						

	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowQuestAnalysisTab
	' Description:       Function called when the Quest Analysis Tab is selected from 
	'						the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified 1:		 06/June/2002 19:46
	' Modified 2:		 13/Oct/2003 12:46; By:104304; Reason:To fix PVCS 209
	'--------------------------------------------------------------------------------*/
	function jfn_ShowQuestAnalysisTab()
	{
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		var intPosition
		var strLocation
		var strRootPath
		// set values for the form variables
		objForm.hdnAutoExecute.value			= true				
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(objForm.hdnSectorName.value == "Market Average")
			{
				objForm.hdnSectorID.value = objForm.hdnQuestGroupID.value;
			}
		}
		//end
		if (document.frmStore.hdnActivePool.value=='')
		{			
			objForm.hdnCurrentEntity.value	= "NO_COMPANY"
			
			objForm.hdnDisplayMode.value	= DIS_SHOW
			objForm.hdnFunctionToShow.value	= "QUEST_ANALYSIS"
			// set target - Left frame
			objForm.target					= "fraLeft"			
			
			
			//To fix PVCS 209
			//CR683v2 Firefox Support
			/*
			if (mBlnIE)
			{
				// set action
				objForm.action	= "../QA/QuestAnalysisBlankControlPanel.asp"							
				// submit form.
				objForm.submit() 
				return;
			}
			else
			{
				strLocation =  new String(window.parent.frames['fraContent'].location.href);
				strLocation = strLocation.toLowerCase()	
				intPosition = strLocation.indexOf("code",1)
				strRootPath = strLocation.substr(0,intPosition)
				// set action	
				objForm.action	= strRootPath + "Code/QA/QuestAnalysisBlankControlPanel.asp"			
				// submit form.
				objForm.submit()
				return;
			}
			*/
			// set action
			objForm.action	= "../QA/QuestAnalysisBlankControlPanel.asp"							
			// submit form.
			objForm.submit() 
			
			return;
			//CR683v2 Firefox Support
		} 
		
		// if current entity is set to nothing or functional area selected is not Quest analysis..
		// then we need to display the Summary page.
		if (objForm.hdnCurrentEntity.value == "" || objForm.hdnFunctionToShow.value != "QUEST_ANALYSIS")		
		{
			objForm.hdnCurrentEntity.value		= "SUMMARY"
		}		

		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "QUEST_ANALYSIS"
		// set target - Left frame
		objForm.target							= "fraLeft"					
		
		//CR683v2 Firefox Support
		/*
		//To fix PVCS 209
		if (mBlnIE)
		{
			// set action
			objForm.action	 = "../QA/QuestAnalysisControlPanel.asp"							
			// submit form.
			objForm.submit() 
			return;
		}
		else
		{
			strLocation =  new String(window.parent.frames['fraContent'].location.href);
			strLocation = strLocation.toLowerCase()	
			intPosition = strLocation.indexOf("code",1)
			strRootPath = strLocation.substr(0,intPosition)
			// set action
			objForm.action	 = strRootPath + "Code/QA/QuestAnalysisControlPanel.asp"			
			// submit form.
			objForm.submit() 
			return;
		}	
		*/
		//CR683v2 Firefox Support
		// set action
		objForm.action	 = "../QA/QuestAnalysisControlPanel.asp"							
		// submit form.
		objForm.submit() 
		

		
		return;
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_ShowSectorAnalysisTab()
	'
	' Description:	Function called when the Sector Analysis Tab is selected from 
	'				the Tabs.
	'
	' Reason	 :	Created for CR-1280v1 - Quest Website Sector Analysis
	'
	' Created by :  181154, HCL Technologies Ltd, Gurgaon, INDIA.	
	' 
	' Date-Time  :  15/04/2009, 05:30:00 PM
	'
	' Parameters :  Nil	
	'--------------------------------------------------------------------------------*/
	function jfn_ShowSectorAnalysisTab()
	{
		var objForm = document.forms['frmTabChanged'];
		//added by 189433 for cr1386v2
		/*if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';
		}*/
		//end
		objForm.hdnAutoExecute.value = true;	 		

		if ( document.frmStore.hdnSectorActivePool.value == '' )
		{			
			objForm.hdnCurrentEntity.value	= "NO_SECTOR";			
			objForm.hdnDisplayMode.value	= DIS_SHOW;
			objForm.hdnFunctionToShow.value	= "SECTOR ANALYSIS";
			
			objForm.target					= "fraLeft";		
			objForm.action					= "../SA/SectorAnalysisBlankControlPanel.asp";			
			objForm.submit();

			return;	
		} 
		
		if ( objForm.hdnCurrentEntity.value == "" || objForm.hdnFunctionToShow.value != "SECTOR ANALYSIS" )		
		{			
			objForm.hdnCurrentEntity.value	= "SECTOR_SUMMARY";
		}
		
		objForm.hdnDisplayMode.value		= DIS_SHOW;
		objForm.hdnFunctionToShow.value		= "SECTOR ANALYSIS";		
		
		objForm.target						= "fraLeft";	
		objForm.action						= "../SA/SectorAnalysisControlPanel.asp";		
		objForm.submit() 
		
		return;		
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowPortfolioTab
	' Description:       Function called when the Show Portfolio Tab is selected from 
	'						the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified On:		 06/June/2002 20:00
	'--------------------------------------------------------------------------------*/
	function jfn_ShowPortfolioTab(){
	// commented code which takes care of data retaining
		// variable to hold form reference
		var objMasterForm = document.forms['frmTabChanged']
		var objForm = document.frmCompareControlPanel
		
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(document.frmTabChanged.hdnSectorName.value == "Market Average")
			{
				document.frmTabChanged.hdnSectorID.value = document.frmTabChanged.hdnQuestGroupID.value;
			}
		}
		//end
		
		// set values for the form variables
		if(objForm.hdnAutoExec.value=="")
		{
			objForm.hdnAutoExec.value			= true	
		}
	
		objMasterForm.hdnCurrentEntity.value	= "PORTFOLIO"
		objMasterForm.hdnFunctionToShow.value	= "PORTFOLIO"
		objForm.hdnCurrentEntity.value			= "PORTFOLIO"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "PORTFOLIO"
		// set target - Left frame
		objForm.target							= "fraLeft"
		// set action			
		objForm.action							= "../PR/QuestCompareControlPanel.asp"	
		// submit form.
		objForm.submit()		
				
	/*	// original code
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		objForm.hdnAutoExecute.value			= true				// set values for the form variables
		objForm.hdnCurrentEntity.value			= "PORTFOLIO"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "PORTFOLIO"
		
		objForm.target							= "fraLeft"			// set target - Left frame
		objForm.action							= "../PR/QuestCompareControlPanel.asp"	// set action
		
		objForm.submit()						// submit form.*/
		
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowScreenforStocks
	' Description:       Function called when the Screen for Stocks Tab is selected 
	'						from the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified On:		 06/June/2002 20:01
	'--------------------------------------------------------------------------------*/
	function jfn_ShowScreenforStocks(){
		//commented  code which takes care of data retaining
		// variable to hold form reference
		//var objForm = document.forms['frmTabChanged']
		
		var objMasterForm = document.forms['frmTabChanged']
		var objForm		  = document.frmSearchControlPanel  
		
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(document.frmTabChanged.hdnSectorName.value == "Market Average")
			{
				document.frmTabChanged.hdnSectorID.value = document.frmTabChanged.hdnQuestGroupID.value;
			}
		}
		//end
		// set values for the form variables
		if(objForm.hdnAutoExec.value=="")
		{
			objForm.hdnAutoExec.value			= true	
		}
		// set values for the form variables
		objForm.hdnCurrentEntity.value			= "SEARCH"
		objMasterForm.hdnCurrentEntity.value	= "SEARCH"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "SEARCH"
		objMasterForm.hdnFunctionToShow.value	= "SEARCH"
		// set target - Left frame
		objForm.target							= "fraLeft"
		// set action			
		objForm.action							= "../SS/SearchControlPanel.asp"	
		// submit form.
		objForm.submit()						
		
		/*//original code
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		objForm.hdnAutoExecute.value			= true				// set values for the form variables
		objForm.hdnCurrentEntity.value			= "SEARCH"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "SEARCH"
		
		objForm.target							= "fraLeft"			// set target - Left frame
		objForm.action							= "../SS/SearchControlPanel.asp"	// set action
		
		objForm.submit()						// submit form.*/
	}
	
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetValuationDataItemId
	' Description:       Function is called to set the Valuation and Non-Valuation items
	'					 selected in the Data Item charting Screen.
	'
	' Created by :       102661, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 
	' 
	' Date-Time  :       26/06/2003, 10:30:00 AM
	'
	' Parameters :       CR 252
	' Modified   :       104315.. CR447	
	'--------------------------------------------------------------------------------*/
	function jfn_SetValuationDataItemId(argID,argDesc)
	{
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged'] 
		
		objForm.hdnValuationItem.value = argID
		objForm.hdnValuationItemDesc.value = argDesc
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetNonValuationDataItemId
	' Description:       Function is called to set the Valuation and Non-Valuation items
	'					 selected in the Data Item charting Screen.
	'
	' Created by :       102661, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 
	' 
	' Date-Time  :       26/06/2003, 10:30:00 AM
	'
	' Parameters :       CR 252
	'--------------------------------------------------------------------------------*/
	function jfn_SetNonValuationDataItemId(argID,argDesc)
	{
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged'] 
		
		objForm.hdnNonValuationItem.value = argID
		objForm.hdnNonValuationItemDesc.value = argDesc
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetSAValuationDataItemId
	'
	' Description:       Function is called to set the Valuation and Non-Valuation items
	'					 selected in the Data Item charting Screen.
	'
	' Created by :       181154, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       27/05/2009, 10:30:00 AM
	'--------------------------------------------------------------------------------*/
	function jfn_SetSAValuationDataItemId(argID,argDesc)
	{
		var objForm = document.forms['frmTabChanged'];	// variable to hold form reference
		
		objForm.hdnSAValuationItem.value		= argID;
		objForm.hdnSAValuationItemDesc.value	= argDesc;
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetSANonValuationDataItemId
	'
	' Description:       Function is called to set the Valuation and Non-Valuation items
	'					 selected in the Data Item charting Screen.
	'
	' Created by :       181154, HCL Technologies Ltd, Gurgaon, INDIA.
	'
	' Date-Time  :       27/05/2009, 10:30:00 AM
	'--------------------------------------------------------------------------------*/
	function jfn_SetSANonValuationDataItemId(argID,argDesc)
	{
		var objForm = document.forms['frmTabChanged'];	// variable to hold form reference 
		
		objForm.hdnSANonValuationItem.value		= argID;
		objForm.hdnSANonValuationItemDesc.value = argDesc;
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetPageVariables
	' Description:       Function is called to set the Current Entity and Function Name
	'
	' Created by :       102661, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 
	' 
	' Date-Time  :       04/04/2003, 10:30:00 AM
	'
	' Parameters :       argEntityName, argFunctionName
	' Modified On:		 
	'--------------------------------------------------------------------------------*/
	function jfn_SetPageVariables(argEnt, argFnc)
	{
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		objForm.hdnCurrentEntity.value			= argEnt
		objForm.hdnFunctionToShow.value			= argFnc
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowTriangleTab
	' Description:       Function called when the Triangle Tab is selected from the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified On:		 06/June/2002 20:03
	' Modified	 :	29/Jan/2004 2:26; By:104315; Reason:PVCS 305
	'--------------------------------------------------------------------------------*/
	function jfn_ShowTriangleTab(){

		// variable to hold form reference
		/*var objForm = document.forms['frmTabChanged']
		objForm.hdnAutoExecute.value			= true				// set values for the form variables
		objForm.hdnCurrentEntity.value			= "TRIANGLE"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "TRIANGLE"
		
		objForm.target							= "fraLeft"			// set target - Left frame
		objForm.action							= "../TR/TriangleControlPanel.asp"	// set action
		objForm.submit()						// submit form.*/
	
		//--------------
		var objMasterForm = document.forms['frmTabChanged']
		var objForm		  = document.idTriangleControlPanel  
		objForm.hdnCurrentCompanyID.value = objMasterForm.hdnCurrentCompanyID.value
		// set values for the form variables
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(document.frmTabChanged.hdnSectorName.value == "Market Average")
			{
				document.frmTabChanged.hdnSectorID.value = document.frmTabChanged.hdnQuestGroupID.value;
			}
		}
		//end
		if(objForm.hdnAutoExecute.value=="")
		{
			objForm.hdnAutoExecute.value			= true	
		}
		// set values for the form variables
		objForm.hdnCurrentEntity.value			= "TRIANGLE"
		objMasterForm.hdnCurrentEntity.value	= "TRIANGLE"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "TRIANGLE"
		objMasterForm.hdnFunctionToShow.value	= "TRIANGLE"
		// set target - Left frame
		objForm.target							= "fraLeft"			
		// set action
		objForm.action							= "../TR/TriangleControlPanel.asp"	
		// submit form.
		objForm.submit()						
		//---------------------------------------------------------------
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowCitNTab
	' Description:       Function called when the CiTN Tab is selected from the Tabs
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified   :		 102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04/06/2002, 12:30:00 PM
	'
	' Parameters :       Nil
	' Modified On:		 06/June/2002 20:05
	'--------------------------------------------------------------------------------*/
	function jfn_ShowCitNTab(){

		// variable to hold form reference
		var objForm = document.forms['frmTabChanged']
		// set values for the form variables
		//added by 189433 for cr1386v2
		if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			document.frmStore.hdnSectorActivePool.value = '';			
		}
		else
		{
			if(objForm.hdnSectorName.value == "Market Average")
			{
				objForm.hdnSectorID.value = objForm.hdnQuestGroupID.value;
			}
		}
		//end
		objForm.hdnAutoExecute.value			= true				
		objForm.hdnCurrentEntity.value			= "CITN"
		objForm.hdnDisplayMode.value			= DIS_SHOW
		objForm.hdnFunctionToShow.value			= "CITN"
		// set target - Left frame
		objForm.target							= "fraLeft"			
		// set action
		objForm.action							= "../CT/CiTNControlPanel.asp"	
		// submit form.
		objForm.submit()
	}

	/*'--------------------------------------------------------------------------------
	' Procedure		:       jfn_TabClick
	' Description	:       Used to change the image as per the selection of the hyperlink
	'						upon the image
	'
	' Created by	:       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time		:       03/06/2002, 04:00:58 PM
	'
	' Parameters	:       argStrTab - Flag which tells which particular hyperlink has 
	'									been clicked
	' Modified By	:		120387, HCL Technologies Ltd, Gurgaon, INDIA.
	'				:		181154, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date			:		14/Dec/2006, 15/04/2009
	' Reason		:		CR 987 - Image Changes
	'				:		CR-1280v1 - Quest Website Sector Analysis
	'--------------------------------------------------------------------------------*/
	function jfn_TabClick(argStrTab){
		
		var strTabImagePath = "../../Images/CM/"
		var strTemp
		var objForm = document.frmTabChanged
		if ((argStrTab != "WC") && (!blnLogin)){
			alert(strNOT_LOGGED_IN)
			return;
		}
		
		if ((argStrTab != "WC") && (blnLogin)){
			if (jfn_CheckUserSettings())
				return;
		}
				
		window_onunload(true)
		
		//CR 683v2 FireFox Support		
		if (argStrTab == "WC"){		
			/*Change the Tab image to the Welcome Tab and map the image with
			WelcomeTab map*/	
			// Image name modified by Nimisha (181154): CR-1280
			document.images["imgTab"].src = strTabImagePath + "Welcome_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#WelcomeTab"
					
			/*Make the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get hidden
			when other tabs are selected*/
			document.getElementById("divAllMetaNavigation").style.visibility = "visible"
			document.getElementById("divSelectedMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			jfn_getValuesFromCP()
			jfn_ShowWelcomeTab()
		}
		else if (argStrTab == "QA"){
			// first access check
			if ((String(document.frmTabChanged.hdnFunctionToShow.value) != 'QUEST_ANALYSIS') || (document.frmTabChanged.hdnCurrentEntity.value==''))
				strTemp = 'SUMMARY'
			else
				strTemp = document.frmTabChanged.hdnCurrentEntity.value
			
			if (!jfn_accessCheck(strTemp)) {
				jfn_DisplayCustomAlert(strNOACCESS, strTemp)
				return;		
			}

			/*Change the Tab image to the Quest Analysis Tab and map the image 
			with QuestAnalysis map*/	
			// Image name modified by Nimisha (181154) for CR-1280
			document.images["imgTab"].src=strTabImagePath + "CompanyAnalysis_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#QuestAnalysisTab"
					
			/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get visible
			when Welcome tab is selected*/
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			jfn_getValuesFromCP()
			jfn_ShowQuestAnalysisTab()
		}
		// Added by Nimisha (181154) for CR-1280v1: START
		else if (argStrTab == "SA")
		{	
			if ((String(document.frmTabChanged.hdnFunctionToShow.value) != 'SECTOR ANALYSIS'))
			{
				strTemp = 'SECTOR ANALYSIS';
			}
			else
			{
				strTemp = document.frmTabChanged.hdnFunctionToShow.value;
			}

			if (!jfn_accessCheck(strTemp))
			{				
				jfn_DisplayCustomAlert(strNOACCESS, strTemp);
				return;		
			}
								
			// Change the Tab image to the Sector Analysis Tab and map the image with SectorAnalysisTab map.
			document.images["imgTab"].src = strTabImagePath + "SectorAnalysis_Tab_NLAF_1280.gif";
			document.images["imgTab"].useMap = "#SectorAnalysisTab";
			
			// Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest visible when Welcome tab is selected.  
			// These links will get visible when Welcome tab is selected
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible";
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden";
			
			// Call generic function for pulling data from live control panel
			jfn_getValuesFromCP();
			
			jfn_ShowSectorAnalysisTab();
		}
		// Added by Nimisha (181154) for CR-1280v1: END
		else if (argStrTab == "PR"){
			// first access check
			if (!jfn_accessCheck('PORTFOLIO')) {
				//alert(strNOACCESS)
				jfn_DisplayCustomAlert(strNOACCESS, 'PORTFOLIO & REPORTS')
				return;		
			}
					
			/*Change the Tab image to the Portfolio and Reports Tab and map the 
			image with Portfolio and Reports map*/	
			document.images["imgTab"].src= strTabImagePath + "PortfolioandReports_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#PortFolioTab"
					
			/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get visible
			when Welcome tab is selected*/
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			if (objForm.hdnCurrentEntity.value != 'PORTFOLIO')
				jfn_getValuesFromCP()
			jfn_ShowPortfolioTab()
		}
		else if (argStrTab == "SS"){
			// first access check
			if (!jfn_accessCheck('SEARCH')) {
				//alert(strNOACCESS)
				jfn_DisplayCustomAlert(strNOACCESS, 'SCREEN FOR STOCKS')
				return;		
			}
					
			/*Change the Tab image to the Screen for Stocks Tab and map the 
			image with Screen for Stocks map*/	
			document.images["imgTab"].src= strTabImagePath + "ScreenForStocks_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#StocksTab"
					
			/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get visible
			when Welcome tab is selected*/
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			if (objForm.hdnCurrentEntity.value != 'SEARCH')
				jfn_getValuesFromCP()
			jfn_ShowScreenforStocks()
		}
		else if (argStrTab == "TR"){
			// first access check
			if (!jfn_accessCheck('TRIANGLE')) {
				//alert(strNOACCESS)
				jfn_DisplayCustomAlert(strNOACCESS, 'TRIANGLE')
				return;		
			}
					
			/*Change the Tab image to the Triangle Tab and map the 
			image with Trianlge map*/	
			document.images["imgTab"].src= strTabImagePath + "Triangle_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#TriangleTab"
					
			/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get visible
			when Welcome tab is selected*/
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			if (objForm.hdnCurrentEntity.value != 'TRIANGLE')
				jfn_getValuesFromCP()
			jfn_ShowTriangleTab()
		}
		else if (argStrTab == "CT"){
			// first access check
			if (!jfn_accessCheck('CITN')) {
				//alert(strNOACCESS)
				jfn_DisplayCustomAlert(strNOACCESS, 'CiTN')
				return;		
			}
					
			/*Change the Tab image to the CiTN Tab and map the 
			image with CiTN map*/	
			document.images["imgTab"].src= strTabImagePath + "CiTN_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
			document.images["imgTab"].useMap="#CiTNTab"
					
			/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
			visible when Welcome tab is selected.  These links will get visible
			when Welcome tab is selected*/
			document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
			document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
			// call generic function for pulling dat from live control panel -- 103171 7-11-2002
			jfn_getValuesFromCP()
			jfn_ShowCitNTab()
		}
		//CR 683v2 FireFox Support
		
		//set focus to content frame..
		//this is as per the design document strategy for print.. and to prevent
		//any focus boxes that are visible on the tabs. - 102209: 8-July-2002
		
		//CR 683v2 FireFox Support
		/*
		if (!mBlnIE)
			window.parent.frames['fraContent'].focus();
		else
			window.parent.frames['fraContent'].window.focus();
		*/
		window.parent.frames['fraContent'].window.focus();
		//CR 683v2 FireFox Support
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowCompanyDetails
	' Description:       Calls the Quest Analysis function tab and set the hidden 
	'					 variable values
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       13/06/2002, 06:05:58 PM
	'
	' Parameters :       argStrTab - Flag which tells which particular hyperlink has 
	'									been clicked
	'--------------------------------------------------------------------------------*/
	function jfn_ShowCompanyDetails(argCmpID, argFncName){
		// first access check
		if (!jfn_accessCheck(argFncName)) {
			jfn_DisplayCustomAlert(strNOACCESS, argFncName)
			return;		
		}
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged'];
		objForm.hdnCurrentCompanyID.value = argCmpID;
		
		// call generic function for pulling dat from live control panel -- 103171 7-11-2002
		jfn_getValuesFromCP()
		
		objForm.hdnCurrentEntity.value   = argFncName;
		jfn_TabClick('QA');
				
	}

	/*'--------------------------------------------------------------------------------------------
	' Procedure  : jfn_ShowSectorDetails(argSectorID, argSectorName, argFunctionName)
	'
	' Description: Calls the Sector Analysis function tab and set the hidden 
	'			   variable values
	'
	' Created by : 181154, HCL Technologies Ltd, Gurgaon, INDIA.
	'
	' Reason	 : Created for CR-1280v1 - Quest Website Sector Analysis
	' 
	' Date-Time  : 22/04/2009, 04:29:00 PM
	'
	' Parameters : argSectorID		- Sector ID
	'			   argSectorName	- Sector Name
	'			   argFunctionName	- Function Name (such as SECTOR_SUMMARY, SECTOR_STRATEGY etc)
	'-----------------------------------------------------------------------------------------------*/
	function jfn_ShowSectorDetails(argSectorID, argSectorName, argFunctionName)
	{			
		var objForm						= document.forms['frmTabChanged'];
		
		
		objForm.hdnSectorID.value		= argSectorID;
		objForm.hdnSectorName.value		= argSectorName;
	
		// Call generic function for pulling dat from live control panel
		jfn_getValuesFromCP();

		objForm.hdnCurrentEntity.value   = argFunctionName;
		
		jfn_TabClick('SA');				
	}

	/*'--------------------------------------------------------------------------------------------
	' Procedure  : jfn_SetSectorDetails(argSectorID, argSectorName, argFunctionName)
	'
	' Description: Calls the Sector Analysis function tab and set the hidden 
	'			   variable values
	'
	' Created by : 189433, HCL Technologies Ltd, Gurgaon, INDIA.
	'
	' Reason	 : Created for CR-1280v3 - Quest Website Sector Analysis
	' 
	' Date-Time  : 16/07/2009, 04:29:00 PM
	'
	' Parameters : argSectorID		- Sector ID
	'			   argSectorName	- Sector Name
	'			   argFunctionName	- Function Name (such as SECTOR_SUMMARY, SECTOR_STRATEGY etc)
	'-----------------------------------------------------------------------------------------------*/
	function jfn_SetSectorDetails(argSectorID, argSectorName, argFunctionName)
	{			
		var objForm						= document.forms['frmTabChanged'];
		
		objForm.hdnSectorID.value		= argSectorID;
		objForm.hdnSectorName.value		= argSectorName;
		objForm.hdnCurrentEntity.value  = argFunctionName;
		objForm.hdnFunctionToShow.value = "SECTOR ANALYSIS";
		jfn_AppendSectorInActivePool(objForm.hdnSectorID.value,objForm.hdnSectorName.value);
		jfn_ShowSectorAnalysisTab();	
				
	}
		
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowCompanyDetails_Strategy
	' Description:       Calls the Quest Analysis function tab and set the hidden 
	'					 variable values
	'
	' Created by :       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       13/06/2002, 06:05:58 PM
	'
	' Parameters :       argStrTab - Flag which tells which particular hyperlink has 
	'									been clicked
	'--------------------------------------------------------------------------------*/
	function jfn_ShowCompanyDetails_Strategy(argCmpID, argFncName, argDisplayOptions)
	{
		// first access check
		if (!jfn_accessCheck(argFncName)) {
			jfn_DisplayCustomAlert(strNOACCESS, argFncName)
			return;		
		}
				
		// variable to hold form reference
		var objForm = document.forms['frmTabChanged'];
		objForm.hdnCurrentCompanyID.value = argCmpID;
		// call generic function for pulling dat from live control panel -- 103171 7-11-2002
		jfn_getValuesFromCP()
		objForm.hdnCurrentEntity.value   = argFncName;
		jfn_TabClick('QA');
		jfn_SetSwitchesforDisplay(argDisplayOptions);
	}
	
	/******************************************************************************
	Function   :       jfn_StrategySettingsForArticleLink()
	Description:	   Display the Supporting Data for the Strategy page if requested in the link
	Created by :       120387, HCL Technologies Ltd
	Date-Time  :       01st Aug 2007
	Parameters :       none
	Reason	   :       CR-1050
	*******************************************************************************/
	function jfn_StrategySettingsForArticleLink()
	{
		if (document.frmTabChanged.hdnSupportDataSwitch.value=="1")
		{
			window.parent.frames['fraLeft'].jfn_ShowSupportData('1'); //Qstp 5401-argument passed
			document.frmTabChanged.hdnSupportDataSwitch.value="0";
		}
		if (document.frmTabChanged.hdnSectorAvgSwitch.value=="1")
		{
			window.parent.frames['fraLeft'].jfn_ShowSectorAverage();
			document.frmTabChanged.hdnSectorAvgSwitch.value="0";
		}	
	}
		
	/******************************************************************************
	Function   :       jfn_SetSwitchesforDisplay()
	Description:	   Set the Display Setting Hidden controls as requested by the ArticleLink
	Created by :       120387, HCL Technologies Ltd
	Date-Time  :       01st Aug 2007
	Parameters :       argDisplayOption - Which switches to set
	Reason	   :       CR-1050
	*******************************************************************************/
	function jfn_SetSwitchesforDisplay(argDisplayOption)
	{
		
		///*
		switch(argDisplayOption)
		{
			case "0":
				break;
			case "1":
				document.frmTabChanged.hdnSupportDataSwitch.value="0";
				document.frmTabChanged.hdnSectorAvgSwitch.value="1";
				break;
			case "2":
				document.frmTabChanged.hdnSupportDataSwitch.value="1";
				document.frmTabChanged.hdnSectorAvgSwitch.value="0";
				break;
			case "3":
				document.frmTabChanged.hdnSupportDataSwitch.value="1";
				document.frmTabChanged.hdnSectorAvgSwitch.value="1";
				break;
		}
		return;	
		//*/
	}

	/*--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetUrlNavigatorCall
	' Description:       Function which resets the URL Navigator Call & hdnRestrictedAccess variable.
	'
	' Created by :       Surendra 126881, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date-Time  :       13/08/2007
	'
	'---------------------------------------------------------------------------------*/
	function jfn_SetUrlNavigatorCall(strValue)
	{		
		//alert("in NC::");
		document.frmTabChanged.hdnUrlNavigatorCall.value=strValue;	
	}

	/*--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetRestrictedAccess
	' Description:       Function which resets the hdnRestrictedAccess variable.
	'
	' Created by :       Surendra 126881, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date-Time  :       13/02/2008
	'
	'---------------------------------------------------------------------------------*/
	function jfn_SetRestrictedAccess(strValue)
	{
		document.frmTabChanged.hdnRestrictedAccess.value=strValue;
	}

	/*--------------------------------------------------------------------------------
	' Procedure  :       jfn_UpdateUsageLog
	' Description:       Function which logs an entry into the usage_log_for_cmpny_pgs table
	'
	' Created by :       151351, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date-Time  :       30/07/2007
	'
	' Parameters :       argStrCompanyID    - Company ID
	'					 argStrFunctionName - Function Name
	'--------------------------------------------------------------------------------*/
	function jfn_UpdateUsageLog(argUserID,argStrCompanyID,argStrFunctionName,argCallOfHit)
	{
		//variable to hold form references
		var objForm = document.forms['frmUsageLog'];
		var intFunctionID;
		intFunctionID = "";
		
		switch (argStrFunctionName)
		{
			case "SUMMARY":				//SUMMARY
				intFunctionID = 102;
				break;
			case "STRATEGY":			//STRATEGY
				intFunctionID = 3;
				break;
			case "VALUATION":			//VALUATION
				intFunctionID = 5;
				break;
			case "MOMENTUM":			//MOMENTUM
				intFunctionID = 84;
				break;
			case "COMMENTARY":			//COMMENTARY
				intFunctionID = 114;
				break;
			case "STATISTICS":			//STATISTICS
				intFunctionID = 25;
				break;
		}
		if(argCallOfHit == "WEB")
		{
			
			objForm.hdnCompanyID.value			= argStrCompanyID;
			objForm.hdnFunctionID.value			= intFunctionID;
			objForm.hdnCallOfHit.value			= argCallOfHit;
			objForm.hdnUserID.value				= argUserID;
			objForm.action						="../CM/UpdateUsageLog.asp";
			objForm.target						="_blank";
			objForm.method						="POST"
			objForm.submit();
		}
	}
	
/*--------------------------------------------------------------------------------
	' Procedure  :       jfn_UpdateUsageLogforSector
	' Description:       Function which logs an entry into the usage_log_for_sector_pgs table
	'
	' Created by :       189433, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date-Time  :       11/11/2009
	'
	' Parameters :       argStrSectorID    - Sector ID
	'					 argStrFunctionName - Function Name
	'--------------------------------------------------------------------------------*/
	function jfn_UpdateUsageLogforSector(argUserID,argStrSectorID,argStrFunctionName,argCallOfHit)
	{
		//variable to hold form references
		var objForm = document.forms['frmUsageLog'];
		var strFunction;
		strFunction = "";
		
		switch (argStrFunctionName)
		{
			case "SECTOR_SUMMARY":				//SECTOR_SUMMARY
				strFunction = "sector summary";
				break;
			case "SECTOR_STRATEGY":				//SECTOR_STRATEGY
				strFunction = "sector strategy";
				break;
			case "SECTOR_VALUATION":			//SECTOR_VALUATION
				strFunction = "sector valuation";
				break;
			case "SECTOR_STATISTICS":			//SECTOR_STATISTICS
				strFunction = "sector statistics";
				break;
		}
		if(argCallOfHit == "WEB")
		{
			objForm.hdnSectorID.value			= argStrSectorID;
			objForm.hdnFunctionID.value			= '562';
			objForm.hdnFunctionName.value		= strFunction;
			objForm.hdnSectorCallOfHit.value	= argCallOfHit;
			objForm.hdnUserID.value				= argUserID;
			objForm.action						="../CM/UpdateUsageLog.asp";
			objForm.target						="_blank";
			objForm.method						="POST"
			objForm.submit();
		}
	}
	



	function jfn_CheckUserSettings() {
		// user should be logged in...
		if (blnLogin) {			
			var objForm = document.frmTabChanged
			// any value blank..
			if (objForm.hdnQuestGroupID.value == "" ||
				objForm.hdnIndexProviderID.value == "" ||
				objForm.hdnStockIdentifierID.value == "") {		
					
				alert('One of the required settings (Quest group, Index provider or Stock identifier) are not set. To proceed further you need to set these settings in MyQuest. Press OK to open the MyQuest screen.')
				// open myQuest
				jfn_MyQuest();				
				return true;
			} else
				return false;
		}
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       window_onunload
	' Description:       Called when the page is un-loaded. Job here is to close all 
	'						child and popup windows when it is closed; so that there
	'						are no floating windwos.
	'
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       12/June/2002 16:50
	' Modified	 :       By 104315 on 30/04/03 to implement CR 166
	'--------------------------------------------------------------------------------*/
	function window_onunload(blnQuestMail) {
	
		// Login Bug Fix -- 07-jan-2003.. ATC and ST3
			
		// ok so now.. we check all window handled and which ever is available
		// and not closed.. we close them .....
		
		if (winAboutQuest)
			if (!winAboutQuest.closed)
				winAboutQuest.close();
				

		if (winDisclaimer)
			if (!winDisclaimer.closed)
				winDisclaimer.close();

		if (winSitemap)
			if (!winSitemap.closed)
				winSitemap.close();

		if (winQuestmail && String(blnQuestMail)!='true')
			if (!winQuestmail.closed)
				winQuestmail.close();
		
		//102661 - 26/8/2003, CR 325 - Let the My Quest window open on Tab Click.
		if (winMyQuest && String(blnQuestMail)!='true')
			if (!winMyQuest.closed)
				winMyQuest.close();

		if (winHelp)
			if (!winHelp.closed)
				winHelp.close();

		if (winSelectEntities)
			if (!winSelectEntities.closed)
				winSelectEntities.close();

		if (winSavePortfolio)
			if (!winSavePortfolio.closed)
				winSavePortfolio.close();

		if (winLoadPortfolio)
			if (!winLoadPortfolio.closed)
				winLoadPortfolio.close();
		
		//close the article display window on unload only if browser window is getting closed ...added by 104315 on 30/04/03		
		if(!blnQuestMail)
		{
			if (mWinArticleDisplay)
			{
				if (!mWinArticleDisplay.closed)
					mWinArticleDisplay.close();
			}			
		}
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ProcessLogin
	' Description:       called by Welcome Control Panel; when the login button is clicked 
	'						Processes the login information and reposts the data to self to
	'						login the user.
	'
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       15/June/2002 10:41 AM
	'
	'--------------------------------------------------------------------------------*/
	function jfn_ProcessLogin(argUID, argPwd, argRemPwd, argDsclAgr) 
	{
		
		var objForm
		objForm		= document.forms['frmLogin']
		
		objForm.hdnUserID.value		 		= argUID
		objForm.hdnPassword.value	 		= argPwd
		objForm.hdnRememberPwd.value 		= argRemPwd
		objForm.hdnTokenString.value 		= ''
		objForm.hdnDisclaimerStatus.value	= argDsclAgr
		objForm.hdnAction.value				= "LOGIN"
			
		objForm.submit();
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure		:       jfn_TabImageSelect
	' Description	:       This function sets the Navigation Controller Tab image and 
	'						 the Meta Information Images
	'
	' Created by	:       104644, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time		:       17/June/2002 11:26 AM
	'
	' Modified By	:		120387, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date			:		14/Dec/2006, 27/04/2009
	' Reason		:		CR 987		- Image Changes
	'						CR 1280v1	- Quest Website Sector Analysis			
	'--------------------------------------------------------------------------------*/
	function jfn_TabImageSelect(argStrTabName){
		//Code for Internet Explorer
		//if (!mBlnIE) {

		//CR683v2 Firefox Support
		switch (argStrTabName)
		{
			case "WC":
				/*Change the Tab image to the Welcome Tab and map the image with
				WelcomeTab map*/	
				// Image name modified by Nimisha (181154): CR-1280v1
				document.images["imgTab"].src="../../Images/CM/Welcome_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#WelcomeTab"
					
				/*Make the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get hidden
				when other tabs are selected*/
				document.getElementById("divAllMetaNavigation").style.visibility = "visible"
				document.getElementById("divSelectedMetaNavigation").style.visibility = "hidden"
				break;
			case "QA":
				/*Change the Tab image to the Quest Analysis Tab and map the image 
				with QuestAnalysis map*/	
				// Image name modified by Nimisha (181154) for CR-1280v1
				document.images["imgTab"].src="../../Images/CM/CompanyAnalysis_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#QuestAnalysisTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			case "PR":
				/*Change the Tab image to the Portfolio and Reports Tab and map the 
				image with Portfolio and Reports map*/	
				// Image name modified by Nimisha (181154) for CR-1280v1
				document.images["imgTab"].src="../../Images/CM/PortfolioandReports_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#PortFolioTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			case "SS":
				/*Change the Tab image to the Screen for Stocks Tab and map the 
				image with Screen for Stocks map*/	
				// Image name modified by Nimisha (181154) for CR-1280v1
				document.images["imgTab"].src="../../Images/CM/ScreenForStocks_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#StocksTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			case "TR":
				/*Change the Tab image to the Triangle Tab and map the 
				image with Trianlge map*/	
				// Image name modified by Nimisha (181154) for CR-1280v1
				document.images["imgTab"].src="../../Images/CM/Triangle_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#TriangleTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			case "CT":
				/*Change the Tab image to the CiTN Tab and map the 
				image with CiTN map*/	
				// Image name modified by Nimisha (181154) for CR-1280v1
				document.images["imgTab"].src="../../Images/CM/CiTN_Tab_NLAF_1280.gif"//Code Change by 120387 for CR 987 - Updated Image Name
				document.images["imgTab"].useMap="#CiTNTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			// Added by Nimisha (181154) for CR-1280v1: START
			case "SA":
				// Change the Tab image to the Sector Analysis Tab and map the image with SectorAnalysisTab map.
				document.images["imgTab"].src="../../Images/CM/SectorAnalysis_Tab_NLAF_1280.gif";
				document.images["imgTab"].useMap="#SectorAnalysisTab"
					
				/*Hide the hyperlinks About Quest, Disclaimer, SiteMap & MyQuest
				visible when Welcome tab is selected.  These links will get visible
				when Welcome tab is selected*/
				document.getElementById("divSelectedMetaNavigation").style.visibility = "visible"
				document.getElementById("divAllMetaNavigation").style.visibility = "hidden"
				break;
			// Added by Nimisha (181154) for CR-1280v1: START
		}
		//CR683v2 Firefox Support
	}
	

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_AppendCompanyInActivePool
	' Description:       This function apends the passed company to the Active pool.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       11-July-2002 - 18:10 
	'
	'--------------------------------------------------------------------------------*/
	function jfn_AppendCompanyInActivePool(CmpID, CmpName) {
		var strTemp = CmpID + SEPARATOR_PIPE_NC + CmpName
		var objRegExp
		var objForm = document.frmStore
		
		
		//Code added for clearing list in case of company selection from Advance Company selection for a user with restricted access
		if((document.frmTabChanged.hdnAccessAttempt.value == "1"))
		{
			
			document.frmTabChanged.hdnAccessAttempt.value="2";
			// clear the list
			objForm.hdnActivePool.value = '';
		}
		if((document.frmTabChanged.hdnRestrictedAccess.value == "1")&& (document.frmTabChanged.hdnAccessAttempt.value=="0"))
		{
			document.frmTabChanged.hdnAccessAttempt.value="1";
			// clear the list
			
			objForm.hdnActivePool.value = '';
		}
				
		// if original status of list was Archived.... then.. clear the list
		if (objForm.hdnActivePoolType.value == 'A') {
			
			// clear the list
			
			objForm.hdnActivePool.value = ''	
		}
		// clear all other variables also..
		objForm.hdnPortfolioID.value = ''
		objForm.hdnPortfolioName.value = ''
		objForm.hdnPeerID.value = ''
		objForm.hdnPeerType.value = ''
		objForm.hdnSelectedCompanyID.value = ''
		objForm.hdnActivePoolType.value = 'L'
		
		if (objForm.hdnActivePool.value == '') {		
			objForm.hdnActivePool.value = strTemp
		} else {	

			// Since PIPE is a special character in regular functions used in js.. 
			// we replace the PIPE character everywhere with TILDE chars ....
			// Changes made for CR636
			objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).replace(/\|\^~/gi, '~~')
		
			strTemp = String(strTemp).replace(/\|\^~/, '~~')
		

			// Now we perform all operations on DOUBLE TILDE ~~ rather than PIPES...
			
			// now if this set of company id and name exists in the string before.. we need to remove them
			objRegExp = new RegExp(String(strTemp).replace(/\(/gi, "\\(" ).replace(/\)/gi, "\\)").replace(/\./gi, "\\.").replace(/\$/gi, "\\$").replace(/\*/gi, "\\*"))

			objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).replace(objRegExp, '')		
						
			// doing it twice since PIPE caharacter acts as OR operator in regular exp of replace.
			// objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).replace(strTemp, '')
			
			objForm.hdnActivePool.value = strTemp + "~~" + objForm.hdnActivePool.value
			
			// now due to this there may be a condition where we have two DOUBLE TILDEs.. so taking acre of this..
			objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).replace("~~~~", "~~")
			
			// putting back PIPE instead of ~~
			objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).replace(/~~/gi, SEPARATOR_PIPE_NC)
			
			// now if there is a | as the first character.. we need to remove that ..
			if (String(objForm.hdnActivePool.value).indexOf(SEPARATOR_PIPE_NC)==0) {
				objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).substring(SEPARATOR_PIPE_NC_LEN, String(objForm.hdnActivePool.value).length)
			}

			// now if there is a | as the last character.. we need to remove that also..
			if (String(objForm.hdnActivePool.value).lastIndexOf(SEPARATOR_PIPE_NC)==String(objForm.hdnActivePool.value).length-SEPARATOR_PIPE_NC_LEN) {
				objForm.hdnActivePool.value = String(objForm.hdnActivePool.value).substring(0, String(objForm.hdnActivePool.value).length-SEPARATOR_PIPE_NC_LEN)
			}
		}		
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  : jfn_AppendSectorInActivePool
	'
	' Description: This function apends the passed sector to the Active pool.
	'
	' Created by : 181154, HCL Technologies Ltd, Gurgaon, INDIA.
	'
	' Reason	 : Created for CR-1280v1 - Quest Website Sector Analysis.
	' 
	' Date-Time  : 22-04-2009 - 04:34:00 PM
	'
	' Parameters : argStrSectorID	- Sector ID
	'			   argStrSectorName	- Sector Name
	'--------------------------------------------------------------------------------*/
	function jfn_AppendSectorInActivePool(argStrSectorID, argStrSectorName)
	{
		var objRegExp
		var strTemp = argStrSectorID + SEPARATOR_PIPE_NC + argStrSectorName		
		var objForm = document.frmStore
		//modified by 189433 for sector hyperlink---release78.0
		//Code added for clearing list in case of sector selection from change sector combo selection for a user with restricted access
		/*if(document.frmTabChanged.hdnRestrictedAccess.value == "1")
		{
			objForm.hdnSectorActivePool.value = '';
		}*/
		
		if((document.frmTabChanged.hdnAccessAttempt.value == "1"))
		{
			document.frmTabChanged.hdnAccessAttempt.value="2";
			// clear the list
			objForm.hdnSectorActivePool.value = '';
		}
		
		if((document.frmTabChanged.hdnRestrictedAccess.value == "1")&& (document.frmTabChanged.hdnAccessAttempt.value=="0"))
		{
			document.frmTabChanged.hdnAccessAttempt.value="1";
			// clear the list
			objForm.hdnSectorActivePool.value = '';
		}
		//by 189433
		// I DON'T KNOW WHETHER THIS CODE IS REQUIRED OR NOT.
		// if original status of list was Archived.... then.. clear the list
		/*if (objForm.hdnActivePoolType.value == 'A') {
			// clear the list
			objForm.hdnActivePool.value = ''	
		}
		// clear all other variables also..
		objForm.hdnPortfolioID.value = ''
		objForm.hdnPortfolioName.value = ''
		objForm.hdnPeerID.value = ''
		objForm.hdnPeerType.value = ''
		objForm.hdnSelectedCompanyID.value = ''
		objForm.hdnActivePoolType.value = 'L'*/				

		if (objForm.hdnSectorActivePool.value == '')
		{	
			objForm.hdnSectorActivePool.value = strTemp
		} 
		else 
		{
			// Since PIPE is a special character in regular functions used in js.. 
			// we replace the PIPE character everywhere with TILDE chars ....			
			objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).replace(/\|\^~/gi, '~~')

			strTemp = String(strTemp).replace(/\|\^~/, '~~')

			// Now we perform all operations on DOUBLE TILDE ~~ rather than PIPES...
			
			// now if this set of sector id and name exists in the string before.. we need to remove them
			objRegExp = new RegExp(String(strTemp).replace(/\(/gi, "\\(" ).replace(/\)/gi, "\\)").replace(/\./gi, "\\.").replace(/\$/gi, "\\$").replace(/\*/gi, "\\*"))

			objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).replace(objRegExp, '')
						
			// doing it twice since PIPE caharacter acts as OR operator in regular exp of replace.
			// objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).replace(strTemp, '')
			
			objForm.hdnSectorActivePool.value = strTemp + "~~" + objForm.hdnSectorActivePool.value
			
			// now due to this there may be a condition where we have two DOUBLE TILDEs.. so taking acre of this..
			objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).replace("~~~~", "~~")
			
			// putting back PIPE instead of ~~
			objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).replace(/~~/gi, SEPARATOR_PIPE_NC)
			
			// now if there is a | as the first character.. we need to remove that ..
			if (String(objForm.hdnSectorActivePool.value).indexOf(SEPARATOR_PIPE_NC)==0) {
				objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).substring(SEPARATOR_PIPE_NC_LEN, String(objForm.hdnSectorActivePool.value).length)
			}

			// now if there is a | as the last character.. we need to remove that also..
			if (String(objForm.hdnSectorActivePool.value).lastIndexOf(SEPARATOR_PIPE_NC)==String(objForm.hdnSectorActivePool.value).length-SEPARATOR_PIPE_NC_LEN) {
				objForm.hdnSectorActivePool.value = String(objForm.hdnSectorActivePool.value).substring(0, String(objForm.hdnSectorActivePool.value).length-SEPARATOR_PIPE_NC_LEN)
			}
		}	
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_UpdateCompaniesInActivePool
	' Description:       This function updates the ActivePool with the new list passed.
	'						The list is to be in the format...
	'						COMPANY_ID|Company_Name|ID|Name|.....
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       11-July-2002 - 18:10 
	'
	'--------------------------------------------------------------------------------*/
	function jfn_UpdateCompaniesInActivePool(CmpLst, Status, PeerType, PeerID, PFID, PFName) {
			var objForm = document.frmStore
			objForm.hdnActivePool.value = CmpLst
			objForm.hdnActivePoolType.value = Status
			objForm.hdnPeerID.value = PeerID
			objForm.hdnPeerType.value = PeerType
			objForm.hdnPortfolioID.value = PFID
			objForm.hdnPortfolioName.value = PFName	
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :      jfn_UpdateSectorsInActivePool
	'
	' Description:      This function updates the SectorActivePool with the new list passed.
	'               	The list is to be in the format...
	'
	' Created by :      181154, HCL Technologies Ltd, Gurgaon, INDIA.
	'
	' Reason	 :		Created for CR-1280v1 - Quest Website Sector Analysis	
	' 
	' Date-Time  :      01-May-2009, 02:33 P.M
	'--------------------------------------------------------------------------------*/
	function jfn_UpdateSectorsInActivePool(SecLst)
	{
			var objForm = document.frmStore;

			objForm.hdnSectorActivePool.value = SecLst;
	}
	

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowSelectEntitiesScreen
	' Description:       This function displays the Select Entities screen, and returns the
	'						window reference.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 10:00 
	' Parameters :		 (Optional) strPortfolioID, strInvoker
	'--------------------------------------------------------------------------------*/
	function jfn_ShowSelectEntitiesScreen(Invoker, PFID) {
		var objForm = document.frmTabChanged
		var intWidth
		var intTop		= (window.screen.height - window.screen.availHeight)*2 + 130
		var intHeight	=  window.screen.availHeight - intTop - 70 // 50 for status bar.and task bar
		var intLeft		
		
		//CR683v2 Firefox Support
		/*
		if(mBlnIE)
		{
			intWidth = 710
		}
		else
		{
			intWidth = 690
		}
		*/
		intWidth = 710
		//CR683v2 Firefox Support
		if(jfn_isScreenResolutionLow)
		{
			intLeft   =  75
			
		}
		else
		{
			intLeft   =  200
		}
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes,left="+intLeft+",width="+intWidth+", left="+intLeft+",top="+intTop+",height="+intHeight
		
		var strURL = "../../Code/CM/MaintainPortfolio.asp"
		
		
		strURL = strURL +  '?SrcInvoked=' + Invoker
		//Quest R50.1 (Product Group Related Changes) by 151282: START
		if (Invoker=='RPT')	//Special case for PR's Hyperlinked Scenarios
		{
			strURL = strURL +  '&Qgroup=' + window.parent.frames['fraLeft'].document.frmCompareControlPanel.hdnQuestGroup.value
		}
		//Code added by 126881 for checking the invoking screen for QA in case of URL navigator call
		else if ((Invoker=='QA') && (document.frmTabChanged.hdnUrlNavigatorCall.value == "1")) 
		{
			var objQAForm 
			strURL = strURL +  '&Qgroup=' + objForm.hdnQuestGroupID.value
			
			objQAForm = window.parent.frames['fraLeft'].document.frmQAControlPanel
			//Charting
			objQAForm.hdnChartScenarioName.value = "";
			objQAForm.hdnChartScenarioId.value = "";
			//Sensitivity
			objQAForm.hdnSensitivityScenarioName.value = "";
			objQAForm.hdnSensitivityScenarioId.value = "";
			//Modeller
			objQAForm.hdnScenarioName.value = "";
			objQAForm.hdnScenarioId.value = "";
		}
		else
		{
			strURL = strURL +  '&Qgroup=' + objForm.hdnQuestGroupID.value			
		}
		//Quest R50.1 (Product Group Related Changes) by 151282: END

		strURL = strURL +  '&Idx=' + objForm.hdnIndexProviderID.value
		strURL = strURL +  '&UserId=' + objForm.hdnSystemUserID.value
		strURL = strURL +  '&PortfolioId=' + PFID
		strURL = strURL +  '&PeerType=' + document.frmStore.hdnPeerType.value
		strURL = strURL +  '&PeerId=' + document.frmStore.hdnPeerID.value
		strURL = strURL +  '&Status=' + document.frmStore.hdnActivePoolType.value
		strURL = strURL +  '&UserType=' + objForm.hdnIsAdminUser.value	
		
		/*
		//CR-1049v5: START
		//following line changed for new user types by 151282 on 10-Oct-2007
		strURL = strURL +  '&UserType=' + objForm.hdnUserType.value	//objForm.hdnIsAdminUser.value
		//CR-1049v5: END
		*/
	
		if (!winSelectEntities) {
			winSelectEntities = window.open(strURL,"_blank", strOptions)
		} else {
			
			if (!winSelectEntities.closed) {
				winSelectEntities.focus();				
			} else {
				winSelectEntities = window.open(strURL,"_blank", strOptions)
			}
		}
	
		return winSelectEntities		
	}
	

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_GetActivePoolList
	' Description:       This function returns the companies in Active Pool in CompanyID|CompanyID|...|...
	'						format
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 10:30
	'--------------------------------------------------------------------------------*/
	function jfn_GetActivePoolList() {
		var strReturn
		var intLoop
		var arrActivePool
		
		arrActivePool = String(document.frmStore.hdnActivePool.value).split(SEPARATOR_PIPE_NC)
		strReturn = ""
		for (intLoop=0; intLoop<arrActivePool.length;intLoop=intLoop+2) {
			strReturn = strReturn + arrActivePool[intLoop] + SEPARATOR_PIPE_NC
		}
		
		// remove last pipe..
		strReturn = String(strReturn).substring(0, String(strReturn).length-SEPARATOR_PIPE_NC_LEN)
		return strReturn
			
	}

	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getPortfolioData
	' Description:       This function reeceives the data back from Select Entities screen
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 11:00
	'	Modified   :	     106695 on 10-10-2003 Reason: PVCS Defect # 208
	'--------------------------------------------------------------------------------*/
	function jfn_getPortfolioData(PFID,ActPool,PeerType,PeerID,PFName,Status,SelCmpId,SectShortName,UpdateActPool) {
		var strCompanyList
		var oFrmStore = document.frmStore
		var oFrmTab   = document.frmTabChanged 
	
		if(UpdateActPool==false)
		{
			
			if ((String(SelCmpId) != '') && (String(SelCmpId) != 'undefined'))
				oFrmStore.hdnSelectedCompanyID.value = SelCmpId
			else
				oFrmStore.hdnSelectedCompanyID.value = ''
				
			// CR-391, Modified by 106695 on 30-09-2003
			// checks for the value of the variable which will indicate whether QA page has to be loaded from
			// Welcome Page or not		
			// CR-1280v1: Modified by 181154 on 22-04-2009
			// Checks for the value of the variable which will indicate whether QA page has to be loaded from
			// Sector Analysis Page or not		
			if(oFrmTab.hdnFunctionToShow.value=="WELCOME" || oFrmTab.hdnFunctionToShow.value=="SECTOR ANALYSIS")
			{
				if (intAction =="0")
				  {
				    jfn_TabClick('QA')
				    // Modified by 106695 on 10-10-2003 for fixing PVCS Defect # 208
				    jfn_setFocusToContent();
			      return 
					}
			}
				
			if(oFrmTab.hdnFunctionToShow.value=="QUEST_ANALYSIS")
			{
				if (oFrmTab.hdnCurrentEntity.value == 'NO_COMPANY') {
						oFrmTab.hdnCurrentEntity.value = ""
						jfn_TabClick('QA')
					} else
						window.parent.frames['fraLeft'].jfn_LoadQAPanel(UpdateActPool)
			}
			jfn_setFocusToContent();
			return 
		}
		else
		{			
			strCompanyList = String(ActPool).replace(/\^\^~/g, SEPARATOR_PIPE_NC)

			jfn_UpdateCompaniesInActivePool(strCompanyList, Status, PeerType, PeerID,PFID, PFName)
			if ((String(SelCmpId) != '') && (String(SelCmpId) != 'undefined'))
				oFrmStore.hdnSelectedCompanyID.value = SelCmpId
			else
				oFrmStore.hdnSelectedCompanyID.value = ''
	
			switch (oFrmTab.hdnFunctionToShow.value) {
				case "WELCOME":
				  // CR-391, Modified by 106695 on 30-09-2003
		      // calls the function of Navigation Controller to set the value which will indicate whether QA page has to be loaded from
		      // Welcome Page or not	
				  if (intAction =="0")
				  {
				    jfn_TabClick('QA')
					}
					 break;
				case "QUEST_ANALYSIS":
					//alert(String(window.parent.frames['fraContent'].document.name))
					if (oFrmTab.hdnCurrentEntity.value == 'NO_COMPANY') {
						oFrmTab.hdnCurrentEntity.value = ""
						jfn_TabClick('QA')
					} else
						window.parent.frames['fraLeft'].jfn_LoadQAPanel()
					
					break;
				case "PORTFOLIO":
					
					window.parent.frames['fraLeft'].jfn_getPortfolioData(PFID,ActPool,PeerType,PeerID,PFName,Status,SelCmpId,SectShortName)
					break;
				case "SEARCH":
					break;				
				case "TRIANGLE":
					window.parent.frames['fraLeft'].jfn_getPortfolioData(PFID,ActPool,PeerType,PeerID,PFName,Status,SelCmpId,SectShortName)
					break;
				case "CITN":
					break;
				// Modified by 181154 for CR-1280v1: START
				// Added case "SECTOR ANALYSIS" for Sector Analysis tab
				case "SECTOR ANALYSIS":				  
					if (intAction =="0")
					{
						jfn_TabClick('QA')
					}
					break;
				// Modified by 181154 for CR-1280v1: START
				default:
			}
		}
		jfn_setFocusToContent();
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowSavePortfolio
	' Description:       This function displays the Save portfolio screen, and returns the
	'						window reference.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:00
	'--------------------------------------------------------------------------------*/
	function jfn_ShowSavePortfolio() {
		var objForm = document.frmTabChanged
		var strUserType;
		var strURL = "../../Code/CM/SavePortfolio.asp"
		
		if (objForm.hdnIsAdminUser.value == "0") {
			strUserType			 = "Normal"	
			strWindowHeight      = "288"
		}
		else {
			strUserType			 = "Admin"	
			strWindowHeight      = "338"
		}
		
		strURL = strURL +  '?QuestGroup=' + objForm.hdnQuestGroupID.value
		strURL = strURL +  '&UserId=' + objForm.hdnSystemUserID.value
		strURL = strURL +  '&ObjectId=' + document.frmStore.hdnPortfolioID.value
		strURL = strURL +  '&UserType=' + strUserType;
		
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no," + jfn_getPopupSizeParameters() + ",width=370,height=" + strWindowHeight;
		
		if (!winSavePortfolio) 
			winSavePortfolio = window.open(strURL,"_blank", strOptions)
		else {
			if (!winSavePortfolio.closed)
				winSavePortfolio.focus();
			else
				winSavePortfolio = window.open(strURL,"_blank", strOptions)
			}
		return winSavePortfolio		
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_transferDataToSavePortfolio
	' Description:       This function passes the data to Save portfolio screen
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:00
	'--------------------------------------------------------------------------------*/
	function jfn_transferDataToSavePortfolio() {
		var strReturn
		var intLoop
		var arrActivePool
		
		arrActivePool = String(document.frmStore.hdnActivePool.value).split(SEPARATOR_PIPE_NC)
		strReturn = ""
		for (intLoop=0; intLoop<arrActivePool.length;intLoop=intLoop+2) {
			strReturn = strReturn + arrActivePool[intLoop] + SEPARATOR_CARAT_NC
		}
		
		// remove last carat and add two pipes (as per coded in save portfolio to receive peer type and ID.
		strReturn = String(strReturn).substring(0, String(strReturn).length-SEPARATOR_CARAT_NC_LEN) + SEPARATOR_PIPE_NC + SEPARATOR_PIPE_NC
		
		return strReturn
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getSavedData
	' Description:       This function reeceives the data back from Save Portfolio screen
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:05
	'--------------------------------------------------------------------------------*/
	function jfn_getSavedData(CmpLstId,ObjName) {		
		document.frmStore.hdnPortfolioID.value = CmpLstId
		document.frmStore.hdnPortfolioName.value = ObjName	
		window.parent.frames['fraLeft'].jfn_UpdatePortfolioName(CmpLstId, ObjName)
		
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowLoadPortfolio
	' Description:       This function displays the Load portfolio screen, and returns the
	'						window reference.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:00
	'--------------------------------------------------------------------------------*/
	function jfn_ShowLoadPortfolio() {
		var objForm = document.frmTabChanged
		
		var strUserType;
		if (objForm.hdnIsAdminUser.value == "0") {
			strUserType			 = "Normal";	
		}
		else {
			strUserType			 = "Admin";	
		}
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no," + ",height=288,width=370," + jfn_getPopupSizeParameters() + ",height=288,width=370"
		var strURL = "../../Code/CM/LoadPortfolio.asp"
		
		
		strURL = strURL +  '?QuestGroup=' + objForm.hdnQuestGroupID.value;
		strURL = strURL +  '&UserId=' + objForm.hdnSystemUserID.value;
		strURL = strURL +  '&UserType=' + strUserType;
		
		if (!winLoadPortfolio) {
			winLoadPortfolio = window.open(strURL,"_blank", strOptions)
		} else {
			if (!winLoadPortfolio.closed) {
				winLoadPortfolio.focus();
			} else {
				winLoadPortfolio = window.open(strURL,"_blank", strOptions)
			}
		}
		return winLoadPortfolio	
	}


	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getLoadPortfolioData
	' Description:       This function reeceives the data back from Load Portfolio screen
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:15
	'--------------------------------------------------------------------------------*/
	function jfn_getLoadPortfolioData(PFID, PFName, CmpLst, PeerData) {
		var objForm = document.frmStore
		objForm.hdnPortfolioID.value = PFID
		objForm.hdnPortfolioName.value = PFName
		objForm.hdnActivePool.value = CmpLst
		objForm.hdnPeerID.value = ""
		objForm.hdnPeerType.value = ""
		objForm.hdnActivePoolType.value = "L"
		
		// peer data is being ignored.. as it would be blank always
		
		// Call fn of Control Panel to update recent selection name with Portfolio name
		//window.parent.frames['fraLeft'].jfn_UpdatePortfolioName(PFID, PFName)
	
		jfn_ShowQuestAnalysisTab();//ADDED BY 189433 FOR CR1280V1 
		window.parent.frames['fraLeft'].window_onload()
		
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_DeletePortfolio
	' Description:       This function opens up the delete portfolio screen, that deletes
	'						the passed portfolio ID and closes itself.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       05-09-2002 12:00
	'--------------------------------------------------------------------------------*/
	function jfn_DeletePortfolio() {
		//var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,left=0,top=0,width=0,height=0"
		
		
		var strURL = "../../Code/CM/DeletePortfolio.asp"
		
		
		strURL = strURL +  '?strPortfolioID=' + document.frmStore.hdnPortfolioID.value
		strURL = strURL +  '&strUserId=' + document.frmTabChanged.hdnSystemUserID.value
				
		window.parent.frames['fraContent'].location.href = strURL
		return winDeletePortfolio	
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getDeletePortfolioData
	' Description:       This function reeceives the data back from delete Portfolio screen
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       09-09-2002 12:35
	'--------------------------------------------------------------------------------*/
	function jfn_getDeletePortfolioData(strPortfolioID) {
		var objForm = document.frmStore
		objForm.hdnPortfolioID.value = ''
		objForm.hdnPortfolioName.value = ''
		objForm.hdnActivePool.value = ''
		objForm.hdnPeerID.value = ""
		objForm.hdnActivePoolType.value = 'L'
		objForm.hdnPeerType.value = ""
		document.frmTabChanged.hdnCurrentEntity.value = ""
		
		// since we deleted the portfolio.. there would be no company available in
		// recent selections.. hence display the no company selected page..
		jfn_TabClick('QA')		
			
	}
	
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ShowCurrentEntity
	' Description:       
	' Created by :       102661, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       26-Aug-2003  
	' Modified   :		 3/9/2003  - 102661, Remove the code for setting focus on MyQuest
	' Modified   :		 3/9/2003  - 102661, Remove the call to function jfn_TabClick('WC') in case of default
	'--------------------------------------------------------------------------------*/
	function jfn_ShowCurrentEntity(argCurrentEntity) 
	{
		switch(argCurrentEntity)
		{
			case 'WELCOME' : jfn_TabClick('WC');
								break;
			case 'SUMMARY' : jfn_TabClick('QA');
								break;
			case 'STRATEGY'	: jfn_TabClick('QA');
								break;
			case 'VALUATION': jfn_TabClick('QA');
								break;
			case 'COMMENTARY': jfn_TabClick('QA');
								break;
			case 'STATISTICS': jfn_TabClick('QA');
								break;
			case 'SENSITIVITY': jfn_TabClick('QA');
								break;
			case 'MOMENTUM'	: jfn_TabClick('QA');
								break;
			case 'CHARTING'	: jfn_TabClick('QA');
								break;
			case 'MODELLER'	: jfn_TabClick('QA');
								break;
			case 'CITN'		: jfn_TabClick('CT');
								break;
			case 'PORTFOLIO': jfn_TabClick('PR');
								break;
			case 'SEARCH'	: jfn_TabClick('SS');
								break;
			case 'TRIANGLE'	: jfn_TabClick('TR');
								break;
			// Added by Nimisha for CR-1280v1 - Quest Website Sector Analysis: START
			case 'SECTOR_STRATEGY'  : jfn_TabClick('SA');
										break;
			case 'SECTOR_VALUATION' : jfn_TabClick('SA');
										break;
			case 'SECTOR_STATISTICS': jfn_TabClick('SA');
										break;
			case 'SECTOR_SUMMARY': jfn_TabClick('SA');
										break;
			case 'SECTOR_MOMENTUM': jfn_TabClick('SA');
										break;
			case 'SECTOR_COMMENTARY': jfn_TabClick('SA');
										break;
			case 'SECTOR_CHARTING': jfn_TabClick('SA');
										break;
			case 'SECTOR_SENSITIVITY': jfn_TabClick('SA');
										break;
			case 'SECTOR_MODELLER': jfn_TabClick('SA');
										break;
			// Added by Nimisha for CR-1280v1 - Quest Website Sector Analysis: END
			default : 
						//102661 - CR 325
						//jfn_TabClick('WC');
						//		break;
		}
		//jfn_SetFocusOnMyQuest()
	}
	
	//Commented on 10/9/2003 - 102661 - Close MyQuest Window.
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetFocusOnMyQuest
	' Description:       This function sets the focus on MyQuest screen.
	' Created by :       102661, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       26 - August-2003 13:10 - CR 325
	' Modified By :		 
	'--------------------------------------------------------------------------------*/
	/*function jfn_SetFocusOnMyQuest()
	{
		if(winMyQuest && (!(winMyQuest.closed)))
		{
			winMyQuest.focus();
		}
	}*/
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_GetUserSettings
	' Description:       This function receives the date from MyQuest screen.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       31-July-2002 14:30 
	' Modified By :		 26- August-2003 13:10 - CR 325
	' Modified By :		 104304 - 10/9/2003 - PVCS # 167
	'--------------------------------------------------------------------------------*/
	function jfn_GetUserSettings(UId, QGID, QGName, IPID, IPName, StkIdntID, StkIdntName,UserEmail) {
		var objForm = document.frmTabChanged
		var blnChkSettingsChg
		blnChkSettingsChg = false
		//alert(objForm.hdnSectorURLCall.value);
		// changed the Quest Group.. clear Active pool....
		//added by 189433 for sector hyperlink--R-78
		
		if(objForm.hdnSectorURLCall.value == "1")
		{
			//do nothing
			
		}
		else
		{
			if (jfn_Trim(QGID) != jfn_Trim(objForm.hdnQuestGroupID.value)) 
			{		
				jfn_UpdateCompaniesInActivePool("", "L", "", "", "", "")		
				jfn_UpdateSectorsInActivePool (""); // Added by 181154 for CR-1280 - Quest Website Sector Analysis.
				blnChkSettingsChg = true
			}
			// Check if the INDEX PROVIDER is changed... 
			if (jfn_Trim(IPID) != jfn_Trim(objForm.hdnIndexProviderID.value))
			{
				blnChkSettingsChg = true
			}
		
			objForm.hdnUserID.value					= UId
			document.frmLogin.hdnUserID.value		= UId
			objForm.hdnQuestGroupID.value			= QGID
			objForm.hdnQuestGroupName.value			= QGName
			objForm.hdnIndexProviderID.value		= IPID
			objForm.hdnIndexProviderName.value		= IPName
			objForm.hdnStockIdentifierID.value		= StkIdntID
			objForm.hdnStockIdentifierName.value	= StkIdntName
			//104304 - 10/9/2003 - PVCS # 167
			document.frmQuestMail.hdnEmailFromAddress.value = UserEmail
			document.frmQuestMail.hdnEmailBCCAddresses.value = UserEmail
			//102661 - 26/8/2003 - CR 325 - Reinitialize the screens on click of My Quest Link.		
		
			if (objForm.hdnCurrentEntity.value == 'WELCOME')
			{
				window.parent.frames['fraLeft'].jfn_UpdateUserSettings(UId, QGID, QGName, IPID, IPName, StkIdntID, StkIdntName)
			}
			//ADDED BY 189433 FOR MARKET AVERAGE
		
			if (objForm.hdnCurrentEntity.value == 'NO_SECTOR')
			{			
				//jfn_TabClick('SA');
				document.frmStore.hdnSectorActivePool.value = ''
				jfn_ShowSectorAnalysisTab();
			}
			//end

			
			//---CR 321 By:104304---------------------------------- 
			if(blnChkSettingsChg)
			{		
				//By 126881:QSTP-5520:set hdnQuestGroupChanged variable to indicate that quest group changed thru my quest window 
				//Used to change the alert message when Quest Group temporarily modified to show Hyperlinked scenario search result.
				//If Quest Group modified by user using My Quest window hdnQuestGroupChanged hold true else false
				//value is modified from MyQuest.asp-jfn_AfterSave-winOpener.jfn_GetUserSettings.
				
				objForm.hdnQuestGroupChanged.value	= "true";
				//by 126881:QSTP-5520:End
			 
			  //##sid
			
			  // call function for clearing Modeller mirror form
				jfn_clearModellerMirrorForm()
				
				//Added By 151351 for CR 1122 - page retention of QA complex pages- Start
				// call function for clearing Modeller mirror form
				jfn_clearSensitivityMirrorForm()
				// call function for clearing Modeller mirror form
				jfn_clearChartMirrorForm()
				//Added By 151351 for CR 1122 - page retention of QA complex pages- End
				
				// call function for clearing compare mirror form
				jfn_clearCompareMirrorForm()
				// call function to update compare mirror form with updated default settings
				jfn_setDefaultValuesInCompareMirrorForm() 
			
				// call function for clearing search mirror form
				jfn_clearSearchMirrorForm()  
				// call function to update search mirror form with updated default settings
				jfn_setDefaultValuesInSearchMirrorForm()
				
				// call function for clearing Triangle mirror form
				jfn_ClearTriangleMirrorForm()
				// call function to update Triangle mirror form with updated default settings
				jfn_SetDfltValInTRMrrForm() 
		
				//CR-518		
				jfn_ClearWelcomeForm()
				jfn_SetVaLinWelcomeForm()

				//Added by 181154 for CR: Update recent selections options for sector data						
				jfn_ClearSectorInfo()
				
				//102661 - 26/8/2003 - CR 325 - Reinitialize the screens on click of My Quest Link.
				jfn_ShowCurrentEntity(objForm.hdnCurrentEntity.value)
			}
		}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ClearSectorInfo()
	'
	' Description:       Clears the Sector Information from the frmTabChanged form.
	'
	' Created by :       181154, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       18-May-2009, 03:15:00 P.M 
	'--------------------------------------------------------------------------------*/
	function jfn_ClearSectorInfo()
	{
		document.frmTabChanged.hdnSectorID.value = "";
		document.frmTabChanged.hdnSectorName.value = "";		
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetInformationCourier
	' Description:       This function sets the Information Courier variable..
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       04-Aug-2002 10:15 
	' Modified	 :		16/Dec/2003 2:17; By:104304; Reason:To fix QSTP 2817
	'--------------------------------------------------------------------------------*/
	function jfn_SetInformationCourier(strValue)
	{
		document.frmTabChanged.hdnInformationCourier.value = strValue
		//To fix QSTP 2817
		document.idTriangleControlPanel.hdnCurrentCompanyID.value=strValue
		if(strValue !="")	
		{
			document.idTriangleControlPanel.hdnEntity_Type.value = 'COMPANY';
		}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetInformationCourierSector
	' Description:       This function sets the Information Courier variable..
	' Created by :       189433, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       01-June-2009 11:15AM 
	
	'--------------------------------------------------------------------------------*/
	function jfn_SetInformationCourierSector(strValue)
	{
		document.frmTabChanged.hdnInformationCourier.value = strValue
		//To fix QSTP 2817
		document.idTriangleControlPanel.hdnCurrentSectorID.value=strValue
		if(strValue !="")	
		{
			document.idTriangleControlPanel.hdnEntity_Type.value = 'SECTOR';
		}
	}
		
		
		/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getValuesFromCP
	' Description:       This function calls the control panel specific fucntion depending on the value of hdnCurrentEntity i.e the live tab
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       07-Nov-2002 10:37 
	' Modified   :       By 106695, Reason : Modeller Development
	' Modified By:		 120387 HCL Technologies Ltd, Gurgaon, INDIA.
	' Date		 :		 27-Feb-2007
	' Reason	 :		 To Fix QstP 5226 - Added braces to enclose conditional code
	'--------------------------------------------------------------------------------*/
	function jfn_getValuesFromCP()
	{
		var strCurrentEntity			// will hold the value of the currentlt live tab
		
		strCurrentEntity	= document.frmTabChanged.hdnCurrentEntity.value 
		//if(strCurrentEntity.toUpperCase()=="SUMMARY" || strCurrentEntity.toUpperCase()=="STRATEGY" || 
				
		switch(strCurrentEntity.toUpperCase())
		{
			case "MODELLER":
			try
			{
				if(window.parent.frames['fraContent'].location.href.indexOf("DisplayQAMessage.asp")==-1)
				{
					window.parent.frames['fraContent'].jfn_CalculateValues();
					window.parent.frames['fraContent'].jfn_SetValuesInControlPanel();
				}
			}
			catch(ex)
			{
				//do nothing
			}
			//making a copy of that page to the navigation controller
			//jfn_getValuesFromModellerCP(); 
			break;
			
			case "PORTFOLIO":
				if(window.parent.frames['fraContent'].location.href.indexOf("DisplayMessage.asp")==-1)
					jfn_getValuesFromCompareCP(); 
			break;
			
			case "SEARCH":	
				if(window.parent.frames['fraContent'].location.href.indexOf("DisplayMessage.asp")==-1)
					jfn_populateAndGetValuesFromSearch(); 
			break;
			//Reason:CR 321  By:104304
			case "TRIANGLE":
				if(window.parent.frames['fraContent'].location.href.indexOf("DisplayMessage.asp")==-1)
					jfn_GetValuesFromTriangleCP(); 
			break;
			//Reason : CR-518
			case "WELCOME"	:
				if(window.parent.frames['fraContent'].location.href.indexOf("DisplayMessage.asp")==-1)
					//alert("en")
					jfn_GetValuesFromWelcomeCP(); 
			break;
			
			//Code added for Charting and sensitivity page retention - CR 1122- Start
			case "SENSITIVITY":
				try
				{
					if(window.parent.frames['fraContent'].location.href.indexOf("DisplayQAMessage.asp")==-1)
					{
						window.parent.frames['fraContent'].jfn_SetValuesInControlPanel();
					}
				}
				catch(ex)
				{
					//do nothing
				}
			break;
			
			case "CHARTING":
				try
				{
					if(window.parent.frames['fraContent'].location.href.indexOf("DisplayQAMessage.asp")==-1)
					{
						window.parent.frames['fraContent'].jfn_SetValuesInControlPanel();
					}
				}
				catch(ex)
				{
					//do nothing
				}
			break;
			
			//added by 189433 FOR CR1280V1--starts
			case "SECTOR_CHARTING":
				try
				{
					if(window.parent.frames['fraContent'].location.href.indexOf("DisplaySAMessage.asp")==-1)
					{
						window.parent.frames['fraContent'].jfn_SetValuesInControlPanel();
					}
				}
				catch(ex)
				{
					//do nothing
				}
			break;
			
			//end


			//Code added for Charting and sensitivity page retention - CR 1122- End	
		} 
		//Case to call retention functions even when user has shifted to any page other than
		//scenario pages of QA tab and then moved to PR/SS/TR etc. tabs 
		switch(strCurrentEntity.toUpperCase())
		{
			case "SUMMARY":
			case "STRATEGY":
			case "MOMENTUM":
			case "VALUATION":
			case "COMMENTARY":
			case "STATISTICS":
			case "CHARTING":
			case "SENSITIVITY":
			case "MODELLER":
			case "SECTOR_CHARTING":
				jfn_getValuesFromChartingCP();
				jfn_getValuesFromSensitivityCP();
				jfn_getValuesFromModellerCP();
				jfn_getValuesFromSectorChartingCP();
			break;
		}
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_GetValuesFromWelcomeCP
	' Description:       This function populates the Welcome mirror form with values from the welcome control panel form
	' Created by :      
	' 
	' Date-Time  :      CR-518
	'
	'--------------------------------------------------------------------------------*/
	function jfn_GetValuesFromWelcomeCP()
	{
		if(window.parent.frames['fraLeft'].location.href.indexOf("WelcomeControlPanel.asp")==-1)
			return
		// make the form objects
		var oWLFrm =   document.frmWLControlPanel 
		var oWCFrm	  = window.parent.frames['fraLeft'].document.frmWLControlPanel
		// populate the form with the values from the Welcome control panel form
		oWLFrm.hdnQuestGroupID.value					= oWCFrm.hdnQuestGroupID.value
		
	}
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getValuesFromCompareCP
	' Description:       This function populates the compare mirror form with values from the compare control panel form
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       07-Nov-2002 10:00 
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  12 Feb 2007
	'	 Reason		 :	CR-974v4 - added code related to TICKER requirements
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  12 July 2007
	'	 Reason		 :	CR-1070v2 - added code related to 'See Country' related requirements
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  18 Oct 2007
	'	 Reason		 :	CR-1049v6 - added code related to portfolio & report scenario functionality
	'--------------------------------------------------------------------------------*/
	function jfn_getValuesFromCompareCP()
	{
		
		if(window.parent.frames['fraLeft'].location.href.indexOf("QuestCompareControlPanel.asp")==-1)
			return
		// make the form objects
		var oMrrFrm =	document.frmCompareControlPanel 
		
		var oCPFrm	  = window.parent.frames['fraLeft'].document.frmCompareControlPanel
		
		// populate the form with the values from the compare control panel form
		
		
		//populating system parameters
		oMrrFrm.hdnAutoExec.value					= oCPFrm.hdnAutoExec.value   
		
		// populating report related parameters
		oMrrFrm.hdnReportId.value					= oCPFrm.hdnReportId.value
		oMrrFrm.hdnReportName.value					= oCPFrm.hdnReportName.value
		oMrrFrm.hdnDataItemYrs.value				= oCPFrm.hdnDataItemYrs.value
		oMrrFrm.hdnDataItemYrsDescriptive.value		= oCPFrm.hdnDataItemYrsDescriptive.value
		oMrrFrm.hdnSortOrder.value					= oCPFrm.hdnSortOrder.value
		oMrrFrm.hdnSortColInfo.value				= oCPFrm.hdnSortColInfo.value
		oMrrFrm.hdnDeleteReport.value				= oCPFrm.hdnDeleteReport.value
		oMrrFrm.hdnFetchReportList.value			= oCPFrm.hdnFetchReportList.value
		oMrrFrm.hdnReportList.value					= oCPFrm.hdnReportList.value
		oMrrFrm.hdnSelectedReport.value				= oCPFrm.hdnSelectedReport.value
		oMrrFrm.hdnRptFormatChanged.value			= oCPFrm.hdnRptFormatChanged.value
		oMrrFrm.hdnRptDefinitionChanged.value		= oCPFrm.hdnRptDefinitionChanged.value
		
		
		oMrrFrm.hdnOrgDataItemYrs.value				= oCPFrm.hdnOrgDataItemYrs.value
		oMrrFrm.hdnOrgSortOrder.value				= oCPFrm.hdnOrgSortOrder.value
		oMrrFrm.hdnOrgSortColInfo.value				= oCPFrm.hdnOrgSortColInfo.value
		oMrrFrm.hdnOrgDataItemYrsDescriptive.value	= oCPFrm.hdnOrgDataItemYrsDescriptive.value
	
		//populating portfolio related parameters	
		oMrrFrm.hdnPortfolioId.value				= oCPFrm.hdnPortfolioId.value
		oMrrFrm.hdnDeletePortfolio.value			= oCPFrm.hdnDeletePortfolio.value
		oMrrFrm.hdnFetchPortfolioList.value			= oCPFrm.hdnFetchPortfolioList.value
		oMrrFrm.hdnPortfolioList.value				= oCPFrm.hdnAutoExec.value
		oMrrFrm.hdnSelectedPortfolio.value			= oCPFrm.hdnSelectedPortfolio.value
		oMrrFrm.hdnCompanyList.value				= oCPFrm.hdnCompanyList.value
		oMrrFrm.hdnCompanyListName.value			= oCPFrm.hdnCompanyListName.value
		oMrrFrm.hdnCompanyIds.value					= oCPFrm.hdnCompanyIds.value
		oMrrFrm.hdnPeerId.value						= oCPFrm.hdnPeerId.value
		oMrrFrm.hdnPeerType.value					= oCPFrm.hdnPeerType.value
		oMrrFrm.hdnSectorShortName.value			= oCPFrm.hdnSectorShortName.value
		// populating page specific parameters.
		oMrrFrm.hdnSpecialCase.value				= oCPFrm.hdnSpecialCase.value
		oMrrFrm.hdnPreservedCompanyList.value		= oCPFrm.hdnPreservedCompanyList.value
		oMrrFrm.hdnRetrieveRptList.value			= oCPFrm.hdnRetrieveRptList.value
		//By 126881: CR 785 V4
		oMrrFrm.hdnShowSector.value		= oCPFrm.hdnShowSector.value
		oMrrFrm.hdnSortSector.value		= oCPFrm.hdnSortSector.value
		//By 151282: CR-974v4 - START
		oMrrFrm.hdnShowTicker.value		= oCPFrm.hdnShowTicker.value
		oMrrFrm.hdnSortTicker.value		= oCPFrm.hdnSortTicker.value
		//By 151282: CR-974v4 - END	
		//By 151282: CR-1070v2 - START
		oMrrFrm.hdnShowCountry.value		= oCPFrm.hdnShowCountry.value
		oMrrFrm.hdnSortCountry.value		= oCPFrm.hdnSortCountry.value
		//By 151282: CR-1070v2 - END	
		
		//By 151282: CR-1049 - START
		oMrrFrm.hdnPRScenarioId.value		= oCPFrm.hdnPRScenarioId.value
		oMrrFrm.hdnPRScenarioName.value		= oCPFrm.hdnPRScenarioName.value
		oMrrFrm.hdnPRScenarioType.value		= oCPFrm.hdnPRScenarioType.value
		
		oMrrFrm.hdnPRPortfolioType.value	= oCPFrm.hdnPRPortfolioType.value
		oMrrFrm.hdnPRReportType.value		= oCPFrm.hdnPRReportType.value
		
		oMrrFrm.hdnOrgPortfolioId.value		= oCPFrm.hdnOrgPortfolioId.value
		oMrrFrm.hdnOrgReportId.value		= oCPFrm.hdnOrgReportId.value
		oMrrFrm.hdnOrgReportIdType.value	= oCPFrm.hdnOrgReportIdType.value
		
		oMrrFrm.hdnArticlePortfolioAutoSave.value	= oCPFrm.hdnArticlePortfolioAutoSave.value
		oMrrFrm.hdnArticleReportAutoSave.value		= oCPFrm.hdnArticleReportAutoSave.value
		//CR 1121 - By 151351
		oMrrFrm.hdnArticleScenarioAutoSave.value	= oCPFrm.hdnArticleScenarioAutoSave.value
		
		//UTC
		//alert("top frame compare mirror form copied from compare control panel. left hdnPRScenarioName = " + oCPFrm.hdnPRScenarioName.value);

		//By 151282: CR-1049 - END
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_setDefaultValuesInCompareMirrorForm()
	' Description:       This function sets the default values in the compare mirror form when the user changes his default settings
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       022-Nov-2002 18:45
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  18 Oct 2007
	'	 Reason		 :	CR-1049v6 - added code related to portfolio & report scenario functionality
	'--------------------------------------------------------------------------------*/
	function jfn_setDefaultValuesInCompareMirrorForm()
	{
		var oFrm = document.frmTabChanged
		
		var oCmpMrrFrm = document.frmCompareControlPanel 
		
		oCmpMrrFrm.hdnUserId.value				=  oFrm.hdnUserID.value 
		oCmpMrrFrm.hdnQuestGroupID.value        =  oFrm.hdnQuestGroupID.value
		oCmpMrrFrm.hdnIndexProviderID.value     =  oFrm.hdnIndexProviderID.value
		oCmpMrrFrm.hdnStockIdentifierName.value =  oFrm.hdnStockIdentifierName.value
	}
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_setDefaultValuesInSearchMirrorForm()
	' Description:       This function sets the default values in the compare mirror form when the user changes his default settings
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       022-Nov-2002 18:45
	'
	'--------------------------------------------------------------------------------*/
	function jfn_setDefaultValuesInSearchMirrorForm()
	{
		var oFrm = document.frmTabChanged
		
		var oSrchMrrFrm = document.frmSearchControlPanel 
		
		oSrchMrrFrm.hdnUserId.value			 = oFrm.hdnUserID.value 
		oSrchMrrFrm.hdnQuestGroup.value      = oFrm.hdnQuestGroupID.value
		oSrchMrrFrm.hdnIndexProvider.value   = oFrm.hdnIndexProviderID.value
		oSrchMrrFrm.hdnStockIdentifier.value = oFrm.hdnStockIdentifierName.value
	}
		
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_clearCompareMirrorForm()
	' Description:       This function cleares the compare mirror form variables
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       07-Nov-2002 12:20
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  18 Oct 2007
	'	 Reason		 :	CR-1049v6 - added code related to portfolio & report scenario functionality
	'--------------------------------------------------------------------------------*/
		function jfn_clearCompareMirrorForm()
		{
			// make the form objects
			var oMrrFrm =	document.frmCompareControlPanel 
			
			oMrrFrm.hdnAutoExec.value				=	""
			                                         
			// populating report related parameters  
			oMrrFrm.hdnReportId.value				=	""
			oMrrFrm.hdnReportName.value				=	"Untitled Report"
			oMrrFrm.hdnDataItemYrs.value			=	""
			oMrrFrm.hdnDataItemYrsDescriptive.value = ""
			oMrrFrm.hdnSortOrder.value				=	""
			oMrrFrm.hdnSortColInfo.value			=	""
			oMrrFrm.hdnDeleteReport.value			=	""
			oMrrFrm.hdnFetchReportList.value		=	""
			oMrrFrm.hdnReportList.value				=	""
			oMrrFrm.hdnSelectedReport.value			=	"U"
			oMrrFrm.hdnRptFormatChanged.value		=	"false"
			oMrrFrm.hdnRptDefinitionChanged.value	=	"false"
			                                         
			                                         
			oMrrFrm.hdnOrgDataItemYrs.value			=	""
			oMrrFrm.hdnOrgSortOrder.value			=	""
			oMrrFrm.hdnOrgSortColInfo.value			=	""
			oMrrFrm.hdnOrgDataItemYrsDescriptive.value	=	""
			                                         
			//populating portfolio related parameters
			oMrrFrm.hdnPortfolioId.value			=	""
			oMrrFrm.hdnDeletePortfolio.value		=	""
			oMrrFrm.hdnFetchPortfolioList.value		=	""
			oMrrFrm.hdnPortfolioList.value			=	""
			oMrrFrm.hdnSelectedPortfolio.value		=	"S"
			oMrrFrm.hdnCompanyList.value			=	""
			oMrrFrm.hdnCompanyListName.value		=	""
			oMrrFrm.hdnCompanyIds.value				=	""
			oMrrFrm.hdnPeerId.value					=	""
			oMrrFrm.hdnPeerType.value				=	""
			oMrrFrm.hdnSectorShortName.value		=	""                                         
			// populating page specific parameters.  
			oMrrFrm.hdnSpecialCase.value			=	""
			oMrrFrm.hdnPreservedCompanyList.value	=	""
			oMrrFrm.hdnRetrieveRptList.value		=	"1"
			oMrrFrm.hdnInformationCourier.value		=   ""	
			
			//TODO: CR-785/974/1070 related left old work for clearing the hidden vars ???
			
			//By 151282: CR-1049 - START
			oMrrFrm.hdnPRScenarioId.value		= ""
			oMrrFrm.hdnPRScenarioName.value		= "User Defined Scenario"
			oMrrFrm.hdnPRScenarioType.value		= ""
			
			oMrrFrm.hdnPRPortfolioType.value	= ""
			oMrrFrm.hdnPRReportType.value		= ""
			
			oMrrFrm.hdnOrgPortfolioId.value		= ""
			oMrrFrm.hdnOrgReportId.value		= ""
			oMrrFrm.hdnOrgReportIdType.value	= ""
			
			oMrrFrm.hdnArticlePortfolioAutoSave.value	= "0"
			oMrrFrm.hdnArticleReportAutoSave.value		= "0"
			//CR 1121 - By 151351
			oMrrFrm.hdnArticleScenarioAutoSave.value	= "0"
			
			//UTC			
			//alert("top frame compare mirror form cleared. top hdnPRScenarioName = " + oMrrFrm.hdnPRScenarioName.value);

			//By 151282: CR-1049 - END
		}
		
		/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_clearSearchMirrorForm()
	' Description:       This function cleares the search mirror form variables
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       07-Nov-2002 12:20
	'
	'--------------------------------------------------------------------------------*/
		function jfn_clearSearchMirrorForm()
		{
			// make the form objects
			var oMrrFrm =	document.frmSearchControlPanel 
			
		
		// populate the form with the values from the compare control panel form
			oMrrFrm.hdnAutoExec.value			= ""
			oMrrFrm.hdnSearchId.value			= ""
			oMrrFrm.hdnSearchName.value			= "User Defined Screen"
			oMrrFrm.hdnSearchCriterion.value	= ""
			oMrrFrm.hdnMatches.value			= "0"
			oMrrFrm.hdnSortOrder.value			= ""
			oMrrFrm.hdnSortColInfo.value		= ""
			
			oMrrFrm.hdnCriteriaCount.value		= ""
			oMrrFrm.hdnSearchHeaders.value		= ""
			oMrrFrm.hdnSearchChanged.value		= ""
			
			oMrrFrm.hdnOrgSearchCriterion.value	= ""
			oMrrFrm.hdnOrgSortOrder.value		= ""
			oMrrFrm.hdnOrgSortColInfo.value		= ""			
	
			
			oMrrFrm.hdnCompanyList.value		= ""
			
			oMrrFrm.hdnSelectedIndices.value	= ""
			oMrrFrm.hdnSelectedCountries.value	= ""
			oMrrFrm.hdnSelectedSectors.value	= ""
			
			oMrrFrm.hdnCount.value				= ""
			oMrrFrm.hdnActivePool.value			= ""
			
			oMrrFrm.hdnFavouritesMaster.value	= ""
			oMrrFrm.hdnFavouritesYearMaster.value	= ""
			oMrrFrm.hdnNonFavourites.value		= ""
			oMrrFrm.hdnSource.value				= ""
			oMrrFrm.hdnShowFilter.value			= "0"
			oMrrFrm.hdnShowSearchCriteria.value	= "0"
			oMrrFrm.hdnResultCount.value		= "0"
			oMrrFrm.hdnResultChanged.value		= "false"
			oMrrFrm.hdnCurrentPage.value		= "1"
					
		}
		
		/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_populateAndGetValuesFromSearch()
	' Description:       This function first calls the search content function for populating the most recent values
	'					 in the search control panel and then calls function for pulling values from search control panel.
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       22-Nov-2002 11:00
	'
	'--------------------------------------------------------------------------------*/
	function jfn_populateAndGetValuesFromSearch()
	{
		var strControlPageName				=  "SEARCHCRITERIA.ASP"
		var strURL							=  new String(window.parent.frames['fraContent'].location.href);
	
		// check whether the search criteria page is loaded in fraContent
		strURL = strURL.toUpperCase()	
		
		if (strURL.indexOf(strControlPageName ) != -1 )
		{
			// call content area's function for collecting the most recent search criterion on the content area.
			window.parent.frames['fraContent'].jfn_collectData('Collect','') 
		}
		
		jfn_getValuesFromSearchCP() 
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_getValuesFromSearchCP
	' Description:       This function populates the search mirror form with values from the search control panel form
	' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       08-Nov-2002 10:00 
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  12 Feb 2007
	'	 Reason		 :	CR-974v4 - added code related to TICKER requirements
	'
	'    Modified By :  151282, HCL Technologies Ltd, Gurgaon, India.
	'	 Date		 :  12 July 2007
	'	 Reason		 :	CR-1070v2 - added code related to 'See Country' related requirements
	'--------------------------------------------------------------------------------*/
	function jfn_getValuesFromSearchCP()
	{
		
		if(window.parent.frames['fraLeft'].location.href.indexOf("SearchControlPanel.asp")==-1)
			return
		
		// make the form objects
		var oMrrFrm = document.frmSearchControlPanel 
		
		/*
		if(mBlnIE)
		{
			var oCPFrm = window.parent.frames['fraLeft'].document.frmSearchControlPanel
		}
		else
		{
			var oCPFrm = window.parent.frames['fraLeft'].document.layers['divHiddenVariables'].document.frmSearchControlPanel
		}
		*/
		// CR 683v2 : FireFox Support
		var oCPFrm = window.parent.frames['fraLeft'].document.frmSearchControlPanel
			
		// populate the form with the values from the compare control panel form
			oMrrFrm.hdnAutoExec.value		 = oCPFrm.hdnAutoExec.value 
			oMrrFrm.hdnSearchId.value		 = oCPFrm.hdnSearchId.value
			oMrrFrm.hdnSearchName.value		 = oCPFrm.hdnSearchName.value
			oMrrFrm.hdnSearchCriterion.value = oCPFrm.hdnSearchCriterion.value
			oMrrFrm.hdnMatches.value		 = oCPFrm.hdnMatches.value
			oMrrFrm.hdnSortOrder.value		 = oCPFrm.hdnSortOrder.value
			oMrrFrm.hdnSortColInfo.value	 = oCPFrm.hdnSortColInfo.value
			
			oMrrFrm.hdnCriteriaCount.value	 = oCPFrm.hdnCriteriaCount.value
			oMrrFrm.hdnSearchHeaders.value	 = oCPFrm.hdnSearchHeaders.value
			oMrrFrm.hdnSearchChanged.value	 = oCPFrm.hdnSearchChanged.value
			
			oMrrFrm.hdnOrgSearchCriterion.value	= oCPFrm.hdnOrgSearchCriterion.value
			oMrrFrm.hdnOrgSortOrder.value	 = oCPFrm.hdnOrgSortOrder.value
			oMrrFrm.hdnOrgSortColInfo.value	 = oCPFrm.hdnOrgSortColInfo.value
			
	
			
		//	oMrrFrm.hdnCompanyList.value			= oCPFrm.hdnCompanyList.value
			
			oMrrFrm.hdnSelectedIndices.value   = oCPFrm.hdnSelectedIndices.value
			oMrrFrm.hdnSelectedCountries.value = oCPFrm.hdnSelectedCountries.value
			oMrrFrm.hdnSelectedSectors.value   = oCPFrm.hdnSelectedSectors.value
			
			oMrrFrm.hdnCount.value			   = oCPFrm.hdnCount.value
			oMrrFrm.hdnActivePool.value		   = oCPFrm.hdnActivePool.value
			
			oMrrFrm.hdnFavouritesMaster.value	= oCPFrm.hdnFavouritesMaster.value
			oMrrFrm.hdnFavouritesYearMaster.value	= oCPFrm.hdnFavouritesYearMaster.value
			oMrrFrm.hdnNonFavourites.value		= oCPFrm.hdnNonFavourites.value
			oMrrFrm.hdnSource.value				= oCPFrm.hdnSource.value
			oMrrFrm.hdnShowFilter.value			= oCPFrm.hdnShowFilter.value
			oMrrFrm.hdnShowSearchCriteria.value	= oCPFrm.hdnShowSearchCriteria.value
			oMrrFrm.hdnResultCount.value		= oCPFrm.hdnResultCount.value
			oMrrFrm.hdnResultChanged.value		= oCPFrm.hdnResultChanged.value
			oMrrFrm.hdnCurrentPage.value		= oCPFrm.hdnCurrentPage.value
			
			//CR 785 - Added By 120407 - Start
			oMrrFrm.hdnShowSector.value			= oCPFrm.hdnShowSector.value ;
			oMrrFrm.hdnSortSector.value			= oCPFrm.hdnSortSector.value ;
			//CR 785 - Added By 120407 - End
			//By 151282: CR-974v4 - START
			oMrrFrm.hdnShowTicker.value		= oCPFrm.hdnShowTicker.value
			oMrrFrm.hdnSortTicker.value		= oCPFrm.hdnSortTicker.value
			//By 151282: CR-974v4 - END	
			//By 151282: CR-1070v2 - START
			oMrrFrm.hdnShowCountry.value		= oCPFrm.hdnShowCountry.value
			oMrrFrm.hdnSortCountry.value		= oCPFrm.hdnSortCountry.value
			//By 151282: CR-1070v2 - END	
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetInformationCourierInCompareForm
	' Description:       This function sets the Information Courier variable in the Compare mirror form
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       07-Nov-2002 12:10
	'
	'--------------------------------------------------------------------------------*/
	function jfn_SetInformationCourierInCompareForm(strValue)
	{
		//if the value is not blank, call function for clearing values of compare mirror form if any  
		if(strValue!="")
		{
			jfn_clearCompareMirrorForm();
		}
		document.frmCompareControlPanel.hdnInformationCourier.value = strValue
		
	}
	
	//CR 321 By:104304
	//-----------------------TRIANGLE RELATED BLOCK OF CODE------------------------------
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_GetValuesFromTriangleCP
	' Description:       This function populates the Triangle mirror form with values from the Triangle control panel form
	' Created by :       104304, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       25-Aug-2003 11:00 AM 
	' Modified    :		 By 104304 On 24/02/2004.
	'					 CR 367
	'--------------------------------------------------------------------------------*/
	function jfn_GetValuesFromTriangleCP()
	{
		if(window.parent.frames['fraLeft'].location.href.indexOf("TriangleControlPanel.asp")==-1)
			return
		// make the form objects
		var oMrrFrm = document.idTriangleControlPanel 
		/*
		if(mBlnIE)
		{
			var oTRFrm = window.parent.frames['fraLeft'].document.idTriangleControlPanel
		}
		else
		{
			var oTRFrm = window.parent.frames['fraLeft'].document.layers['top'].document.idTriangleControlPanel
		}
		*/
		// CR 683v2 : FireFox Support
		var oTRFrm = window.parent.frames['fraLeft'].document.idTriangleControlPanel
		
		// populate the form with the values from the triangle control panel form
		// populating report related parameters
			oMrrFrm.hdnEntity_Type.value			= oTRFrm.hdnEntity_Type.value
			oMrrFrm.hdnQuestGroup.value				= oTRFrm.hdnQuestGroup.value
			oMrrFrm.hdnQuestGroupName.value			= oTRFrm.hdnQuestGroupName.value
			oMrrFrm.hdnIndexProvider.value			= oTRFrm.hdnIndexProvider.value
			oMrrFrm.hdnIndexProviderName.value		= oTRFrm.hdnIndexProviderName.value
			oMrrFrm.hdnStockIdentifierType.value	= oTRFrm.hdnStockIdentifierType.value
		//Weight related information
			oMrrFrm.hdnWeight_Value.value			= oTRFrm.hdnWeight_Value.value
			oMrrFrm.hdnWeight_Quality.value			= oTRFrm.hdnWeight_Quality.value
			oMrrFrm.hdnWeight_Momentum.value		= oTRFrm.hdnWeight_Momentum.value
		//Filter information
			oMrrFrm.hdnIndiceSelected.value			= oTRFrm.hdnIndiceSelected.value
			oMrrFrm.hdnSectorsSelected.value		= oTRFrm.hdnSectorsSelected.value
			oMrrFrm.hdnCountiesSelected.value		= oTRFrm.hdnCountiesSelected.value
			//Cr 321 By:104304 date:28-08-2003
			//Modified by 151351 for CR 1065- market cap filter modified
			//oMrrFrm.hdnMarketCap.value				= oTRFrm.hdnMarketCap.value
			oMrrFrm.hdnMarketCapMin.value				= oTRFrm.hdnMarketCapMin.value
			oMrrFrm.hdnMarketCapMax.value				= oTRFrm.hdnMarketCapMax.value
			oMrrFrm.hdnMarketCapSelected.value		= oTRFrm.hdnMarketCapSelected.value
			//
		//Portfolio related info.
			oMrrFrm.hdnPortfolioSelected.value	    = oTRFrm.hdnPortfolioSelected.value
			oMrrFrm.hdnSelectedPortfolioName.value	= oTRFrm.hdnSelectedPortfolioName.value
		//Sorting related info.
			oMrrFrm.hdnSortFieldName1.value			= oTRFrm.hdnSortFieldName1.value
			oMrrFrm.hdnSortFieldOrder1.value		= oTRFrm.hdnSortFieldOrder1.value
			oMrrFrm.hdnSortFieldName2.value			= oTRFrm.hdnSortFieldName2.value
			oMrrFrm.hdnSortFieldOrder2.value		= oTRFrm.hdnSortFieldOrder2.value
			oMrrFrm.hdnSortFieldName3.value			= oTRFrm.hdnSortFieldName3.value
			oMrrFrm.hdnSortFieldOrder3.value		= oTRFrm.hdnSortFieldOrder3.value
		//--CR 367----
			oMrrFrm.hdnSortFieldName4.value			= oTRFrm.hdnSortFieldName4.value
			oMrrFrm.hdnSortFieldOrder4.value		= oTRFrm.hdnSortFieldOrder4.value
		//--end------
			oMrrFrm.hdnDisplayMode.value			= oTRFrm.hdnDisplayMode.value
			oMrrFrm.hdnE2EMode.value				= oTRFrm.hdnE2EMode.value
		//User related info.
			oMrrFrm.hdnCurrentEntity.value			= oTRFrm.hdnCurrentEntity.value
			oMrrFrm.hdnAccessPermissions.value		= oTRFrm.hdnAccessPermissions.value
			oMrrFrm.hdnTokenString.value			= oTRFrm.hdnTokenString.value
			oMrrFrm.hdnFunctionToShow.value			= oTRFrm.hdnFunctionToShow.value
			oMrrFrm.hdnStockIdentifierName.value	= oTRFrm.hdnStockIdentifierName.value
			oMrrFrm.hdnCurrentCompanyID.value		= oTRFrm.hdnCurrentCompanyID.value
	
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ClearTriangleMirrorForm
	' Description:       This function populates the Triangle mirror form with values from the Triangle control panel form
	' Created by :       104304, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       25-Aug-2003 10:00 AM 
	' Modified    :		 By 104304 On 24/02/2004.
	'				     CR 367
	'--------------------------------------------------------------------------------*/
	function jfn_ClearTriangleMirrorForm()
	{
		var oMrrFrm =	document.idTriangleControlPanel 
		
			oMrrFrm.hdnQuestGroup.value				= ""
			oMrrFrm.hdnQuestGroupName.value			= ""
			oMrrFrm.hdnIndexProvider.value			= ""
			oMrrFrm.hdnIndexProviderName.value		= ""
			oMrrFrm.hdnStockIdentifierType.value	= ""
		//Weight related information
			oMrrFrm.hdnWeight_Value.value			= ""
			oMrrFrm.hdnWeight_Quality.value			= ""
			oMrrFrm.hdnWeight_Momentum.value		= ""
		//Filter information
			oMrrFrm.hdnIndiceSelected.value			= ""
			oMrrFrm.hdnSectorsSelected.value		= ""
			oMrrFrm.hdnCountiesSelected.value		= ""
		//Portfolio related info.
			oMrrFrm.hdnPortfolioSelected.value		= ""
			oMrrFrm.hdnSelectedPortfolioName.value	= ""
		//Sorting related info.
			oMrrFrm.hdnSortFieldName1.value			= ""
			oMrrFrm.hdnSortFieldOrder1.value		= ""
			oMrrFrm.hdnSortFieldName2.value			= ""
			oMrrFrm.hdnSortFieldOrder2.value		= ""
			oMrrFrm.hdnSortFieldName3.value			= ""
			oMrrFrm.hdnSortFieldOrder3.value		= ""
		//--CR 367--------
			oMrrFrm.hdnSortFieldName4.value			= ""
			oMrrFrm.hdnSortFieldOrder4.value		= ""
		//----End--------	
			oMrrFrm.hdnDisplayMode.value			= ""
			oMrrFrm.hdnCurrentEntity.value			= ""
			oMrrFrm.hdnCurrentCompanyID.value		= ""
	
	}
	
	/*CR-518 */
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_ClearWelcomeForm
	' Description:       This function populates the WelcomeContent mirror form with values 
	' Created by :       104304, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       25-Aug-2003 10:00 AM 
	' Modified    :		 By 104304 On 24/02/2004.
	'				     CR 367
	'--------------------------------------------------------------------------------*/
	function jfn_ClearWelcomeForm()
	{
		var oMrrFrm =	document.frmWLControlPanel 
		
			oMrrFrm.hdnQuestGroupID.value				= ""
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetVaLinWelcomeForm()
	' Description:       This function sets the values in the welcome content form 
	' Created by :       104304, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       25-Aug-2003 12:45 PM
	' Modified	 :		 27-Feb-2004 CR 367	
	'--------------------------------------------------------------------------------*/
	function jfn_SetVaLinWelcomeForm()
	{
		var oFrm	= document.frmTabChanged
		var oMrrFrm = document.frmWLControlPanel
		
		oMrrFrm.hdnQuestGroupID.value			 = oFrm.hdnQuestGroupID.value
		
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetDftValInTriangleMrrFrm()
	' Description:       This function sets the default values in the compare mirror form when the user changes his default settings
	' Created by :       104304, HCL Technologies Ltd, Gurgaon, INDIA.
	' 
	' Date-Time  :       25-Aug-2003 12:45 PM
	' Modified	 :		 27-Feb-2004 CR 367	
	'--------------------------------------------------------------------------------*/
	function jfn_SetDfltValInTRMrrForm()
	{
		var oFrm	= document.frmTabChanged
		var oMrrFrm = document.idTriangleControlPanel 
		
		oMrrFrm.hdnUserId.value				 = oFrm.hdnUserID.value 
		oMrrFrm.hdnQuestGroup.value			 = oFrm.hdnQuestGroupID.value
		oMrrFrm.hdnQuestGroupName.value		 = oFrm.hdnQuestGroupName.value 
		oMrrFrm.hdnIndexProvider.value		 = oFrm.hdnIndexProviderID.value
		oMrrFrm.hdnIndexProviderName.value	 = oFrm.hdnIndexProviderName.value 
		oMrrFrm.hdnStockIdentifierType.value = oFrm.hdnStockIdentifierName.value
		oMrrFrm.hdnStockIdentifierName.value = oFrm.hdnStockIdentifierName.value
		oMrrFrm.hdnWeight_Value.value		 = "33.33"
		oMrrFrm.hdnWeight_Quality.value		 = "33.33"
		oMrrFrm.hdnWeight_Momentum.value	 = "33.33"
		oMrrFrm.hdnSortFieldOrder1.value	 = "D"
		oMrrFrm.hdnSortFieldOrder2.value	 = "D"
		oMrrFrm.hdnSortFieldOrder3.value	 = "D"
		oMrrFrm.hdnSortFieldOrder4.value	 = ""
		oMrrFrm.hdnE2EMode.value			 = "0"
		
	}
	//-----------END OF TRIANGLE BLOCK CODE -------------------------------------------
	
		
	/*'--------------------------------------------------------------------------------
	' Procedure  :       jfn_CallFromSitemap(strPageCode)
	' Description:       Displays the page called from Site map.
	' Created by :       102209, HCL Technologies Ltd, Gurgaon, INDIA.
	'--------------------------------------------------------------------------------*/
	function jfn_CallFromSitemap(strPageCode)
	{
		var strTabCode  = String(strPageCode).split(SEPARATOR_PIPE_NC)[0]
		var strPageCode = String(strPageCode).split(SEPARATOR_PIPE_NC)[1]
		
		switch(strTabCode) {
			case 'WC':
				switch(strPageCode) {
					case 'HP':
						jfn_TabClick(strTabCode)
						break;
					case 'AQ':
						jfn_ShowAbout();
						break;
					case 'CQ':
						if (document.frmTabChanged.hdnCurrentEntity.value != 'WELCOME')
							jfn_TabClick(strTabCode)
						window.setTimeout("window.parent.frames['fraLeft'].jfn_ContactUS()", 2000)
						
						break;
					case 'DC':
						jfn_Disclaimer()
						break;
					case 'HL':
						jfn_ShowHelp(document.frmTabChanged.hdnCurrentEntity.value)
						break;
					case 'MQ':
						jfn_MyQuest()
						break;
					case 'QM':
						jfn_QuestMail()
						break;
					default:
				}
				break;
			case 'QA':
				document.frmTabChanged.hdnCurrentEntity.value = strPageCode
				document.frmTabChanged.hdnFunctionToShow.value = "QUEST_ANALYSIS"
				jfn_TabClick(strTabCode)
				break;
			case 'PR':
				jfn_TabClick(strTabCode)
				break;
			case 'SS':
				jfn_TabClick(strTabCode)
				break;
			case 'TR':
				jfn_TabClick(strTabCode)
				break;
			case 'CT':
				jfn_TabClick(strTabCode)
				break;
			default:
		}
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_checkSpecialCharacters(strValue)
	' Description:	Checks the string passed to the function for any special characters
	' Created by :  104548, HCL Technologies Ltd, Gurgaon, INDIA.
	'--------------------------------------------------------------------------------*/	
	function jfn_checkSpecialCharacters(strValue)
	{
		var intArraySpecialChar_Length
		var intCounter
		var arr_specialCharacters	= new Array("|","#","&","^"," ","'")
		
		intArraySpecialChar_Length		= arr_specialCharacters.length
		for (intCounter=0;intCounter<intArraySpecialChar_Length;intCounter++)
		{
			if ((jfn_Trim(strValue)).indexOf(arr_specialCharacters[intCounter]) != -1)
			{
				return false
			}
		}
		return true
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_AddToBriefcase(strFormQualifier,strPageTitle,strSurrentEntity)
	' Description:	Makes a query String of the variable names in the form qualifier,
	'				opens AddToBriefcase.asp passing the QueryString, PageTitle and 
	'				CurrentEntity as parameters. Also checks the existence of Questmail 
	'				to extract all attachment related information.
	' Created by :  104548, HCL Technologies Ltd, Gurgaon, INDIA.
	' Modified by :  126881, HCL Technologies Ltd, Gurgaon, INDIA.
	' CR-527 : Message Change.
	' Modified by :	 QSTP 3671 defect fix by 104548 on 22-05-2005 (This fix was applied to solve the problem that 
	'				 arises when the modeller hidden variables form a part of the querystring making it too large 
	'				 therefore causing the 'data is too large to be emailed' message to appear when the user clicks
	'				 on 'E-mail' link. To solve the same the modeller variables were truncated from the querystring 
	'				 as they are not used in the QA email functionality.)
	'Modified by	: 102021, CR-681 & CR-682 Modeller email.
	'Modified By:	151282 on 08/02/2007 for QSTP-5199: Querystring Length OVERFLOW defect in 'SEARCH' 
	'				(i.e. Screen for Stocks), so now using cookie approach specifically in this area
	'--------------------------------------------------------------------------------*/
	function jfn_AddToBriefcase(strFormQualifier,strPageTitle,strCurrentEntity)
	{
		var strQueryString
		var intFormElements
		var intCounter
		var blnDataDirtyFlag
		var strMetaDataIDs
		var strQMexists		
		var strFilePath
		var arrDataValuePairs	= new Array()
		
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,left=200,width=450,top=300,height=100"
				
		strFilePath	   = ""
		strQueryString = ""
		strMetaDataIDs = ""
		blnDataDirtyFlag = document.frmQuestMail.hdnEmailDataDirty.value
		
		/*checks the invoking screen, if it is a pop up then the querystring is directly passed from the screen else a querystring is made by
		 accessing the elements of the form qualifier passed to the function by the invoking screen*/
		if ((strCurrentEntity.toUpperCase()=="MOMENTUM_REPORTS")||(strCurrentEntity.toUpperCase()=="COMMENTARY")||(strCurrentEntity.toUpperCase()=="MODELLER"))
		{
			strQueryString		= strFormQualifier
			arrDataValuePairs	= strQueryString.split("&")
			for (intCounter=0;intCounter < arrDataValuePairs.length; intCounter++)
			{
				if (!jfn_checkSpecialCharacters(arrDataValuePairs[intCounter]))
				{
					arrDataValuePairs[intCounter]=escape(arrDataValuePairs[intCounter])	
				}
			}
			strQueryString		= arrDataValuePairs.join("~`~")
			
		}
		else
		{		    
			intFormElements = strFormQualifier.length
			for(intCounter=0; intCounter < intFormElements; intCounter++) 
			{
				if (String(strFormQualifier.elements[intCounter].name).toLowerCase() != 'hdndisplaymode')
				{
					if (!jfn_checkSpecialCharacters(strFormQualifier.elements[intCounter].value))
					{
						strQueryString = strQueryString + strFormQualifier.elements[intCounter].name + "=" + escape(strFormQualifier.elements[intCounter].value) + "~`~"
					}
					else
					{
						strQueryString = strQueryString + strFormQualifier.elements[intCounter].name + "=" + strFormQualifier.elements[intCounter].value + "~`~"
					}
				}
			} 
			
			
			//QSTP-5627 related changes for STF on other QA tab (151282): START
			if(strCurrentEntity.toUpperCase()=="SENSITIVITY")
			{
				//CODING-NOTE: slice upto modeller's hidden var section (refer QuestAnalysisControlPanel's frmQAControlPanel form for sections!
				//Added for QSTP 3671 defect fix by 104548 on 22-05-2005 -- Start
				strQueryString = strQueryString.slice(0,strQueryString.length-(strQueryString.length-strQueryString.indexOf("hdnScenarioId=")))
				//Added for QSTP 3671 defect fix by 104548 on 22-05-2005 -- End
			}
			else
			{
				//CODING-NOTE: slice upto sensitivity's hidden var section (refer QuestAnalysisControlPanel's frmQAControlPanel form for sections!
				strQueryString = strQueryString.slice(0,strQueryString.length-(strQueryString.length-strQueryString.indexOf("S_E_P_R=")))
				//UTC
				//alert(strCurrentEntity.toUpperCase());
			}
			//QSTP-5627 related changes for STF on other QA tab (151282): END
			strQueryString = strQueryString.slice(0,strQueryString.length-2)
		}
		//following validations code (if condition) for Querystring modified for 'SEARCH' function by 151282 on 08/02/2007 for QSTP-5199
		//UTC
		//alert("strQueryString [" +strQueryString.length+ " chars] = " + strQueryString)
		//alert("Entity = '" + strCurrentEntity.toUpperCase() + "'");
		//QSTP-5199 - START
		//checks the length of querystring in case of unsaved reports and search and displays appropriate message to the user if the length of the querystring exceeds the acceptable length
		if( strQueryString.length > 1900 && (strCurrentEntity.toUpperCase()!="SEARCH" && strCurrentEntity.toUpperCase()!="SENSITIVITY") )	//QSTP-5627 (151282): sensitivity condition added
		{
			

			if ((strCurrentEntity.toUpperCase()=="TABULAR_REPORT")||(strCurrentEntity.toUpperCase()=="GRAPHICAL_REPORT"))
			{
				// CR-527 : 126881 : HCL Tech
				//alert("The data is too large to be e-mailed directly. Please save the companies as portfolio and the report definition, then click on e-mail option.");
				alert("Please save the portfolio before e-mailing this page");
				// CR-527 : 126881 : HCL Tech
			}
			//following else if commented for QSTP-5199
			/*else if (strCurrentEntity.toUpperCase()=="SEARCH")
			{
				alert("The data is too large to be e-mailed directly. Please save the search criteria and then click on e-mail option.")
			}*/
			else
			{
				alert("The data is too large to be e-mailed.")
			}
			return false
		}
		//QSTP-5199 - END
		
		if (((winQuestmail)&&(!winQuestmail.closed)) && (blnDataDirtyFlag == "true")) 
		{
			//calls the function to retrieve the MetaInfoIds of the elements of the attachments combo box of Quest Mail
			strMetaDataIDs = jfn_RetrieveMetaInfoData()
		}

		if ((winQuestmail)&&(!winQuestmail.closed))
		{
			strQMexists="true"
		}
		else
		{
			strQMexists="false"
		}	

		if ((strCurrentEntity.toUpperCase()=="QUESTCARD"))
		{
			strFilePath	= "AddToBriefcase.asp";
		}
		else
		{
			strFilePath	= "../CM/AddToBriefcase.asp"
		}
		
		//QSTP-5199 - START
		//following validations code (if-else condition) for 'SEARCH' function added by 151282 on 08/02/2007 for QSTP-5199
		//Code modified By 151351 for Qstp-5590 - To handle cases in which QS.length is jus less than 1900 but Overall URL length > 2053 (limit of Browser)
		//NOTE:As QS is not able to transfer all required data so cookie approach is applied for search case (to prevent rise of such conditions in future)
		if( strCurrentEntity.toUpperCase()=="SEARCH" || strCurrentEntity.toUpperCase()=="SENSITIVITY")	//QSTP-5627 (151282): sensitivity condition added
		{
			//code added to accommodate 'strQueryString' variable in a cookie keeping other parameters intact by 151282 on 05/02/2007 fo QSTP-5199
			//clear the data/the cookie if it already exists using a past date - NO NEED AS COOKIE WILL BE CLEARED IN ASP CODE AFTER USE
			//document.cookie = document.cookie + "; expires=Fri, 31 Dec 1999 23:59:59 GMT;"
			//code for adding the value in the cookie - specified cookie's use in querystring
			document.cookie = "strPageInformation=" + strQueryString
			//calls Add to Briefcase with the required parameters
			//alert(strFilePath + "?blnCookie=1&strPageTitle=" + escape(strPageTitle) + "&strCurrentEntity=" + strCurrentEntity + "&strMetaDataIDs=" + strMetaDataIDs + "&strQMexists=" + strQMexists + "&strEmailDataDirty=" + blnDataDirtyFlag + "&strUserId=" + document.frmTabChanged.hdnSystemUserID.value)
			window.open(strFilePath + "?blnCookie=1&strPageTitle=" + escape(strPageTitle) + "&strCurrentEntity=" + strCurrentEntity + "&strMetaDataIDs=" + strMetaDataIDs + "&strQMexists=" + strQMexists + "&strEmailDataDirty=" + blnDataDirtyFlag + "&strUserId=" + document.frmTabChanged.hdnSystemUserID.value,"_AddToBriefcase",strOptions)
		}
		else
		{
			//Added by HCL(107702) to send CiTN Article PDF
			if (strCurrentEntity.toUpperCase()=="CITN")
			{
				strCurrentEntity = "COMMENTARY";
			}
			//calls Add to Briefcase with the required parameters - use existing code functionality with no cookie use
			//alert(strFilePath + "?blnCookie=0&strPageTitle=" + escape(strPageTitle) + "&strCurrentEntity=" + strCurrentEntity + "&strPageInformation=" + strQueryString + "&strMetaDataIDs=" + strMetaDataIDs + "&strQMexists=" + strQMexists + "&strEmailDataDirty=" + blnDataDirtyFlag + "&strUserId=" + document.frmTabChanged.hdnSystemUserID.value)
			window.open(strFilePath + "?blnCookie=0&strPageTitle=" + escape(strPageTitle) + "&strCurrentEntity=" + strCurrentEntity + "&strPageInformation=" + strQueryString + "&strMetaDataIDs=" + strMetaDataIDs + "&strQMexists=" + strQMexists + "&strEmailDataDirty=" + blnDataDirtyFlag + "&strUserId=" + document.frmTabChanged.hdnSystemUserID.value,"_AddToBriefcase",strOptions)
		}
		//QSTP-5199 - END
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_SendBriefcase()
	' Description:	Checks if Quest exists in minimised state and some item has been added 
	'				to the briefcase, then it retrieves all the e-mail related data from 
	'				Quest Mail closes it and then invokes it again with fresh data.
	' Created by :  104548, HCL Technologies Ltd, Gurgaon, INDIA.
	'Modified By :	104548, on 10-09-2003 Reason: PVCS# 176 defect fix 
	'--------------------------------------------------------------------------------*/
	function jfn_SendBriefcase()
	{
		var strOptions = "resizable=no,status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes," + jfn_getPopupSizeParameters()
		var strSetUsageData
		var oFrmMail  = document.frmQuestMail
		var oFrmTab   = document.frmTabChanged
		
		//PVCS# 176 defect fix
		var strTokenString
		strTokenString = oFrmTab.hdnTokenString.value
		strSetUsageData	= oFrmMail.hdnAddUsageData.value
		if (((winQuestmail)&&(!winQuestmail.closed))&&(oFrmMail.hdnEmailDataAdded.value=="true"))
		{
			jfn_RetrieveEmailData()
			winQuestmail.close()
			oFrmMail.hdnEmailDataAdded.value="false"
			
			//CR683v2 Firefox Support
			/*
			if (mBlnIE)
			{
				//PVCS# 176 defect fix
				winQuestmail = window.open("../../code/CM/QuestMail.asp?strUserID=" + oFrmTab.hdnSystemUserID.value + "&strSetUsageData=" + strSetUsageData + "&hdnRandom=" + Math.random()+ "&TokenString=" + strTokenString ,"_blank", strOptions)
			}
			else
			{
				//PVCS# 176 defect fix
				window.setTimeout("winQuestmail = window.open('../../code/CM/QuestMail.asp?strUserID=" + oFrmTab.hdnSystemUserID.value + "&strSetUsageData=" + strSetUsageData + "&hdnRandom=" + Math.random()+ "&TokenString=" + strTokenString + "','_blank', '" + strOptions + "')", 500, "javascript")
			}
			*/
			winQuestmail = window.open("../../code/CM/QuestMail.asp?strUserID=" + oFrmTab.hdnSystemUserID.value + "&strSetUsageData=" + strSetUsageData + "&hdnRandom=" + Math.random()+ "&TokenString=" + strTokenString ,"_blank", strOptions)
			//CR683v2 Firefox Support
		}
		else
		{
			//PVCS# 176 defect fix
			winQuestmail = window.open("../../code/CM/QuestMail.asp?strUserID=" + oFrmTab.hdnSystemUserID.value + "&strSetUsageData=" + strSetUsageData + "&hdnRandom=" + Math.random()+ "&TokenString=" + strTokenString,"_blank", strOptions)
		}
	}

	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_retrieveEmailData()
	' Description:	Retrieves the email related data from Quest Mail
	' Created by :  104548, HCL Technologies Ltd, Gurgaon, INDIA.
	'--------------------------------------------------------------------------------*/
	function jfn_RetrieveEmailData()
	{
		var oFrmMail  = document.frmQuestMail
		if((winQuestmail)&&(!winQuestmail.closed))
		{
			oFrmMail.hdnEmailToAddresses.value		= winQuestmail.document.frmQUESTMail.txtTo.value		
			oFrmMail.hdnEmailBCCAddresses.value		= winQuestmail.document.frmQUESTMail.txtBcc.value		
			oFrmMail.hdnEmailFromAddress.value		= winQuestmail.document.frmQUESTMail.txtFrom.value		
			oFrmMail.hdnEmailSubjectText.value		= winQuestmail.document.frmQUESTMail.txtSubject.value	
			oFrmMail.hdnEmailBodyText.value			= winQuestmail.document.frmQUESTMail.txaBody.value		
			oFrmMail.hdnEmailPageText.value			= winQuestmail.document.frmQUESTMail.txaComments.value	
		}	
	}
	
	/*'--------------------------------------------------------------------------------
	' Procedure  :	jfn_RetrieveMetaInfoData()
	' Description:	Retrieves the meta info ids from Quest Mail
	' Created by :  104548, HCL Technologies Ltd, Gurgaon, INDIA.
	'--------------------------------------------------------------------------------*/
	function jfn_RetrieveMetaInfoData()
	{
		var objAttachmentsCombo
		var intCounter
		var strMetaDataIds
		strMetaDataIds	= ""
		
		if (winQuestmail)
		{
			if (!winQuestmail.closed)
			{
				objAttachmentsCombo	= eval(winQuestmail.document.frmQUESTMail.cmbAttachments)
				
				for (intCounter=0;intCounter < objAttachmentsCombo.length;intCounter++)
				{
					strMetaDataIds	= strMetaDataIds + objAttachmentsCombo[intCounter].value + SEPARATOR_COMMA_NC
				}
				strMetaDataIds=strMetaDataIds.slice(0,strMetaDataIds.length-SEPARATOR_COMMA_NC_LEN)
				return strMetaDataIds
			}
		}
	}

/*'--------------------------------------------------------------------------------
		' Procedure  :       jfn_getCurrenTEntityValue
		' Description:       This function retrieves the current entity value and sends itback to the invoker
		' Created by :       103171, HCL Technologies Ltd, Gurgaon, INDIA.
		' 
		' Date-Time  :       21-Jan-2003 
		'
		'--------------------------------------------------------------------------------*/
		function jfn_getCurrenTEntityValue()
		{
			return document.frmTabChanged.hdnCurrentEntity.value   
		}
		
/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_SetArticleWindowHandle
' Description:       Function which assigns article display window handle to NC variable
'					 Called from left control panel when article display window is opened.
'					 This is to maintain the window handle throughout the navigation		
' Created by :       104315, HCL Technologies Ltd, Gurgaon, INDIA.
' 
' Date-Time  :       30/04/03 
'
'--------------------------------------------------------------------------------*/		
	function jfn_SetArticleWindowHandle(argArticleHandle){
		mWinArticleDisplay = argArticleHandle
	}	


/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_getValuesFromModellerCP
' Description:       This function populates the Modeller mirror form with values from the Quest Analysis control panel form		
' Created by :       106695, HCL Technologies Ltd, Gurgaon, INDIA. 
' Date-Time  :       15/01/04 
' Modified   :       102021 on 18/08/2004 Reason PVCS 777 to retain the modeller values when main tabs are navigated.
' Modified	 :       126881:CR 1047 -Modeller New Implementation
'--------------------------------------------------------------------------------*/		
	function jfn_getValuesFromModellerCP(){
	  
	  if(window.parent.frames['fraLeft'].location.href.indexOf("QuestAnalysisControlPanel.asp")==-1)
		{return;}
		
		// make the form objects
		var oMrrFrm = document.frmTabChanged 
		/*
		if(mBlnIE)
		{
			var oCPFrm = window.parent.frames['fraLeft'].document.frmQAControlPanel
		}
		else
		{
			var oCPFrm = window.parent.frames['fraLeft'].document.layers['divHiddenVariables'].document.frmQAControlPanel
		}
		*/ 
		// CR 683v2 : FireFox Support
		var oCPFrm = window.parent.frames['fraLeft'].document.frmQAControlPanel
		

		oMrrFrm.hdnScenarioId.value         = oCPFrm.hdnScenarioId.value
		oMrrFrm.hdnScenarioName.value       = oCPFrm.hdnScenarioName.value
			
		oMrrFrm.hdnModellerCompanyId.value	= oCPFrm.hdnModellerCompanyId.value
		//PVCS 777
		oMrrFrm.hdnModellerQuestGroupId.value	= oCPFrm.hdnModellerQuestGroupId.value	
			
			
		oMrrFrm.hdnCmnModellerData.value	= oCPFrm.hdnCmnModellerData.value
		oMrrFrm.hdnUserEnterableState.value	= oCPFrm.hdnUserEnterableState.value
		oMrrFrm.hdnHistoricYears.value		= oCPFrm.hdnHistoricYears.value
		oMrrFrm.hdnHistoricDPS.value		= oCPFrm.hdnHistoricDPS.value			//Added for QSTP 3816 defect fix..
		oMrrFrm.hdnYearMonthEnd.value       = oCPFrm.hdnYearMonthEnd.value
		oMrrFrm.hdnForecastYearDataStatus.value = oCPFrm.hdnForecastYearDataStatus.value
		oMrrFrm.hdnPrelimYearChecked.value  = oCPFrm.hdnPrelimYearChecked.value
			
		oMrrFrm.hdnForecastYears.value		= oCPFrm.hdnForecastYears.value
		oMrrFrm.hdnRawHistoricData.value	= oCPFrm.hdnRawHistoricData.value
		oMrrFrm.hdnHistoricData.value		= oCPFrm.hdnHistoricData.value
			
		oMrrFrm.hdnRawForecastData.value	= oCPFrm.hdnRawForecastData.value
		oMrrFrm.hdnForecastData.value		= oCPFrm.hdnForecastData.value
		//By 126881: CR 1047
		oMrrFrm.hdnYourForecastDataForExcel.value= oCPFrm.hdnYourForecastDataForExcel.value
		
		oMrrFrm.hdnRawQuestFadeData.value	= oCPFrm.hdnRawQuestFadeData.value
			
		oMrrFrm.hdnRawUserFadeData.value	= oCPFrm.hdnRawUserFadeData.value
		
		oMrrFrm.hdnGlobalValuesForDisplay.value	= oCPFrm.hdnGlobalValuesForDisplay.value
		oMrrFrm.hdnScenarioChanged.value	= oCPFrm.hdnScenarioChanged.value
		oMrrFrm.hdnUserForecastData.value	= oCPFrm.hdnUserForecastData.value
			
		oMrrFrm.hdnHistoricDataforSaveAndExcel.value	= oCPFrm.hdnHistoricDataforSaveAndExcel.value
		oMrrFrm.hdnFormattingData.value		= oCPFrm.hdnFormattingData.value
			
		oMrrFrm.hdnUserEnterable.value		= oCPFrm.hdnUserEnterable.value
		oMrrFrm.hdnGlobalDataForSave.value 	= oCPFrm.hdnGlobalDataForSave.value 
		oMrrFrm.hdnGlobalDataForExcel.value	= oCPFrm.hdnGlobalDataForExcel.value
		oMrrFrm.hdnAttributionText.value	= oCPFrm.hdnAttributionText.value
			
		oMrrFrm.hdnBlankScenario.value		= oCPFrm.hdnBlankScenario.value
		oMrrFrm.hdnBlankGlobalValues.value	= oCPFrm.hdnBlankGlobalValues.value
		oMrrFrm.hdnDPSCurrency.value  = oCPFrm.hdnDPSCurrency.value
		oMrrFrm.hdnDPSFinalScale.value   = oCPFrm.hdnDPSFinalScale.value
		oMrrFrm.hdnFinalScaleFactor.value   = oCPFrm.hdnFinalScaleFactor.value
		
		//Added for QSTP 3816 defect fix...
		oMrrFrm.hdnHistoricSalesData.value   = oCPFrm.hdnHistoricSalesData.value
		oMrrFrm.hdnHistoricDPSData.value   = oCPFrm.hdnHistoricDPSData.value

				  
	}
	
/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_getValuesFromSensitivityCP
' Description:       This function populates the Sensitivity mirror form with values from the Quest Analysis control panel form		
' Created by :       151351, HCL Technologies Ltd, Gurgaon, INDIA. 
' Date-Time  :       19/02/08
' Reason	 :		 CR 1122 - page retention in Sensitivity page
'--------------------------------------------------------------------------------*/		
	function jfn_getValuesFromSensitivityCP()	
	{
		if(window.parent.frames['fraLeft'].location.href.indexOf("QuestAnalysisControlPanel.asp")==-1)
		{
			return;
		}
		var oMrrFrm = document.frmTabChanged 
		var oCPFrm = window.parent.frames['fraLeft'].document.frmQAControlPanel
		
		oCPFrm.hdnSensitivityScenarioChanged.value = 'true';
		
		oMrrFrm.hdnSensitivityScenarioId.value		= oCPFrm.hdnSensitivityScenarioId.value;
		oMrrFrm.hdnSensitivityScenarioName.value	= oCPFrm.hdnSensitivityScenarioName.value;
		
		oMrrFrm.hdnSensitivityShowQVA.value			= oCPFrm.hdnSensitivityShowQVA.value;
		oMrrFrm.hdnSensitivityIN_SC_XML.value		= oCPFrm.hdnSensitivityIN_SC_XML.value;
		oMrrFrm.hdnSensitivityOperation.value		= oCPFrm.hdnSensitivityOperation.value;
		
		oMrrFrm.hdnYearInfo.value					= oCPFrm.hdnYearInfo.value;
		oMrrFrm.hdnYFEstimateData.value				= oCPFrm.hdnYFEstimateData.value;
		oMrrFrm.hdnYFStrategyData.value				= oCPFrm.hdnYFStrategyData.value;
		oMrrFrm.hdnYFFadeVariablesData.value		= oCPFrm.hdnYFFadeVariablesData.value;
		
		oMrrFrm.hdnCompanyModelType.value			= oCPFrm.hdnCompanyModelType.value;
		
		oMrrFrm.hdnSensitivityScenarioChanged.value	= oCPFrm.hdnSensitivityScenarioChanged.value;
		
		oMrrFrm.hdnSensitivityCompanyId.value		= oCPFrm.hdnSensitivityCompanyId.value;
		oMrrFrm.hdnSensitivityQGId.value			= oCPFrm.hdnSensitivityQGId.value;
		
		oMrrFrm.hdnGoButtonClicked.value			= oCPFrm.hdnGoButtonClicked.value;
	}
	
/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_getValuesFromChartingCP
' Description:       This function populates the Charting mirror form with values from the Quest Analysis control panel form		
' Created by :       151351, HCL Technologies Ltd, Gurgaon, INDIA. 
' Date-Time  :       19/02/08 
' Reason	 :		 CR 1122 - page retention in Charting page
'--------------------------------------------------------------------------------*/		
	function jfn_getValuesFromChartingCP()
	{
		if(window.parent.frames['fraLeft'].location.href.indexOf("QuestAnalysisControlPanel.asp")==-1)
		{
			return;
		}
		
		var oMrrFrm = document.frmTabChanged 
		var oCPFrm = window.parent.frames['fraLeft'].document.frmQAControlPanel
		
		oCPFrm.hdnChartScenarioChanged.value	= 'true';
		
		oMrrFrm.hdnValuationItem.value			= oCPFrm.hdnValuationItem.value;
		oMrrFrm.hdnNonValuationItem.value		= oCPFrm.hdnNonValuationItem.value;
		oMrrFrm.hdnValuationItemDesc.value		= oCPFrm.hdnValuationItemDesc.value;		
		oMrrFrm.hdnNonValuationItemDesc.value	= oCPFrm.hdnNonValuationItemDesc.value;

		oMrrFrm.hdnChartScenarioId.value		= oCPFrm.hdnChartScenarioId.value;
		oMrrFrm.hdnChartScenarioName.value		= oCPFrm.hdnChartScenarioName.value;

		oMrrFrm.hdnChartScenarioChanged.value	= oCPFrm.hdnChartScenarioChanged.value;
		
		oMrrFrm.hdnChartCompanyId.value			= oCPFrm.hdnChartCompanyId.value;
		oMrrFrm.hdnChartQGId.value				= oCPFrm.hdnChartQGId.value;
		oMrrFrm.hdnDrawChartClicked.value		= oCPFrm.hdnDrawChartClicked.value;
	}

/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_getValuesFromSectorChartingCP
' Description:       This function populates the Charting mirror form with values from the Quest Analysis control panel form		
' Created by :       189433, HCL Technologies Ltd, Gurgaon, INDIA. 
' Date-Time  :       10/06/09 
' Reason	 :		 CR 1280V1 - Sector Charting
'--------------------------------------------------------------------------------*/		
	function jfn_getValuesFromSectorChartingCP()
	{
		if(window.parent.frames['fraLeft'].location.href.indexOf("SectorAnalysisControlPanel.asp")==-1)
		{
			return;
		}
		
		var oMrrFrm = document.frmTabChanged 
		var oCPFrm = window.parent.frames['fraLeft'].document.frmSAControlPanel
		
		oCPFrm.hdnSAChartScenarioChanged.value	= 'true';
		
		oMrrFrm.hdnSAValuationItem.value			= oCPFrm.hdnSAValuationItem.value;
		oMrrFrm.hdnSANonValuationItem.value			= oCPFrm.hdnSANonValuationItem.value;
		oMrrFrm.hdnSAValuationItemDesc.value		= oCPFrm.hdnSAValuationItemDesc.value;		
		oMrrFrm.hdnSANonValuationItemDesc.value		= oCPFrm.hdnSANonValuationItemDesc.value;

		oMrrFrm.hdnSAChartScenarioId.value			= oCPFrm.hdnSAChartScenarioId.value;
		oMrrFrm.hdnSAChartScenarioName.value		= oCPFrm.hdnSAChartScenarioName.value;

		oMrrFrm.hdnSAChartScenarioChanged.value	= oCPFrm.hdnSAChartScenarioChanged.value;
		
		oMrrFrm.hdnSAChartSectorId.value			= oCPFrm.hdnSAChartSectorId.value;
		oMrrFrm.hdnSAChartQGId.value				= oCPFrm.hdnSAChartQGId.value;
		oMrrFrm.hdnSADrawChartClicked.value			= oCPFrm.hdnSADrawChartClicked.value;
	}

/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_clearModellerMirrorForm
' Description:       Function clears the modeller hidden variables .
' Created by :       15/01/04 
' Modified	 :		 126881:CR 1047 -Modeller New Implementation
'--------------------------------------------------------------------------------*/			
function jfn_clearModellerMirrorForm()   {
	
	// make the form objects
	var oMrrFrm =	document.frmTabChanged 
 
	oMrrFrm.hdnScenarioId.value             = ""
	oMrrFrm.hdnScenarioName.value           = ""
			
	oMrrFrm.hdnModellerCompanyId.value		= ""
		
	oMrrFrm.hdnCmnModellerData.value		= ""
	oMrrFrm.hdnUserEnterableState.value		= ""
	oMrrFrm.hdnHistoricYears.value		    = ""
	
	oMrrFrm.hdnHistoricDPS.value			= ""		//Added for QSTP 3816 defect fix..
	
	oMrrFrm.hdnYearMonthEnd.value           = ""
	oMrrFrm.hdnForecastYears.value			= ""
	oMrrFrm.hdnRawHistoricData.value		= ""
	oMrrFrm.hdnHistoricData.value			= ""
	
	oMrrFrm.hdnForecastYearDataStatus.value	= "" 
	oMrrFrm.hdnPrelimYearChecked.value      = ""
			
	oMrrFrm.hdnRawForecastData.value		= ""
	oMrrFrm.hdnForecastData.value		    = ""
	//By 126881: Cr 1047
	oMrrFrm.hdnYourForecastDataForExcel.Value = ""
	oMrrFrm.hdnRawQuestFadeData.value		= ""
	
	oMrrFrm.hdnRawUserFadeData.value		= ""
	
		
	oMrrFrm.hdnGlobalValuesForDisplay.value	= ""
	oMrrFrm.hdnScenarioChanged.value	    = ""
	oMrrFrm.hdnUserForecastData.value		= ""
			
	oMrrFrm.hdnHistoricDataforSaveAndExcel.value	= ""
	oMrrFrm.hdnFormattingData.value			= ""
			
	oMrrFrm.hdnUserEnterable.value		    = ""
	oMrrFrm.hdnGlobalDataForSave.value 	    = "" 
	oMrrFrm.hdnGlobalDataForExcel.value		= ""
	oMrrFrm.hdnAttributionText.value		= "" 
	
	oMrrFrm.hdnBlankScenario.value		    = ""
	oMrrFrm.hdnBlankGlobalValues.value      = ""
	oMrrFrm.hdnDPSCurrency.value            = ""
	oMrrFrm.hdnDPSFinalScale.value             = ""
	oMrrFrm.hdnFinalScaleFactor.value            = ""
	
	//Added for QSTP 3816 defect fix..
	oMrrFrm.hdnHistoricSalesData.value            = ""
	oMrrFrm.hdnHistoricDPSData.value            = ""
}

/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_clearSensitivityMirrorForm
' Description:       Function clears the sensitivity hidden variables .
' Created by :       20/02/08 
' Modified	 :		 151351:CR 1122 -Sensitivity page retention
'--------------------------------------------------------------------------------*/			
function jfn_clearSensitivityMirrorForm()
{
	// make the form objects
	var oMrrFrm =	document.frmTabChanged
	
	oMrrFrm.hdnSensitivityScenarioChanged.value	= "";
		
	oMrrFrm.hdnSensitivityScenarioId.value		= "";
	oMrrFrm.hdnSensitivityScenarioName.value	= "";
	
	oMrrFrm.hdnSensitivityOperation.value		= "";
	oMrrFrm.hdnSensitivityShowQVA.value			= "false";
	oMrrFrm.hdnSensitivityIN_SC_XML.value		= "";
	
	oMrrFrm.hdnYearInfo.value					= "";
	oMrrFrm.hdnYFEstimateData.value				= "";
	oMrrFrm.hdnYFStrategyData.value				= "";
	oMrrFrm.hdnYFFadeVariablesData.value		= "";
	
	oMrrFrm.hdnCompanyModelType.value			= "";
	
	oMrrFrm.hdnSensitivityCompanyId.value		= "";
	oMrrFrm.hdnSensitivityQGId.value			= "";	
}

/*'--------------------------------------------------------------------------------
' Procedure  :       jfn_clearChartMirrorForm
' Description:       Function clears the charting hidden variables .
' Created by :       20/02/08 
' Modified	 :		 151351: CR 1122 -Charting page retention
'--------------------------------------------------------------------------------*/			
function jfn_clearChartMirrorForm()
{
	// make the form objects
	var oMrrFrm =	document.frmTabChanged
	
	oMrrFrm.hdnValuationItem.value			= "";
	oMrrFrm.hdnNonValuationItem.value		= "";
	oMrrFrm.hdnValuationItemDesc.value		= "";		
	oMrrFrm.hdnNonValuationItemDesc.value	= "";

	oMrrFrm.hdnChartScenarioId.value		= "";
	oMrrFrm.hdnChartScenarioName.value		= "";

	oMrrFrm.hdnChartScenarioChanged.value	= "";
	
	oMrrFrm.hdnChartCompanyId.value			= "";
	oMrrFrm.hdnChartQGId.value				= "";
	oMrrFrm.hdnDrawChartClicked.value		= "";
	//ADDED BY 189433 FOR SECTOR_CHARTING
	oMrrFrm.hdnSAValuationItem.value		= "";
	oMrrFrm.hdnSANonValuationItem.value		= "";
	oMrrFrm.hdnSAValuationItemDesc.value	= "";		
	oMrrFrm.hdnSANonValuationItemDesc.value	= "";

	oMrrFrm.hdnSAChartScenarioId.value		= "";
	oMrrFrm.hdnSAChartScenarioName.value	= "";

	oMrrFrm.hdnSAChartScenarioChanged.value	= "";
	
	oMrrFrm.hdnSAChartSectorId.value		= "";
	oMrrFrm.hdnSAChartQGId.value			= "";
	oMrrFrm.hdnSADrawChartClicked.value		= "";
	//END
}

/*--------------------------------------------------------------------------------
' Procedure  :       jfn_ShowArticleLinkMessage
' Description:       Function which shows one-time display user alert for action 
'					 after an article link activation.
' Parameter	 :		 strPageCode - the calling page code like CHR/SEN/MDL/SFS etc.
' Created by :       151282, HCL Technologies Ltd, Gurgaon, INDIA.
' Date-Time  :       13/11/2007
' Reason	 :		 CR-1051 Article Hyperlink Functionality
'---------------------------------------------------------------------------------*/
function jfn_ShowArticleLinkMessage(strPageCode)
{
	var strDisplayMessageText;
	//check if the alert message already displayed by following state variable in top panel...
	if(document.frmTabChanged.hdnDisplayArticleAlert.value == "1")
	{
		return;
	}
	//otherwise, process as per passed page code
	switch((strPageCode.toString()).toUpperCase())
	{
		case "CHR":	//charting
			document.frmTabChanged.hdnDisplayArticleAlert.value = "1";
			return;
			//strDisplayMessageText = "To view results please click the Draw Chart Button";
			//break;
		
		case "SEN":	//sensitivity
			document.frmTabChanged.hdnDisplayArticleAlert.value = "1";
			return;
			//strDisplayMessageText = "To view results please click the Go Button";
			//break;
		
		case "MDL":	//modeller
			document.frmTabChanged.hdnDisplayArticleAlert.value = "1";
			return;
			//strDisplayMessageText = "To view results please click the See Results Button";
			//break;
		
		case "ERR_MDL":	//data no longer available
			strDisplayMessageText = "The Article you are reading is old therefore the Modeller information is no longer available, you may wish to enter your own Modeller Scenario";
			break;
			
		case "SFS": //screen for stocks i.e. search
			strDisplayMessageText = "To view results please click the Show screening results Button";
			break;
		
			
		default:			//no processing required!
			return;
	}
	//display one-time action alert message
	alert(strDisplayMessageText);
	//set the state variable
	document.frmTabChanged.hdnDisplayArticleAlert.value = "1";
}

/*--------------------------------------------------------------------------------
' Procedure  :       jfn_RestrictedAccessMessage
' Description:       Function which shows error message when user has restricted access 
'					 to a company page he is viewing through a URL call
' Parameter	 :		 argCompanyName - name of company to which user has hyperlinked
'					 argMsgId
'					 argQuestGroup
' Created by :       151351, HCL Technologies Ltd, Gurgaon, INDIA.
' Date-Time  :       30/1/2008
' Reason	 :		 Rel 50.1 - Reqirement changes to display a page thru hyperlink
'					 even when user does not have permissions to company
'---------------------------------------------------------------------------------*/
function jfn_RestrictedAccessMessage(argCompanyName,argMsgId)
{
	//alert("in nc jfn_RestrictedAccessMessage");
	var objNCForm
	var strQuestGroupName
	objNCForm = document.frmTabChanged;
	
	strQuestGroupName = objNCForm.hdnQuestGroupName.value;
	
	if(objNCForm.hdnDisplayArticleAlert.value == "1")
	{
		switch(argMsgId)
		{
			case 1:
				alert("The company you have selected (" + argCompanyName + ") does not belong to your geographic region (" + strQuestGroupName + "). Please select a company from  your preferred geographic region in MyQUEST or call the QUEST™ helpline (020 7523 8493) for assistance.");
				break;
			case 2:
				alert("Your Product Group permissions do not permit you to edit the company you have selected (" + argCompanyName + ") please view a company within your allowed geographic region in MyQUEST or call the QUEST™ helpline (020 7523 8493) for assistance.");
				break;
			case 3:
				alert("Your Product Group permissions do not permit you to save the company you have selected (" + argCompanyName + ") please view a company within your allowed geographic region in MyQUEST or call the QUEST™ helpline (020 7523 8493) for assistance.");
				break;
			// Case added by 177441 for Cr 1176 V6 in release 62 this is used for Cs analyst link 
			// a user which does not have permission for the quest group  and he open's the Company thru Hyperlink 
			// will be shown this message.
			
			case 4:
				alert("Your Product Group permissions do not permit you to view the CS Analyst Modeller Scenario for  the company you have selected (" + argCompanyName + "); please view a company within your allowed geographic region in MyQUEST or call the QUEST™ helpline (020 7523 8493) for assistance.");
				break;
			//added by 189433 for cr1386--sector hyperlink
			case 5:
				alert("The sector you have selected (" + argCompanyName + ") does not belong to your geographic region (" + strQuestGroupName + "). Please select a sector from  your preferred geographic region in MyQUEST or call the QUEST™ helpline (020 7523 8493) for assistance.");
				break;
		}
		return 1;
	}
	else
	{
		return 0;
	}
}
/*--------------------------------------------------------------------------------
	' Procedure  :       jfn_SetSectorUrlNavigatorCall
	' Description:       Function which resets the hdnSectorURLCall variable when user changes quest product group from my Quest
	' Created by :       189433, HCL Technologies Ltd, Gurgaon, INDIA.
	' Date-Time  :       3/12/2009
	'---------------------------------------------------------------------------------*/
	function jfn_SetSectorUrlNavigatorCall(strValue)
	{		
		
		document.frmTabChanged.hdnSectorURLCall.value=strValue;	
	}


