function jsServerRoleDependency(ActionPage)
{
    if(ActionPage == "summary/System.htm")
    {
        //Ex2007 platform should be hidden
        //$("ScanServiceTitle").style.display = (vPlatform == "nonEx2007")?"":"none";
        //$("ScanServiceSettings").style.display = (vPlatform == "nonEx2007")?"":"none";
        // Always enable Service Status for PP 1.8 by Tony Low at 2008.12.31
        $("ScanServiceTitle").style.display = "";
        $("ScanServiceSettings").style.display = "";

        //[MailBox only] should be hidden
        /*commend by jimmy_huang, need insight
        if(vMailBox_only || hiAntiSpam) $("chkSpamPattern").checked = false;
        $("chkSpamPattern").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
       $("prSpamLib").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        if(vMailBox_only || hiAntiSpam) $("chkSpamEngine").checked = false;
        $("chkSpamEngine").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prSpamEngine").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prSpamDetect").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam1").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam2").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam3").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prERS").style.display = (vMailBox_only || hiERS)?"none":"";*/
    }
    else if(ActionPage == "summary/Summary_virus.htm")
    {
        //[MailBox only] should be hidden
       // $("prAntiSpam1").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
      //  $("prAntiSpam2").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
      //  $("prAntiSpam3").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
    }
   else if(ActionPage == "summary/Summary_spam.htm")
    {
        //false positive
      /*  if(vPlatform == "Ex2007"){
            $("reFalsePositive").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
            $("FalsePositives_Title").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
            $("FalsePositives_Content").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
        }
        else{
            $("reFalsePositive").style.display = (vEUQ)?"":"none";
            $("FalsePositives_Title").style.display = (vEUQ)?"":"none";
            $("FalsePositives_Content").style.display = (vEUQ)?"":"none";
        }*/
    }
   else if(ActionPage == "summary/Scanmonitor.htm")
    {
        //[MailBox only] should be hidden
       // $("prAntiSpamPattern").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
      //  $("prAntiSpamNum").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
      //  $("prERSNum").style.display = (vMailBox_only || hiERS)?"none":"";
    }
   else if(ActionPage == "scan/Virusscanning.htm")
    {
		/*only need to show MailboxEnableFunction(chkStoreEnable)
        if(document.location.href.indexOf("SMEX_SUB_CFG_VS_RS")>0)
         {
            //Ex2007 platform should be hidden
            $("nonE12EnableFunction").style.display = (vPlatform == "nonEx2007")?"":"none";
            
            //nonEx2007 platform should be hidden
            $("E12EnableFunction").style.display = (vPlatform == "Ex2007")?"":"none";

            if(vPlatform == "Ex2007")
            {
                //[MailBox only] should be hidden
                $("BridgeHeadEnableFunction").style.display = (vMailBox_only)?"none":"";
                
                //[vGateway] or [vBridgeHead_only] should be hidden
                $("MailboxEnableFunction").style.display = (vGateway || vBridgeHead_only)?"none":"";
            }
         }*/
    }
   else if(ActionPage == "scan/Attachmentblocking.htm")
    {   
	/*only need to show MailboxEnableFunction(chkStoreEnable)
         if(document.location.href.indexOf("SMEX_SUB_CFG_AB_RS")>0)
         {
            //Ex2007 platform should be hidden
            $("nonE12EnableFunction").style.display = (vPlatform == "nonEx2007")?"":"none";
            
            //nonEx2007 platform should be hidden
            $("E12EnableFunction").style.display = (vPlatform == "Ex2007")?"":"none";
            
            if(vPlatform == "Ex2007")
            {
                //[MailBox only] should be hidden
                $("BridgeHeadEnableFunction").style.display = (vMailBox_only)?"none":"";
                
                //[vGateway] or [vBridgeHead_only] should be hidden
                $("MailboxEnableFunction").style.display = (vGateway || vBridgeHead_only)?"none":"";
            }
            //[MailBox only] should be hidden
            //$("QuarantineEntire").style.display = (vMailBox_only)?"none":""; 
        }
		*/
    }
   else if(ActionPage == "scan/Contentfiltering_List.htm")
    {
        /* if(document.location.href.indexOf("SMEX_SUB_CFG_CF_RS")>0)
         {
            //Ex2007 platform should be hidden
            $("nonE12EnableFunction").style.display = (vPlatform == "nonEx2007")?"":"none";
            
            //nonEx2007 platform should be hidden
            $("E12EnableFunction").style.display = (vPlatform == "Ex2007")?"":"none";
            
            if(vPlatform == "Ex2007")
            {
                //[MailBox only] should be hidden
                $("BridgeHeadEnableFunction").style.display = (vMailBox_only)?"none":"";      
                
                //[vGateway] or [vBridgeHead_only] should be hidden
                $("MailboxEnableFunction").style.display = (vGateway || vBridgeHead_only)?"none":"";
            }
        }*/
    }
   else if(ActionPage == "scan/Contentfiltering_Add_General.htm")
    {
        //[MailBox only] should be hidden
      //  $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    } 
   else if(ActionPage == "scan/Contentfiltering_Edit_General.htm")
    {
        //[MailBox only] should be hidden
     //   $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    } 
   else if(ActionPage == "scan/Contentfiltering_Add_Antispam.htm")
    {
        //[MailBox only] should be hidden
      //  $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    }
   else if(ActionPage == "scan/Contentfiltering_Edit_Antispam.htm")
    {
        //[MailBox only] should be hidden
      //  $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    } 
   else if(ActionPage == "scan/Contentfiltering_Add_Monitor.htm")
    {
        //[MailBox only] should be hidden
      //  $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    }
   else if(ActionPage == "scan/Contentfiltering_Edit_Monitor.htm")
    {
        //[MailBox only] should be hidden
     //   $("QuaratineEntire").style.display = (vMailBox_only)?"none":"";
    }
   else if(ActionPage == "scan/Manualscan.htm")
    {
        //Only display in Ex2007 platform        
        //$("IncremFunc_Title").style.display = (vPlatform == "Ex2007")?"":"none";
        //$("IncremFunc_Setting").style.display = (vPlatform == "Ex2007")?"":"none";
    }
   else if(ActionPage == "scan/Manualscan_Details.htm")
   	{
        //Only display in Ex2007 platform        
   		//$("Incremental_Report").style.display = (vPlatform == "Ex2007")?"":"none";
   	}
   else if(ActionPage == "scan/Scheduledscan.htm")
    {
        //Only display in Ex2007 platform        
        //$("IncremFunc_Title").style.display = (vPlatform == "Ex2007")?"":"none";
       // $("IncremFunc_Setting").style.display = (vPlatform == "Ex2007")?"":"none";
    }  
   else if(ActionPage == "updates/Manual.htm")
    {
        //[MailBox only] should be hidden
     /*   if(vMailBox_only || hiAntiSpam) $("chkSpamPattern").checked = false;
        $("chkSpamPattern").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam1").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        if(vMailBox_only || hiAntiSpam) $("chkSpamEngine").checked = false;
        $("chkSpamEngine").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam2").style.display = (vMailBox_only || hiAntiSpam)?"none":"";*/
    }
   else if(ActionPage == "updates/Scheduled.htm")
    {
        //[MailBox only] should be hidden
      /*  if(vMailBox_only || hiAntiSpam) $("chkSpamPattern").checked = false;
        $("chkSpamPattern").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam1").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        if(vMailBox_only || hiAntiSpam) $("chkSpamEngine").checked = false;
        $("chkSpamEngine").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        $("prAntiSpam2").style.display = (vMailBox_only || hiAntiSpam)?"none":"";*/
    }  
   else if(ActionPage == "alerts/System.htm")
    {
        //[vGateway] or [vBridgeHead_only] should be hidden
        $("MS_SS_Success").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("MS_SS_Exceed").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("TransactionLog_Space").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("Interval_TransactionLog").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("MailStore_Size").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("Interval_MailStore").style.display = (vGateway || vBridgeHead_only)?"none":"";
        
        //[MailBox only] should be hidden
        $("SMTP_MSG_Exceed").style.display = (vMailBox_only)?"none":"";
    } 
   else if(ActionPage == "reports/Onetime_Edit.htm")
    {        
        //[MailBox only] should be hidden
      //  $("prAntispam").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        
        //false positive
        if(vPlatform == "Ex2007"){
            $("FalsePositive_Sender").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
            $("FalsePositive_Domain").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
        }
        else{
            $("FalsePositive_Sender").style.display = (vEUQ)?"":"none";
            $("FalsePositive_Domain").style.display = (vEUQ)?"":"none";
        }
    }
   else if(ActionPage == "reports/Scheduled_Edit.htm")
    {        
        //[MailBox only] should be hidden
        $("prAntispam").style.display = (vMailBox_only || hiAntiSpam)?"none":"";
        
        //false positive
        if(vPlatform == "Ex2007"){
            $("FalsePositive_Sender").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
            $("FalsePositive_Domain").style.display = (vBridgeHead_MailBox && vEUQ)?"":"none";
        }
        else{
            $("FalsePositive_Sender").style.display = (vEUQ)?"":"none";
            $("FalsePositive_Domain").style.display = (vEUQ)?"":"none";
        }
    }
   /* Always hidden for PP 1.8 by Tony Low at 2009.01.16
   else if(ActionPage == "administration/Admin_debugger.htm")
    {        
        //[vGateway] or [vBridgeHead_only] should be hidden
        $("SMEX_Remote_Config").style.display = (vGateway || vBridgeHead_only)?"none":"";
        $("VSAPI_debugger").style.display = (vGateway || vBridgeHead_only)?"none":"";
        
        //[MailBox only] should be hidden
        $("TransportService_debugger").style.display = (vMailBox_only || vPlatform != "Ex2007")?"none":"";
        
        //Exchange 2007 should be hidden
        //$("SMTP_debugger").style.display = (vPlatform == "Ex2007")?"none":"";
    }*/
   else if(ActionPage == "logs/Maintenance_Manual.htm")
    {
        //[BridgeHead only] or [Cateway] should be hidden
        $("chkScanEvents_id").style.display = (vBridgeHead_only || vGateway)?"none":"";
        $("chkScanEvents_txt_id").style.display = (vBridgeHead_only || vGateway)?"none":"";
        if(vBridgeHead_only || vGateway)
            $("chkLogItemsEVENTS").checked=false;
    }
   else if(ActionPage == "logs/Maintenance_Automatic.htm")
    {
        //[BridgeHead only] or [Cateway] should be hidden
        $("chkScanEvents_id").style.display = (vBridgeHead_only || vGateway)?"none":"";
        $("chkScanEvents_txt_id").style.display = (vBridgeHead_only || vGateway)?"none":"";
        if(vBridgeHead_only || vGateway)
            $("chkLogItemsEVENTS").checked=false;
    }
   else if(ActionPage == "administration/Notification_Settings.htm")
    {
        //Exchange 2007 and [MailBox only] should be hidden
        //if(vPlatform == "Ex2007" && vMailBox_only){
        //    $("DisName_Title").style.display = "none";
        //    $("DisName_Description").style.display = "none";
        //    $("DisName_Settings").style.display = "none";
        //}
        //else{
            $("DisName_Title").style.display = "";
            $("DisName_Description").style.display = "";
            $("DisName_Settings").style.display = "";
        //}
    }
   /* Disable ServerManagement for PP 1.8 by Tony Low at 2008.12.31
   else if(ActionPage == "top.htm")
    {
        //[BridgeHead only] or [Cateway] should be hidden
        $("Function_SM").style.display = (vGateway)?"none":"";
    }
    */
}
