      function InitializeHiddenVars(){
        if (document.ReportEditHeaderFooterPage.CloseAndExit!=null){
          if (document.ReportEditHeaderFooterPage.CloseAndExit.value=="true"){
	    window.close();
	    return;
	  }		 	
        }

        var PageName="";
        if (document.ReportEditHeaderFooterPage.Page!=null)  
          var PageName=document.ReportEditHeaderFooterPage.Page.value;

        var TitlePanelTable=null;
        TitlePanelTable=document.getElementById("TitlePanel");
        //if (TitlePanelTable!=null){
        if (PageName=="reportedittitlestpage"){ 
                TitleFontColorCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.TitleFontNames.value;
                TitleFontColorCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.TitleFontSize.value;
                TitleFontColorCallerDiv.style.color=document.ReportEditHeaderFooterPage.TitleFontColors.value;
                TitleFontColorCallerDiv.style.backgroundColor=document.ReportEditHeaderFooterPage.TitleBackColor.value;
                TitleFontColorCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.TitleBold.value=="True") ? "bold" : "normal";
                TitleFontColorCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.TitleUnderLine.value=="True") ? "underline" : "none";
                TitleFontColorCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.TitleItalics.value=="True") ? "italic" : "normal";
                TitleFontColorCallerDiv.style.borderWidth=document.ReportEditHeaderFooterPage.TitleBorderWidth.value;
                TitleFontColorCallerDiv.style.borderColor=document.ReportEditHeaderFooterPage.TitleBorderColor.value;
                TitleFontColorCallerDiv.style.borderStyle=document.ReportEditHeaderFooterPage.TitleBorderStyle.value;
        }
        
        var SubTitlePanelTable=null;
        SubTitlePanelTable=document.getElementById("SubTitlePanel");
        //if (SubTitlePanelTable!=null){
        if (PageName=="reportedittitlestpage"){ 
                SubTitleFontColorCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.SubTitleFontNames.value;
                SubTitleFontColorCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.SubTitleFontSize.value;
                SubTitleFontColorCallerDiv.style.color=document.ReportEditHeaderFooterPage.SubTitleFontColors.value;
                SubTitleFontColorCallerDiv.style.backgroundColor=document.ReportEditHeaderFooterPage.SubTitleBackColor.value;
                SubTitleFontColorCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.SubTitleBold.value=="True") ? "bold" : "normal";
                SubTitleFontColorCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.SubTitleUnderLine.value=="True") ? "underline" : "none";
                SubTitleFontColorCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.SubTitleItalics.value=="True") ? "italic" : "normal";
                SubTitleFontColorCallerDiv.style.borderWidth=document.ReportEditHeaderFooterPage.SubTitleBorderWidth.value;
                SubTitleFontColorCallerDiv.style.borderColor=document.ReportEditHeaderFooterPage.SubTitleBorderColor.value;
                SubTitleFontColorCallerDiv.style.borderStyle=document.ReportEditHeaderFooterPage.SubTitleBorderStyle.value;
        }

        var UserText1PanelTable=null;
        UserText1PanelTable=document.getElementById("UserText1Panel");
        //if (UserText1PanelTable!=null){
        if (PageName=="reporteditusertextpage"){ 
                HeaderUserTextFontColorCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.HeaderUserTextFontNames.value;
                HeaderUserTextFontColorCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.HeaderUserTextFontSize.value;
                HeaderUserTextFontColorCallerDiv.style.color=document.ReportEditHeaderFooterPage.HeaderUserTextFontColors.value;
                HeaderUserTextFontColorCallerDiv.style.backgroundColor=document.ReportEditHeaderFooterPage.HeaderUserTextBackColor.value;
                HeaderUserTextFontColorCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.HeaderUserTextBold.value=="True") ? "bold" : "normal";
                HeaderUserTextFontColorCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.HeaderUserTextUnderLine.value=="True") ? "underline" : "none";
                HeaderUserTextFontColorCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.HeaderUserTextItalics.value=="True") ? "italic" : "normal";
                HeaderUserTextFontColorCallerDiv.style.borderWidth=document.ReportEditHeaderFooterPage.HeaderUserTextBorderWidth.value;
                HeaderUserTextFontColorCallerDiv.style.borderColor=document.ReportEditHeaderFooterPage.HeaderUserTextBorderColor.value;
                HeaderUserTextFontColorCallerDiv.style.borderStyle=document.ReportEditHeaderFooterPage.HeaderUserTextBorderStyle.value;
        }

        var UserText2PanelTable=null;
        UserText1Pane2Table=document.getElementById("UserText2Panel");
        //if (UserText2PanelTable!=null){
        if (PageName=="reporteditusertextpage"){ 
                FooterUserTextFontColorCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.FooterUserTextFontNames.value;
                //alert(FooterUserTextFontColorCallerDiv.style.fontFamily);
                FooterUserTextFontColorCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.FooterUserTextFontSize.value;
                //alert(FooterUserTextFontColorCallerDiv.style.fontSize);
                FooterUserTextFontColorCallerDiv.style.color=document.ReportEditHeaderFooterPage.FooterUserTextFontColors.value;
                //alert(FooterUserTextFontColorCallerDiv.style.color);
                FooterUserTextFontColorCallerDiv.style.backgroundColor=document.ReportEditHeaderFooterPage.FooterUserTextBackColor.value;
                //alert(FooterUserTextFontColorCallerDiv.style.backgroundColor);
                FooterUserTextFontColorCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.FooterUserTextBold.value=="True") ? "bold" : "normal";
                //alert(FooterUserTextFontColorCallerDiv.style.fontWeight);
                FooterUserTextFontColorCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.FooterUserTextUnderLine.value=="True") ? "underline" : "none";
                //alert(FooterUserTextFontColorCallerDiv.style.textDecoration);
                FooterUserTextFontColorCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.FooterUserTextItalics.value=="True") ? "italic" : "normal";
                //alert(FooterUserTextFontColorCallerDiv.style.fontStyle);
                FooterUserTextFontColorCallerDiv.style.borderWidth=document.ReportEditHeaderFooterPage.FooterUserTextBorderWidth.value;
                //alert(FooterUserTextFontColorCallerDiv.style.borderWidth);
                FooterUserTextFontColorCallerDiv.style.borderColor=document.ReportEditHeaderFooterPage.FooterUserTextBorderColor.value;
                //alert(FooterUserTextFontColorCallerDiv.style.borderColor);
                FooterUserTextFontColorCallerDiv.style.borderStyle=document.ReportEditHeaderFooterPage.FooterUserTextBorderStyle.value;
                //alert(FooterUserTextFontColorCallerDiv.style.borderStyle);
        }

        var PageHeaderPanelTable=null;
        PageHeaderPanelTable=document.getElementById("PageHeaderPanel");
        if (PageHeaderPanelTable!=null){
                BackColorDiv.style.borderWidth=document.ReportEditHeaderFooterPage.HFBorderWidth.value;
                BackColorDiv.style.borderColor=document.ReportEditHeaderFooterPage.HFBorderColor.value;
                BackColorDiv.style.borderStyle=document.ReportEditHeaderFooterPage.HFBorderStyle.value;
                BackColorDiv.style.backgroundColor=document.ReportEditHeaderFooterPage.HFBackColor.value;
                BackColorDiv.innerText=document.ReportEditHeaderFooterPage.HFBackColor.value;
                LeftFontCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.LeftFontNames.value;
                CenterFontCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.CenterFontNames.value;
                RightFontCallerDiv.style.fontFamily=document.ReportEditHeaderFooterPage.RightFontNames.value;
                LeftFontCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.LeftFontSize.value;
                CenterFontCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.CenterFontSize.value;
                RightFontCallerDiv.style.fontSize=document.ReportEditHeaderFooterPage.RightFontSize.value;
                LeftFontCallerDiv.style.color=document.ReportEditHeaderFooterPage.LeftFontColors.value;
                CenterFontCallerDiv.style.color=document.ReportEditHeaderFooterPage.CenterFontColors.value;
                RightFontCallerDiv.style.color=document.ReportEditHeaderFooterPage.RightFontColors.value;
                LeftFontCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.LeftBold.value=="True") ? "bold" : "normal";
                LeftFontCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.LeftUnderLine.value=="True") ? "underline" : "none";
                LeftFontCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.LeftItalics.value=="True") ? "italic" : "normal";
                CenterFontCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.CenterBold.value=="True") ? "bold" : "normal";
                CenterFontCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.CenterUnderLine.value=="True") ? "underline" : "none";
                CenterFontCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.CenterItalics.value=="True") ? "italic" : "normal";
                RightFontCallerDiv.style.fontWeight=(document.ReportEditHeaderFooterPage.RightBold.value=="True") ? "bold" : "normal";
                RightFontCallerDiv.style.textDecoration=(document.ReportEditHeaderFooterPage.RightUnderLine.value=="True") ? "underline" : "none";
                RightFontCallerDiv.style.fontStyle=(document.ReportEditHeaderFooterPage.RightItalics.value=="True") ? "italic" : "normal";
        }
        //alert(BackColorDiv.style.backgroundColor);
        //alert(LeftFontCallerDiv.style.fontFamily);
      }

      function SetHiddenVars(){
        var PageName="";
        if (document.ReportEditHeaderFooterPage.Page!=null)  
          var PageName=document.ReportEditHeaderFooterPage.Page.value;
        var TitlePanelTable=null;
        TitlePaneTable=document.getElementById("TitlePanel");
        //if (TitlePanelTable!=null){
        if (PageName=="reportedittitlestpage"){ 
                document.ReportEditHeaderFooterPage.TitleFontNames.value=TitleFontColorCallerDiv.style.fontFamily;
                document.ReportEditHeaderFooterPage.TitleFontSize.value=TitleFontColorCallerDiv.style.fontSize;
                document.ReportEditHeaderFooterPage.TitleFontColors.value=TitleFontColorCallerDiv.style.color;
                document.ReportEditHeaderFooterPage.TitleBold.value=(TitleFontColorCallerDiv.style.fontWeight=="bold") ? "True" : "False";
                document.ReportEditHeaderFooterPage.TitleUnderLine.value=(TitleFontColorCallerDiv.style.textDecoration=="underline") ? "True" : "False";
                document.ReportEditHeaderFooterPage.TitleItalics.value=(TitleFontColorCallerDiv.style.fontStyle=="italic") ? "True" : "False";
                document.ReportEditHeaderFooterPage.TitleBackColor.value=TitleFontColorCallerDiv.style.backgroundColor;
                document.ReportEditHeaderFooterPage.TitleBorderWidth.value=TitleFontColorCallerDiv.style.borderWidth;
                document.ReportEditHeaderFooterPage.TitleBorderColor.value=TitleFontColorCallerDiv.style.borderColor;
                document.ReportEditHeaderFooterPage.TitleBorderStyle.value=TitleFontColorCallerDiv.style.borderStyle;
        }

        var SubTitlePanelTable=null;
        SubTitlePaneTable=document.getElementById("SubTitlePanel");
        //if (SubTitlePanelTable!=null){
        if (PageName=="reportedittitlestpage"){ 
                document.ReportEditHeaderFooterPage.SubTitleFontNames.value=SubTitleFontColorCallerDiv.style.fontFamily;
                document.ReportEditHeaderFooterPage.SubTitleFontSize.value=SubTitleFontColorCallerDiv.style.fontSize;
                document.ReportEditHeaderFooterPage.SubTitleFontColors.value=SubTitleFontColorCallerDiv.style.color;
                document.ReportEditHeaderFooterPage.SubTitleBold.value=(SubTitleFontColorCallerDiv.style.fontWeight=="bold") ? "True" : "False";
                document.ReportEditHeaderFooterPage.SubTitleUnderLine.value=(SubTitleFontColorCallerDiv.style.textDecoration=="underline") ? "True" : "False";
                document.ReportEditHeaderFooterPage.SubTitleItalics.value=(SubTitleFontColorCallerDiv.style.fontStyle=="italic") ? "True" : "False";
                document.ReportEditHeaderFooterPage.SubTitleBackColor.value=SubTitleFontColorCallerDiv.style.backgroundColor;
                document.ReportEditHeaderFooterPage.SubTitleBorderWidth.value=SubTitleFontColorCallerDiv.style.borderWidth;
                document.ReportEditHeaderFooterPage.SubTitleBorderColor.value=SubTitleFontColorCallerDiv.style.borderColor;
                document.ReportEditHeaderFooterPage.SubTitleBorderStyle.value=SubTitleFontColorCallerDiv.style.borderStyle;
        }

        var UserText1PanelTable=null;
        UserText1Pane1Table=document.getElementById("UserText1Panel");
        //if (UserText1PanelTable!=null){
        if (PageName=="reporteditusertextpage"){ 
                document.ReportEditHeaderFooterPage.HeaderUserTextFontNames.value=HeaderUserTextFontColorCallerDiv.style.fontFamily;
                document.ReportEditHeaderFooterPage.HeaderUserTextFontSize.value=HeaderUserTextFontColorCallerDiv.style.fontSize;
                document.ReportEditHeaderFooterPage.HeaderUserTextFontColors.value=HeaderUserTextFontColorCallerDiv.style.color;
                document.ReportEditHeaderFooterPage.HeaderUserTextBold.value=(HeaderUserTextFontColorCallerDiv.style.fontWeight=="bold") ? "True" : "False";
                document.ReportEditHeaderFooterPage.HeaderUserTextUnderLine.value=(HeaderUserTextFontColorCallerDiv.style.textDecoration=="underline") ? "True" : "False";
                document.ReportEditHeaderFooterPage.HeaderUserTextItalics.value=(HeaderUserTextFontColorCallerDiv.style.fontStyle=="italic") ? "True" : "False";
                document.ReportEditHeaderFooterPage.HeaderUserTextBackColor.value=HeaderUserTextFontColorCallerDiv.style.backgroundColor;
                document.ReportEditHeaderFooterPage.HeaderUserTextBorderWidth.value=HeaderUserTextFontColorCallerDiv.style.borderWidth;
                document.ReportEditHeaderFooterPage.HeaderUserTextBorderColor.value=HeaderUserTextFontColorCallerDiv.style.borderColor;
                document.ReportEditHeaderFooterPage.HeaderUserTextBorderStyle.value=HeaderUserTextFontColorCallerDiv.style.borderStyle;
        }

        var UserText2PanelTable=null;
        UserText1Pane2Table=document.getElementById("UserText2Panel");
        //if (UserText2PanelTable!=null){
        if (PageName=="reporteditusertextpage"){ 
                document.ReportEditHeaderFooterPage.FooterUserTextFontNames.value=FooterUserTextFontColorCallerDiv.style.fontFamily;
                document.ReportEditHeaderFooterPage.FooterUserTextFontSize.value=FooterUserTextFontColorCallerDiv.style.fontSize;
                document.ReportEditHeaderFooterPage.FooterUserTextFontColors.value=FooterUserTextFontColorCallerDiv.style.color;
                document.ReportEditHeaderFooterPage.FooterUserTextBold.value=(FooterUserTextFontColorCallerDiv.style.fontWeight=="bold") ? "True" : "False";
                document.ReportEditHeaderFooterPage.FooterUserTextUnderLine.value=(FooterUserTextFontColorCallerDiv.style.textDecoration=="underline") ? "True" : "False";
                document.ReportEditHeaderFooterPage.FooterUserTextItalics.value=(FooterUserTextFontColorCallerDiv.style.fontStyle=="italic") ? "True" : "False";
                document.ReportEditHeaderFooterPage.FooterUserTextBackColor.value=FooterUserTextFontColorCallerDiv.style.backgroundColor;
                document.ReportEditHeaderFooterPage.FooterUserTextBorderWidth.value=FooterUserTextFontColorCallerDiv.style.borderWidth;
                document.ReportEditHeaderFooterPage.FooterUserTextBorderColor.value=FooterUserTextFontColorCallerDiv.style.borderColor;
                document.ReportEditHeaderFooterPage.FooterUserTextBorderStyle.value=FooterUserTextFontColorCallerDiv.style.borderStyle;
        }
      }


      function SetFieldHiddenVars(){
        var PageHeaderPanelTable=null;
        PageHeaderPanelTable=document.getElementById("PageHeaderPanel");
       // if (PageHeaderPanelTable==null)
          //return;
        document.ReportEditHeaderFooterPage.HFBackColor.value=BackColorDiv.style.backgroundColor;
        document.ReportEditHeaderFooterPage.HFBorderWidth.value=BackColorDiv.style.borderWidth;
        document.ReportEditHeaderFooterPage.HFBorderColor.value=BackColorDiv.style.borderColor;
        document.ReportEditHeaderFooterPage.HFBorderStyle.value=BackColorDiv.style.borderStyle;
        document.ReportEditHeaderFooterPage.LeftFontNames.value=LeftFontCallerDiv.style.fontFamily;
        document.ReportEditHeaderFooterPage.CenterFontNames.value=CenterFontCallerDiv.style.fontFamily;
        document.ReportEditHeaderFooterPage.RightFontNames.value=RightFontCallerDiv.style.fontFamily;
        document.ReportEditHeaderFooterPage.LeftFontSize.value=LeftFontCallerDiv.style.fontSize;
        document.ReportEditHeaderFooterPage.CenterFontSize.value=CenterFontCallerDiv.style.fontSize;
        document.ReportEditHeaderFooterPage.RightFontSize.value=RightFontCallerDiv.style.fontSize;
        document.ReportEditHeaderFooterPage.LeftFontColors.value=LeftFontCallerDiv.style.color;
        document.ReportEditHeaderFooterPage.CenterFontColors.value=CenterFontCallerDiv.style.color;
        document.ReportEditHeaderFooterPage.RightFontColors.value=RightFontCallerDiv.style.color;
        document.ReportEditHeaderFooterPage.LeftBold.value=(LeftFontCallerDiv.style.fontWeight=="bold") ? "True" : "False";
        document.ReportEditHeaderFooterPage.LeftUnderLine.value=(LeftFontCallerDiv.style.textDecoration=="underline") ? "True" : "False";
        document.ReportEditHeaderFooterPage.LeftItalics.value=(LeftFontCallerDiv.style.fontStyle=="italic") ? "True" : "False";
        document.ReportEditHeaderFooterPage.CenterBold.value=(CenterFontCallerDiv.style.fontWeight=="bold") ? "True" : "False";
        document.ReportEditHeaderFooterPage.CenterUnderLine.value=(CenterFontCallerDiv.style.textDecoration=="underline") ? "True" : "False";
        document.ReportEditHeaderFooterPage.CenterItalics.value=(CenterFontCallerDiv.style.fontStyle=="italic") ? "True" : "False";
        document.ReportEditHeaderFooterPage.RightBold.value=(RightFontCallerDiv.style.fontWeight=="bold") ? "True" : "False";
        document.ReportEditHeaderFooterPage.RightUnderLine.value=(RightFontCallerDiv.style.textDecoration=="underline") ? "True" : "False";
        document.ReportEditHeaderFooterPage.RightItalics.value=(RightFontCallerDiv.style.fontStyle=="italic") ? "True" : "False";
    
      }
