Index: MpdlXmlTextServer.py
===================================================================
--- MpdlXmlTextServer.py	(revision 443)
+++ MpdlXmlTextServer.py	(revision 444)
@@ -55,8 +55,8 @@
         tocMode = pageinfo['tocMode']
         characterNormalization = pageinfo['characterNormalization']
-        optionToggle = pageinfo['optionToggle']
+        #optionToggle = pageinfo['optionToggle']
         tocPN = pageinfo['tocPN']
         selfurl = self.absolute_url()
-        data = self.getServerData("doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s&characterNormalization=%s&optionToggle=%s&highlightQuery=%s"%(docpath, 'text', queryType, urllib.quote(query), pagesize, pn, sn, viewMode,characterNormalization,optionToggle ,urllib.quote(highlightQuery)))
+        data = self.getServerData("doc-query.xql","document=%s&mode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&sn=%s&viewMode=%s&characterNormalization=%s&highlightQuery=%s"%(docpath, 'text', queryType, urllib.quote(query), pagesize, pn, sn, viewMode,characterNormalization, urllib.quote(highlightQuery)))
         pagexml = data.replace('?document=%s'%str(docpath),'?url=%s'%url)
         pagedom = Parse(pagexml)
@@ -86,5 +86,5 @@
                         if href.startswith('page-fragment.xql'):
                             selfurl = self.absolute_url()            
-                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&optionToggle=%s&characterNormalization=%s'%(viewMode,queryType,urllib.quote(query),pagesize,pn,tocMode,pn,tocPN,optionToggle,characterNormalization))
+                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,urllib.quote(query),pagesize,pn,tocMode,pn,tocPN, characterNormalization))
                             hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)                                           
                 #logging.debug("PUREXML :%s"%(serializeNode(pagenode)))
@@ -101,5 +101,5 @@
                         if href.startswith('page-fragment.xql'):
                             selfurl = self.absolute_url()       
-                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&optionToggle=%s&characterNormalization=%s'%(viewMode,queryType,urllib.quote(query),pagesize,pn,tocMode,pn,tocPN,optionToggle,characterNormalization))
+                            pagexml=href.replace('mode=text','mode=texttool&viewMode=%s&queryType=%s&query=%s&queryResultPageSize=%s&queryResultPN=%s&tocMode=%s&searchPN=%s&tocPN=%s&characterNormalization=%s'%(viewMode,queryType,urllib.quote(query),pagesize,pn,tocMode,pn,tocPN,characterNormalization))
                             hrefNode.nodeValue = pagexml.replace('page-fragment.xql','%s'%selfurl)  
                         if href.startswith('../lt/lemma.xql'):
@@ -119,5 +119,5 @@
                     if hrefNode:
                         href = hrefNode.nodeValue
-                        hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s&optionToggle=%s&characterNormalization=%s'%(viewMode,tocMode,tocPN,pn,optionToggle,characterNormalization))             
+                        hrefNode.nodeValue=href.replace('mode=text','mode=texttool&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s&characterNormalization=%s'%(viewMode,tocMode,tocPN,pn,characterNormalization))             
                         if href.startswith('../lt/lex.xql'):
                             hrefNode.nodeValue = href.replace('../lt/lex.xql','%s/template/head_main_lex'%selfurl)         
@@ -186,5 +186,5 @@
         pn =pageinfo['current']
         sn = pageinfo['sn']
-        optionToggle =pageinfo ['optionToggle']
+        #optionToggle =pageinfo ['optionToggle']
         highlightQuery = pageinfo['highlightQuery']
         #mode = pageinfo ['viewMode']
@@ -198,5 +198,5 @@
             textmode = mode
         
-        textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s&optionToggle=%s"%(docpath,textmode,pn,characterNormalization,optionToggle)
+        textParam = "document=%s&mode=%s&pn=%s&characterNormalization=%s"%(docpath,textmode,pn,characterNormalization)
         if highlightQuery is not None:
             textParam +="&highlightQuery=%s&sn=%s"%(urllib.quote(highlightQuery),sn)           
@@ -424,5 +424,5 @@
         return data
     
-    def getQuery (self,  docinfo=None, pageinfo=None, query=None, queryType=None, pn=1, optionToggle=None):
+    def getQuery (self,  docinfo=None, pageinfo=None, query=None, queryType=None, pn=1):
          #number of
          docpath = docinfo['textURLPath'] 
@@ -487,10 +487,10 @@
         viewMode=  pageinfo['viewMode']
         characterNormalization = pageinfo ['characterNormalization']
-        optionToggle =pageinfo ['optionToggle']
+        #optionToggle =pageinfo ['optionToggle']
         tocMode = pageinfo['tocMode']
         tocPN = pageinfo['tocPN']  
         
-        data = self.getServerData("doc-query.xql","document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s&characterNormalization=regPlusNorm&optionToggle=1"%(docpath,queryType, pagesize, pn))  
-        page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&optionToggle=1'%(selfurl,url, viewMode, tocMode, tocPN))
+        data = self.getServerData("doc-query.xql","document=%s&queryType=%s&queryResultPageSize=%s&queryResultPN=%s&characterNormalization=regPlusNorm"%(docpath,queryType, pagesize, pn))  
+        page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s'%(selfurl,url, viewMode, tocMode, tocPN))
         text = page.replace('mode=image','mode=texttool')
         return text
Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 442)
+++ documentViewer.py	(revision 444)
@@ -907,5 +907,5 @@
         pageinfo['tocMode'] = tocMode
         pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization','reg')
-        pageinfo['optionToggle'] = self.REQUEST.get('optionToggle','1')
+        #pageinfo['optionToggle'] = self.REQUEST.get('optionToggle','1')
         pageinfo['query'] = self.REQUEST.get('query','') 
         pageinfo['queryType'] = self.REQUEST.get('queryType','')
