function replaceScreenAttr(strHTMLTagID, doc)
    {
 
 
           var strText= doc.getElementById(strHTMLTagID).innerHTML;
           var strAttrValue=null;
           //alert("strText=" + strText + "***");
           //strText="basicSearchText";
           //var strAdvancedSearch="advancedSearchText";
           
            var aScreenAttr = new Array(10);  // all values in array have to be in accordance with value of ScreenAttrValueDroplet
            aScreenAttr[0]="advancedSearchText"; //droplen bean output these values when user is null
            aScreenAttr[1]="basicSearchText";
            aScreenAttr[2]="browseText";
            aScreenAttr[3]="CustomizeDisplay";
            aScreenAttr[4]="emailPrintSaveText";
            aScreenAttr[5]="searchHistoryText";
            aScreenAttr[6]="thesaurusText";
            
            if ((ipos=strText.indexOf(aScreenAttr[0])) !=-1)
                 
               strAttrValue=getNewInnerHTML(strText,aScreenAttr[0],"Advanced Search",ipos);
                
            else if ((ipos=strText.indexOf(aScreenAttr[1])) !=-1)
               strAttrValue=getNewInnerHTML(strText,aScreenAttr[1],"Basic Search",ipos);
            else if ((ipos=strText.indexOf(aScreenAttr[2])) !=-1)
               strAttrValue=getNewInnerHTML(strText,aScreenAttr[2],"Browse",ipos);
            else if ((ipos=strText.indexOf(aScreenAttr[3])) !=-1)
	       strAttrValue=getNewInnerHTML(strText,aScreenAttr[3],"Customize Display",ipos);
            else if ((ipos=strText.indexOf(aScreenAttr[4])) !=-1)
	       strAttrValue=getNewInnerHTML(strText,aScreenAttr[4],"Print Email Save",ipos);
            else if ((ipos=strText.indexOf(aScreenAttr[5])) !=-1)
	       strAttrValue=getNewInnerHTML(strText,aScreenAttr[5],"Search History",ipos);
            else if ((ipos=strText.indexOf(aScreenAttr[6])) !=-1)
	       strAttrValue=getNewInnerHTML(strText,aScreenAttr[6],"Thesaurus",ipos);
            
            
              
              
            
           
           //alert("strAttrValue=" + strAttrValue);
              
           if (strAttrValue != null)
            {
              doc.getElementById(strHTMLTagID).innerHTML=strAttrValue; 
            }
          }  
           
        function getNewInnerHTML(strText, strAttrValue, strNew, iposition)
          {
            var strReturn;
            //alert("strText=" + strText + " len=" + strText.length);
            //alert("strAttrValue=" + strAttrValue + " len=" + strAttrValue.length);
            
            if (strAttrValue.length == strText.length)
              strReturn=strNew; 
            else
             { 
               var ilen=iposition + strAttrValue.length; 
               strReturn=strText.substring(0,iposition) + strNew + strText.substring(ilen) ;
               //alert("strText=" + strText);
               //alert("strReturn=" + strReturn);
             }
            //alert("strReturn=" + strReturn);
            return strReturn;
          }     
           
           
        function checkAllScreenAttr() //loop through all the screen attributes in the file
	 {
	    var ix
	    var itotal=100; 
	    var inull=0;
	    for (ix=1; ix <= itotal, inull<3  ; ix++)  //itotal=100, inull<3 are arbitrary numbers
	      {
	         var strAttrId;
	         strAttrId="screenattr" + ix;
	         //replaceScreenAttr(strAttrId, document)
	         if (document.getElementById(strAttrId))
	            replaceScreenAttr(strAttrId, document)
	         else
	           { 
	             
	             //alert("no id found inull=" + inull);
	             inull++;
	           }  
	       //alert("aScreenAttr len=" + aScreenAttr.length);
	      }
          }