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

    function ValidateNewRepDesc(){
      if (document.ReportStyleEditPage.ReportStyleType.value=='1'){
        var I=document.ReportStyleEditPage.ExistCustomReportStyles.selectedIndex;
        var TempDesc=RemoveBlanks(document.ReportStyleEditPage.ExistCustomReportStyles.options[I].value)
        if ((TempDesc=='') || (TempDesc=='STANDARD_TEMPLATE')){
          alert("Please select a valid source custom Report.");
          document.ReportStyleEditPage.ExistCustomReportStyles.focus();
          return(1);
        }
      }
      if (confirm("Are you sure you want to save selected report style? You will lose any styles that you may have customized.")==0)
        return(1);
    }

    function ChangeImageSrc(){
            var I=document.ReportStyleEditPage.StdReportStyles.selectedIndex;
            var AValue=document.ReportStyleEditPage.StdReportStyles.options[I].value;
            document.PreviewImage.alt="Current Style = "+AValue;
            AValue=document.ReportStyleEditPage.CTWebImagesPath.value+AValue+".jpg";
            //document.getElementById("PreviewImage").setAttribute("src", AValue);
            document.PreviewImage.src=AValue;
            //alert(AValue);
    }

    function DisplayBigImage(){
            var I=document.ReportStyleEditPage.StdReportStyles.selectedIndex;
            var AValue=document.ReportStyleEditPage.StdReportStyles.options[I].value;
            window.open(document.PreviewImage.src);
    }
