inedit.htm.svn-base
上传用户:liangcc
上传日期:2019-05-24
资源大小:4412k
文件大小:52k
源码类别:

WEB邮件程序

开发平台:

Java

  1. <HEAD>
  2. <META http-equiv="Content-Type" content="text/html;Charset=gbk">
  3. <SCRIPT>
  4. var L_DEFAULTHTML_TEXT="<DIV></DIV>";
  5. function _CFont(szDef,szText,bSymbol){
  6. return new Array(szDef,szText,bSymbol);
  7. };
  8. defaultFonts=new Array();
  9. defaultFonts[0]=_CFont("Geneva,Arial,Sans-serif","Arial",false);
  10. defaultFonts[1]=_CFont("Arial Black,Geneva,Arial,Sans-serif","Arial Black",false);
  11. defaultFonts[2]=_CFont("Courier New,Courier,Monospace","Courier New",false);
  12. defaultFonts[3]=_CFont("Times New Roman,Times,Serif","Times New Roman",false);
  13. defaultFonts[4]=_CFont("Verdana,Geneva,Arial,Sans-serif","Verdana",false);
  14. defaultFonts[5]=_CFont("Lucida Handwriting,Cursive","Lucida Handwriting",false);
  15. defaultFonts[6]=_CFont("Garamond,Times,Serif","Garamond",false);
  16. defaultFonts[7]=_CFont("Webdings","Webdings",true);
  17. defaultFonts[8]=_CFont("Wingdings","Wingdings",true);
  18. defaultFonts[9]=_CFont("宋体","宋体",false);
  19. defaultFonts[10]=_CFont("黑体","黑体",false);
  20. defaultFonts[11]=_CFont("细明体","细明体",false);
  21. var L_TOOLBARGIF_TEXT="rte.gif";
  22. var aSizes=new Array(25,25,25,8,25,25,8,25,25,25,8,52,52,52,8,25,25,25,8,25,25,25,8,25,25,25,25,8,25);
  23. var isIE4=(navigator.appVersion.indexOf("MSIE 4")>0)
  24. //替换HTML字符
  25. function replacestr(htmlstr)
  26. {
  27.   htmlstr = replace(htmlstr,"&quot;", """") //双引号
  28.   htmlstr = replace(htmlstr,"&lt;", "<")     
  29.   htmlstr = replace(htmlstr,"&gt;", ">")     
  30.   htmlstr = replace(htmlstr,"&amp;", "&")
  31.   return htmlstr
  32. }
  33. /*******************************/
  34.  //公共方法: setHTML
  35.  //参数: szHTML:文本
  36.  //设置编辑器文本的内容
  37. /******************************/
  38. function setHTML(szHTML)
  39. {
  40. //szHTML=replacestr(szHTML)
  41. if(szHTML=="")szHTML=L_DEFAULTHTML_TEXT
  42. if(g_state.bMode)
  43. {
  44. idEditbox.document.body.innerHTML=szHTML
  45. }
  46. else
  47. {
  48. alert(g_state.bMode);
  49. idEditbox.document.body.innerText=szHTML
  50. }
  51. if(g_state.bLoaded)setSelection(true)
  52. }
  53. /*******************************/
  54.  //公共方法: getHTML
  55.  //返回: 编辑器内容文本 
  56.  //获取编辑器文本的内容
  57. /******************************/
  58. function getHTML()
  59. {
  60. var szRet=(g_state.bMode?_CUtil_TrimCR(_CUtil_CleanHTML()):_CUtil_TrimCR(idEditbox.document.body.innerText))
  61. return szRet
  62. }
  63. /*******************************/
  64.  //公共方法: getPureText
  65.  //返回: 编辑器内容纯文本 
  66.  //获取编辑器文本的内容
  67. /******************************/
  68. function getPureText()
  69. {
  70. var szRet=idEditbox.document.body.createTextRange();
  71. return szRet.text;
  72. }
  73. /*******************************/
  74.  //方法: getText
  75.  //获取编辑器文本
  76. /******************************/
  77. function getText(){
  78. var szRet=""
  79. if(g_state.bMode)
  80. szRet=idEditbox.document.body.innerText
  81. else{
  82. setMode(true)
  83. szRet=idEditbox.document.body.innerText
  84. setMode(false)
  85. }
  86. return szRet
  87. }
  88. /*******************************/
  89.  //方法: getBody
  90.  //返回编辑器编辑区的body对象
  91. /******************************/
  92. function getBody()
  93. {
  94. var oRet=idEditbox.document.body
  95. return oRet
  96. }
  97. /*******************************/
  98.  //方法: getWidth
  99.  //返回编辑器offsetWidth对象
  100. /******************************/
  101. function getWidth()
  102. {
  103. var nRet=document.body.offsetWidth
  104. return nRet
  105. }
  106. /*******************************/
  107.  //方法: getWidth
  108.  //返回编辑器offsetHeight对象
  109. /******************************/
  110. function getHeight()
  111. {
  112. var nRet=document.body.offsetHeight
  113. return nRet
  114. }
  115. /*******************************/
  116.  //方法: insertHTML
  117.  //插入对象的HTML文本
  118. /******************************/
  119. function insertHTML(szHTML)
  120. {
  121. if (!g_state.hasFocus) return;
  122. var sType
  123. var sel=g_state.GetSelection()
  124. sType=sel.type
  125. if(g_state.bMode)
  126. {
  127.  if(sType=="Control")
  128.  sel.item(0).outerHTML=szHTML
  129.  else
  130.  {
  131.    sel.pasteHTML(szHTML)
  132.    idEditbox.document.body.focus()
  133.    g_state.hasFocus=true
  134.   }
  135. }
  136. else
  137.  sel.text=szHTML
  138. g_state.selection=null
  139. }
  140. /*******************************/
  141.  //方法: appendHTML
  142.  //添加对象的HTML文本
  143. /******************************/
  144. function appendHTML(szHTML){
  145. if(g_state.bMode)
  146. idEditbox.document.body.insertAdjacentHTML("beforeEnd",szHTML)
  147. else
  148. idEditbox.document.body.insertAdjacentText("beforeEnd",szHTML)
  149. }
  150. /*******************************/
  151.  //方法: setBGColor
  152.  //设置编辑器背景色
  153. /******************************/
  154. function setBGColor(szValue)
  155. {
  156. g_state.bgColor=szValue
  157. idEditbox.document.body.bgColor=g_state.bgColor
  158. }
  159. /*******************************/
  160.  //方法: setSelection
  161.  //保存编辑器中用户所选高亮的部分
  162. /******************************/
  163. function setSelection(bDir){
  164. var tr=idEditbox.document.body.createTextRange()
  165. tr.collapse(bDir)
  166. tr.select()
  167. g_state.SaveSelection()
  168. }
  169. /*******************************/
  170.  //方法: setDefaultStyle
  171.  //设置编辑器样式
  172. /******************************/
  173. function setDefaultStyle(szValue)
  174. {
  175. g_state.css=szValue
  176. if(g_state.bMode)
  177. idEditbox.document.body.style.cssText=g_state.css
  178. }
  179. /*******************************/
  180.  //方法: setSkin
  181.  //设置编辑器SKIN样式
  182. /******************************/
  183. function setSkin(szSkin)
  184. {
  185. if(szSkin==null)
  186. document.styleSheets.skin.cssText=g_state.defaultSkin
  187. else
  188. document.styleSheets.skin.cssText=szSkin
  189. document.styleSheets.skin.disabled=false
  190. }
  191. /*******************************/
  192.  //方法: setToolbar
  193.  //设置编辑器功能条显示属性
  194. /******************************/
  195. function setToolbar(id,g_state)
  196. {
  197. var el=document.all[id]
  198. if(el)
  199. el.style.display=(g_state)?"":"none"
  200. if(id=="tbmode"){
  201. _setSize()
  202. }
  203. }
  204. /*******************************/
  205.  //方法: setMode
  206.  //设置编辑器模式
  207. /******************************/
  208. function setMode(bMode)
  209. {
  210. if(bMode!=g_state.bMode){
  211. g_state.bMode=bMode
  212. var objBody=idEditbox.document.body
  213. if(!bMode&&!g_state.bMode)
  214. {
  215. objBody.bgColor=objBody.style.cssText="#FFFFFF"
  216. if(g_state.customButtons)
  217. idStandardBar.style.display="none"
  218. else
  219. idToolbar.style.display="none"
  220. objBody.innerText=idEditbox.document.body.innerHTML
  221. objBody.className="textMode"
  222. }
  223. if((bMode)&&(g_state.bMode))
  224. {
  225. setDefaultStyle(g_state.css)
  226. setBGColor(g_state.bgColor)
  227. objBody.className=idStandardBar.style.display=idToolbar.style.display=""
  228. objBody.innerHTML=idEditbox.document.body.innerText
  229. }
  230. _setSize()
  231. setSelection(true)
  232. }
  233. return bMode
  234. }
  235. /*******************************/
  236.  //方法: _Format
  237.  //编辑功能实现
  238. /******************************/
  239. function _Format(szHow,szValue){
  240. if (!g_state.hasFocus) return;
  241. var oSel=g_state.GetSelection()
  242. var sType=oSel.type
  243. var oTarget=(sType=="None"?idEditbox.document:oSel)
  244. var oBlock=(oSel.parentElement!=null?_CUtil_GetBlock(oSel.parentElement()):oSel.item(0))
  245. switch(szHow)
  246. {
  247. case "Undo":
  248. case "Redo":
  249. idEditbox.document.execCommand(szHow)
  250. break
  251. case "Justify":
  252. if(oBlock)
  253. {
  254. oBlock.style.textAlign=""
  255. if(((oBlock.tagName=="TABLE")||(oBlock.tagName=="IMG"))&&(("left"==oBlock.align)&&("Left"==szValue))){
  256. oBlock.align=""
  257. break;
  258. }
  259. oBlock.align=szValue
  260. if((oBlock.tagName=="HR")||((oBlock.tagName=="IMG")&&szValue!="Center"))break;
  261. }
  262. szHow=szHow+szValue
  263. szValue=""
  264. default:
  265. oTarget.execCommand(szHow,false,szValue)
  266. //debug
  267. //alert(idEditbox.document.body.innerHTML)
  268. break
  269. }
  270. g_state.RestoreSelection()
  271. return true
  272. }
  273. /*******************************/
  274.  //方法: _pageReady
  275.  //编辑器编辑区初始化
  276. /******************************/
  277. function _pageReady()
  278. {
  279. idEditbox.document.body.onblur=idEditbox.onblur=g_state.SaveSelection
  280. idEditbox.document.onkeydown=_Editor_KeyDownHandler
  281. idEditbox.document.onmousedown=_Editor_ClickHandler
  282. idEditbox.document.ondblclick=_Editor_DblClickHandler
  283. idEditbox.document.body.oncontextmenu=new Function("return false")
  284. //qiuchun 注释:在JSP环境中,下面的访问为非法,可能是基于安全性考虑
  285. /*if(g_state.szSearch!="")idPopup.document.domain=idEditbox.document.domain=document.domain=g_state.szSearch
  286. else{
  287. g_state.szSearch=_CUtil_DomainSuffix(location.hostname)
  288. if(g_state.szSearch!="")idPopup.document.domain=idEditbox.document.domain=document.domain=parent.document.domain=g_state.szSearch
  289. }*/
  290. if(document.styleSheets.skin.disabled)setSkin(null)
  291. _setSize()
  292. idEditor.style.visibility=""
  293. g_state.bLoaded=true
  294. // var tr=idEditbox.document.body.createTextRange()
  295. // tr.select()
  296. // g_state.SaveSelection()
  297. // setSelection(false)
  298. setBGColor(g_state.bgColor)
  299. }
  300. /*******************************/
  301.  //方法: _initEditor
  302.  //初始化编辑器
  303. /******************************/
  304. function _initEditor(){
  305. g_state=new _CState()
  306. window.onresize=_setSize
  307. var sz=""
  308. sz+="<STYLE>A{text-decoration:none}nTD{font-size:14.9px}n.textMode{border-top: 1px black solid;font-size:14.9px}n.NOBORDER TD{border:1px gray solid}BODY{border:1px black solid;border-top:none;font-size:14.9px}</STYLE><BODY ONCONTEXTMENU="return false">"+L_DEFAULTHTML_TEXT+"</BODY>"
  309. _CPopup_Init()
  310. idEditbox.document.designMode="on"
  311. idEditbox.document.open("text/html","replace")
  312. idEditbox.document.write(sz)
  313. idEditbox.document.close()
  314. setTimeout("_pageReady()",100)
  315. }
  316. /*******************************/
  317.  //方法: _Editor_ClickHandler
  318.  //编辑器onmousedown句柄
  319. /******************************/
  320. function _Editor_ClickHandler(){
  321. g_state.hasFocus=true
  322. g_state.selection=null
  323. }
  324. /*******************************/
  325.  //方法: _Editor_KeyDownHandler
  326.  //编辑器onkeydown句柄
  327. /******************************/
  328. function _Editor_KeyDownHandler(){
  329. g_state.hasFocus=true
  330. var ev=this.parentWindow.event
  331. if((ev.keyCode==78||ev.keyCode==72)&&ev.ctrlKey){
  332. if(ev.keyCode==78)
  333. window.open(parent.location)
  334. ev.keyCode=0;ev.returnValue=false
  335. }
  336. if(ev.keyCode==9)
  337. {g_state.SaveSelection()}
  338. else
  339. g_state.selection=null
  340. if (ev.keyCode==70&&ev.ctrlKey)
  341. {
  342.      _doSearch();
  343.  //_CPopup_Show("Search")
  344.  ev.keyCode=0;ev.returnValue=false;
  345. }
  346. }
  347. var blnIsNew = false;
  348. var strSearch = '';
  349. var sBookMark = '';
  350. var oRange = null;
  351. var bRange = null;
  352. var oWhole=null;
  353. var intStart=0;
  354. var intEnd=0;
  355. var xRange = null;
  356. function _doSearch()
  357. {
  358.     xRange = idEditbox.document.body.createTextRange();
  359. oWhole=_CUtil_TrimCR(xRange.text);
  360. oRange = xRange.duplicate();
  361. bRange = xRange.duplicate();
  362.     _Search2("",parseInt(idEditbox.document.body.innerText.length,10),4);
  363. }
  364. function _Search2(input,iScope,iFlag)
  365.    if (input=="")
  366.      input=window.prompt("查找(注意:文档中如含有表格,图片等元素,查找定位可能会出现误差!)n请在下面的输入框中输入查找内容:","");
  367.    else
  368.      input=window.prompt("查找(注意:文档中如含有表格,图片等元素,查找定位可能会出现误差!)n请在下面的输入框中输入查找内容:",input);
  369.     var strInput = input;
  370. if (strInput == '' || !strInput) {strSearch='';return false;}
  371. if (strInput != strSearch)
  372. {   
  373.    blnIsNew = true;
  374.    strSearch = strInput;
  375.    oRange=bRange.duplicate();
  376.       
  377. else
  378. blnIsNew=false;
  379. if (blnIsNew)
  380. {
  381.    if (oWhole.indexOf(strSearch)>=0)
  382.    {
  383.        intStart=intEnd+oWhole.indexOf(strSearch);
  384.    intEnd=intStart+parseInt(strSearch.length,10);
  385.    oRange.moveEnd("character",-iScope);
  386.            oRange.moveEnd("character",intEnd);
  387.    oRange.moveStart("character",intStart);
  388.    oRange.select();
  389.    oWhole=oWhole.substring(oWhole.indexOf(strSearch)+parseInt(strSearch.length,10),iScope);
  390.    strSearch='';
  391.    _Search2(strInput,iScope,iFlag);
  392.    }
  393.     else
  394.    intStart=intEnd=0;
  395.    var b = window.confirm('搜索已经到达文档结尾处,是否重新搜索?');
  396.    if (b) 
  397.    {strSearch='';_doSearch();}
  398.    else
  399.    {
  400.      strSearch='';
  401.    }
  402. }   
  403.     }
  404. else
  405.    intStart=intEnd=0;
  406.    strSearch='';
  407.    alert('未找到查找内容!'); 
  408. }
  409. }
  410. /*******************************/
  411.  //方法: _Editor_DblClickHandler
  412.  //编辑器ondblclick句柄
  413. /******************************/
  414. function _Editor_DblClickHandler(){
  415. var el=this.parentWindow.event.srcElement
  416. if(el.tagName=="IMG"){
  417. el.removeAttribute("width")
  418. el.removeAttribute("height")
  419. el.style.removeAttribute("width")
  420. el.style.removeAttribute("height")
  421. el.width=el.width
  422. el.height=el.height
  423. }
  424. if(el.tagName=="TABLE")
  425. _CPopup_Show('Table')
  426. }
  427. /*******************************/
  428.  //方法: _setSize
  429.  //编辑器设置大小
  430.  /******************************/
  431. function _setSize(){
  432. document.all.idEditbox.style.pixelHeight=document.body.clientHeight - idToolbar.offsetHeight - document.all.idMode.offsetHeight
  433. document.all.idPopup.style.pixelLeft=(document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth)/ 2
  434. document.all.idPopup.style.pixelLeft=(document.body.clientWidth)/ 2
  435. }
  436. /*******************************/
  437.  //方法: _drawToolbar
  438.  //编辑器画功能区
  439. /******************************/
  440. function _drawToolbar()
  441. {
  442. var aIds=new Array("cut","copy","paste","bar1","undo","redo","bar2","link","table","image","bar3","formatblock","fontstyle","fontsize","bar4","bold","italic","underline","bar5","left","center","right","bar6","orderedlist","unorderedlist","outdent","indent","bar7","textcolor")
  443. var aTips=new Array("剪切","复制","粘贴","","撤销","恢复","","超链接","插入表格","插入图片","","字体格式","字体","字体尺寸","","加粗","斜体","下划线","","左对齐","居中","右对齐","","编号","项目符号","减少缩进","增加缩进","","字体颜色")
  444. var aCommand=new Array("_Format('cut')","_Format('copy')","_Format('paste')",null,"_Format('Undo')","_Format('Redo')",null,"_CPopup_Show('Link')","_CPopup_Show('Table')","_CPopup_Show('Image')",null,"_CPopup_Show('formatblock')","_CPopup_Show('font')","_CPopup_Show('fontsize')",null,"_Format('bold')","_Format('italic')","_Format('underline')",null,"_Format('Justify','Left')","_Format('Justify','Center')","_Format('Justify','Right')",null,"_Format('insertorderedlist')","_Format('insertunorderedlist')","_Format('outdent')","_Format('indent')",null,"_CPopup_Show('ForeColor')")
  445. var sz="<DIV ID=idStandardBar><NOBR>",iLeft=0,iHeight=24
  446. for(var i=0 ;i<aSizes.length;i++)
  447. {
  448. sz+="<SPAN CLASS=tbButton ONKEYPRESS="if(event.keyCode==13){"+aCommand[i]+";event.keyCode=0}" ID="tb"+aIds[i]+"" STYLE="width:"+aSizes[i]+";height:"+iHeight+"">" +"<SPAN STYLE="position:absolute;width:"+aSizes[i]+";height:"+iHeight+";clip:rect(0 "+aSizes[i]+" "+iHeight+" 0)"><IMG ALT=""+aTips[i]+"" TITLE=""+aTips[i]+"" ONCLICK=""+aCommand[i]+";event.cancelBubble=true" ONMOUSEDOWN="if(event.button==1)this.style.pixelTop=-"+(iHeight*2)+"" ONMOUSEOVER="this.style.pixelTop=-"+iHeight+"" ONMOUSEOUT="this.style.pixelTop=0" ONMOUSEUP="this.style.pixelTop=-"+iHeight+"" SRC=""+L_TOOLBARGIF_TEXT+"" STYLE="position:absolute;top:0;left:-"+iLeft+""></SPAN></SPAN>" +(aTips[i]==""?"</NOBR><NOBR>":"")
  449. iLeft+=aSizes[i]
  450. }
  451. sz+="</NOBR>"
  452. document.write(sz+"</DIV>")
  453. }
  454. /*******************************/
  455.  //方法: _drawModeSelect
  456.  //编辑器画MODE区
  457. /******************************/
  458. function _drawModeSelect(){
  459. var sz="<TABLE CELLSPACING=0 CELLPADDING=0 ID=idMode></TABLE>"
  460. document.write(sz)
  461. }
  462. /*******************************/
  463.  //方法: _CState
  464.  //对象,存储各种状态和对象变量
  465. /******************************/
  466. function _CState()
  467. {
  468. this.hasFocus=true
  469. this.selection=null
  470. this.bMode=true
  471. this.customButtons=false
  472. this.css=this.bgColor="#FFFFFF"
  473. this.defaultSkin=document.styleSheets.skin.cssText
  474. this.popupSkin=document.styleSheets.popupSkin.cssText
  475. this.szSearch=location.search.substring(1)
  476. this.aBindings=new Array()
  477. this.aListPopups=new Object()
  478. this.aCache=new Object()
  479. this.bLoaded=false
  480. this.oPhoto=null
  481. this.RestoreSelection=_CState_RestoreSelection
  482. this.GetSelection=_CState_GetSelection
  483. this.SaveSelection=_CState_SaveSelection
  484. }
  485. function _CState_RestoreSelection()
  486. {
  487. if(this.selection)this.selection.select()
  488. }
  489. function _CState_GetSelection()
  490. {
  491. var oSel=this.selection
  492. if(!oSel){
  493. oSel=idEditbox.document.selection.createRange()
  494. oSel.type=idEditbox.document.selection.type
  495. }
  496. return oSel
  497. }
  498. function _CState_SaveSelection()
  499. {
  500. try
  501. {
  502. this.selection=idEditbox.document.selection.createRange()
  503. if(!this.selection)
  504. this.selection=new Object
  505. this.selection.type=idEditbox.document.selection.type
  506. }
  507. catch(x)
  508. {alert(x.message)}
  509. }
  510. /*******************************/
  511.  //方法: _CPopup_Init
  512.  //编辑器初始化弹出功能菜单
  513. /******************************/
  514. function _CPopup_Init()
  515. {
  516. var sz="<HTML ID=popup><STYLE>" +document.styleSheets.defPopupSkin.cssText +"n" +document.styleSheets.popupSkin.cssText +"</STYLE><BODY ONCONTEXTMENU="return false" ONSCROLL="return false" SCROLL=no TABINDEX=-1 ONSELECTSTART="return event.srcElement.tagName=='INPUT'" ><DIV ID=puRegion><TABLE ID=header><TR><TH NOWRAP ID=caption></TH><TH VALIGN=middle ALIGN=RIGHT><DIV ID=close ONCLICK="parent._CPopup_Hide()">×</DIV></TH></TR></TABLE><DIV ALIGN=CENTER ID=content></DIV></DIV></BODY></HTML>"
  517. idPopup.document.open("text/html","replace")
  518. idPopup.document.write(sz)
  519. idPopup.document.close()
  520. }
  521. /*******************************/
  522.  //方法: _CPopup_Hide
  523.  //编辑器隐藏功能弹出菜单
  524. /******************************/
  525. function _CPopup_Hide()
  526. {
  527. document.all.idPopup.style.zIndex=-1
  528. document.all.idPopup.style.visibility="hidden"
  529. try
  530. {
  531. var popObj = idPopup.document
  532. idPopup.document._type=""
  533. idPopup.document.onkeydown=idPopup.document.onmouseover=idPopup.document.onclick=null
  534. }
  535. catch(x)
  536. {}
  537. //add
  538. idEditbox.document.body.focus()
  539. g_state.hasFocus=true
  540. }
  541. /*******************************/
  542.  //方法: _CPopup_Show
  543.  //编辑器显示弹出菜单
  544. /******************************/
  545. function _CPopup_Show(szType)
  546. {
  547. var oRenderer,szCacheKey="PopupRenderer."+szType
  548. if(!isIE4)
  549. { g_state.SaveSelection()}
  550. if(idPopup.document._type==szType)
  551.   _CPopup_Hide()
  552. }
  553. else
  554. {
  555. document.all.idPopup.style.zIndex=-1
  556. oRenderer=g_state.aCache[szCacheKey]
  557. if((!oRenderer)||("Search"==szType)||("Image"==szType)||("Link"==szType))
  558. {
  559. g_state.aCache[szCacheKey]=oRenderer=new _CPopupRenderer(szType)
  560. }
  561. document.all.idPopup.style.visibility=""
  562. document.all.idPopup.style.pixelHeight=document.all.idPopup.style.pixelWidth=idPopup.document.all.puRegion.style.pixelHeight=idPopup.document.all.puRegion.style.pixelWidth=50
  563. idPopup.document._type=szType
  564. idPopup.document._renderer=oRenderer
  565. idPopup.document.all.caption.innerText=oRenderer.GetCaption()
  566. idPopup.document.all.content.innerHTML=oRenderer.GetHTML()
  567. idPopup.document.onkeydown=new Function("this._renderer.OnKeyDown()")
  568. idPopup.document.onmouseover=new Function("this._renderer.OnMouseOver()")
  569. idPopup.document.onclick=new Function("this._renderer.OnClick()")
  570. oRenderer.ResetContext(idPopup.document)
  571. setTimeout("_CPopupRenderer_Display('"+szType+"')",100)
  572. }
  573. }
  574. /*******************************/
  575.  //方法: _CPopupRenderer_Display
  576.  //编辑器功能子菜单显示
  577. /******************************/
  578. function _CPopupRenderer_Display(szType){
  579. var oRenderer,szCacheKey="PopupRenderer."+szType
  580. oRenderer=g_state.aCache[szCacheKey]
  581. if(oRenderer.autoSize){
  582. idPopup.document.all.puRegion.style.pixelHeight=document.all.idPopup.style.pixelHeight=idPopup.document.all.puRegion.offsetHeight
  583. idPopup.document.all.puRegion.style.pixelWidth=document.all.idPopup.style.pixelWidth=idPopup.document.all.puRegion.offsetWidth+50
  584. document.all.idPopup.style.pixelLeft=(document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth)/ 2
  585. }
  586. else{
  587. idPopup.document.all.puRegion.style.pixelHeight=document.all.idPopup.style.pixelHeight=document.body.clientHeight - idToolbar.offsetHeight- document.all.idMode.offsetHeight-20
  588. idPopup.document.all.puRegion.style.pixelWidth=document.all.idPopup.style.pixelWidth=document.body.clientWidth - 50
  589. document.all.idPopup.style.pixelLeft=25
  590. }
  591. document.all.idPopup.style.zIndex=2
  592. idPopup.focus()
  593. if (szType=="Search") idPopup.document.all.txtSearch.focus()
  594. }
  595. /*******************************/
  596.  //方法: _CPopupRenderer
  597.  //对象,控制功能弹出菜单
  598. /******************************/
  599. function _CPopupRenderer(szType)
  600. {
  601. this.szType=szType
  602. this.elCurrent=this.oDocument=null
  603. this.ResetContext=_CPopupRenderer_ResetContext
  604. this.GetCaption=_CPopupRenderer_GetCaption
  605. this.GetHTML=_CPopupRenderer_GetHTML
  606. this.autoSize=true
  607. this.OnMouseOver=new Function()
  608. this.OnKeyDown=_CListPopupRenderer_GenericOnKeyDown
  609. switch(szType)
  610. {
  611. case "formatblock":
  612. case "font":
  613. case "fontsize":
  614. this.OnMouseOver= _CListPopupRenderer_OnMouseOver
  615. this.OnKeyDown=_CListPopupRenderer_OnKeyDown
  616. case "ForeColor":
  617. this.OnClick=_CListPopupRenderer_OnClick
  618. this.Highlight=_CListPopupRenderer_Highlight
  619. this.Select=_CListPopupRenderer_Select
  620. break
  621. default:
  622. this.OnClick=new Function()
  623. break
  624. }
  625. switch(szType)
  626. {
  627. case "formatblock":
  628. this.szCaption="选择当前字体格式"
  629. this.PrepareHTML=_CFormatBlockPopupRenderer_PrepareHTML
  630. this.szHTML=this.PrepareHTML()
  631. break
  632. case "font":
  633. this.szCaption="选择当前字体"
  634. this.PrepareHTML=_CFontFacesPopupRenderer_PrepareHTML
  635. this.szHTML=this.PrepareHTML()
  636. break
  637. case "fontsize":
  638. this.szCaption="选择当前字体尺寸"
  639. this.PrepareHTML = _CFontSizesPopupRenderer_PrepareHTML2 //_CFontSizesPopupRenderer_PrepareHTML
  640. this.szHTML=this.PrepareHTML()
  641. break
  642. case "Link":
  643. this.szCaption="创建、修改链接"
  644. this.PrepareHTML=_CLinkPopupRenderer_PrepareHTML
  645. this.szHTML=this.PrepareHTML()
  646. break
  647. case "Image":
  648. this.szCaption="创建、修改图片"
  649. this.PrepareHTML=_CImagePopupRenderer_PrepareHTML
  650. this.szHTML=this.PrepareHTML()
  651. break
  652. case "Table":
  653. this.szCaption="创建、修改表格"
  654. this.PrepareHTML=_CTablePopupRenderer_PrepareHTML
  655. this.szHTML=this.PrepareHTML()
  656. break
  657. case "ForeColor":
  658. this.szCaption="选择当前字体颜色"
  659. this.szHTML="<DIV ID=ColorPopup ALIGN=CENTER>"+_CUtil_BuildColorTable("")+"</DIV>"
  660. break
  661. case "Search":
  662. this.szCaption="查找"
  663. this.PrepareHTML=_CSearchPopupRenderer_PrepareHTML
  664. this.szHTML=this.PrepareHTML()
  665. break
  666. default:
  667. this.szCaption=""
  668. break
  669. }
  670. }
  671. function _CPopupRenderer_ResetContext(oDoc)
  672. {
  673. this.oDocument=oDoc
  674. this.elCurrent=null
  675. if(this.szType=="Table"){
  676. var oSel=idEditbox.document.selection.createRange()
  677. var oBlock=(oSel.parentElement!=null?_CUtil_GetElement(oSel.parentElement(),"TABLE"):_CUtil_GetElement(oSel.item(0),"TABLE"))
  678. if(oBlock!=null){
  679. oDoc.all.tabEdit.className=""
  680. oDoc.all.tabEditBodytxtPadding.value=oBlock.cellPadding
  681. oDoc.all.tabEditBodytxtSpacing.value=oBlock.cellSpacing
  682. oDoc.all.tabEditBodytxtBorder.value=oBlock.border
  683. oDoc.all.tabEditBodytxtBorderColor.value=oBlock.borderColor
  684. oDoc.all.tabEditBodytxtBackgroundImage.value=oBlock.background
  685. oDoc.all.tabEditBodytxtBackgroundColor.value=oBlock.bgColor
  686. }
  687. oDoc.elCurrent=oBlock
  688. }
  689. }
  690. function _CPopupRenderer_GetCaption()
  691. {
  692. return this.szCaption
  693. }
  694. function _CPopupRenderer_GetHTML()
  695. {
  696. return this.szHTML
  697. }
  698. function _CFontSizesPopupRenderer_PrepareHTML()
  699. {
  700. var sz="<TABLE ALIGN=center ID=idList CELLSPACING=0 CELLPADDING=0>"
  701. for(var i=1;i <= 7;i++)
  702. {
  703. sz+="<TR><TD NOWRAP _item="+i+" ALIGN=center STYLE="margin:0pt;padding:0pt"><FONT SIZE="+i+">" +"脉搏集团("+i+")</FONT></TD></TR>"
  704. }
  705. sz+="</TABLE>"
  706. return sz
  707. }
  708. function _CFontSizesPopupRenderer_PrepareHTML2()
  709. {
  710. var sz="<TABLE ALIGN=center  CELLSPACING=0 CELLPADDING=0  style='font-size:14.9px'>"
  711. sz += "<TR>"
  712. sz += "<TD><br><NOBR>"
  713. sz += "<INPUT id='radDefault' type='radio' value='0' name='FontGroup'> 默认字体: "
  714. sz += "<SELECT id='selDefault' style='WIDTH: 64px' name='selDefault'>"
  715. sz += "<OPTION selected value='1'>1号</OPTION>"
  716. sz += "<OPTION value='2'>2号</OPTION>"
  717. sz += "<OPTION value='3'>3号</OPTION>"
  718. sz += "<OPTION value='4'>4号</OPTION>"
  719. sz += "<OPTION value='5'>5号</OPTION>"
  720. sz += "<OPTION value='6'>6号</OPTION>"
  721. sz += "<OPTION value='7'>7号</OPTION>"
  722. sz += "</SELECT></NOBR><br>&nbsp;<font color='#191970'>(应用于当前选中文字)</font>"
  723. sz += "</TD>"
  724. sz += "</TR>"
  725. sz += "<TR>"
  726. sz += "<TD><BR><nobr>"
  727. sz += "<INPUT id='radCustom' type='radio' CHECKED value='1' name='FontGroup'> 自定义:  "
  728. sz += "大小 <INPUT id='txtSize' style='WIDTH: 50px; HEIGHT: 22px' type='text' size='1' value='14.9' maxlength='4' name='txtSize'>"
  729. sz += " 单位 <SELECT id='selCustom' name='selCustom'>"
  730. sz += "<OPTION  value='pt'>磅</OPTION>"
  731. sz += "<OPTION  selected value='px'>像素</OPTION>"
  732. sz += "<OPTION value='%'>百分比</OPTION>"
  733. sz += "</SELECT></nobr><br>&nbsp;<font color='#191970'>(应用于包含当前选中文字的整个段落)</font>"
  734. sz += "</TD>"
  735. //sz += "</TR><TR><TD><br>行间距:  <input id='txtLineHeight' style='width:40px',type='text' maxlength='4' name='txtLineHeight' value=''>"
  736. sz += "</TR><TR><TD><br>&nbsp;&nbsp;行距: "
  737. sz += "<SELECT id='selLH' name='selLH' style='width:70px'>"
  738. sz += "<OPTION selected value=''>--默认--</OPTION>"
  739. sz += "<OPTION  value='50%'>0.5倍行距</OPTION>"
  740. sz += "<OPTION  value='100%'>单倍行距</OPTION>"
  741. sz += "<OPTION  value='150%'>1.5倍行距</OPTION>"
  742. sz += "<OPTION  value='200%'>2倍行距</OPTION>"
  743. sz += "<OPTION  value='300%'>3倍行距</OPTION>"
  744. sz += "</SELECT></TD></TR>"
  745. /*sz += "<SELECT id='selLine' name='selLine'>"
  746. sz += "<OPTION  value='pt'>磅</OPTION>"
  747. sz += "<OPTION  selected value='px'>像素</OPTION>"
  748. sz += "<OPTION value='%'>百分比</OPTION>"
  749. sz += "</SELECT></TD></TR>"*/
  750. sz += "<TR>"
  751. sz += "<TD ALIGN=center><br><INPUT TYPE=submit ONCLICK="parent._CTablePopupRenderer_FontSizeHandler(this.document)" VALUE=" 确 定 "> <INPUT TYPE=reset VALUE=" 取 消 " ONCLICK="parent._CPopup_Hide()"</TD>"
  752. sz += "</TR>"
  753. sz += "</TABLE>"
  754. return sz
  755. }
  756. function _CTablePopupRenderer_FontSizeHandler(doc)
  757. {
  758.    var SizeUnit = null;
  759.    var HeightUnit = null;
  760.    var intLH = 0;
  761.    if (!g_state.hasFocus) return;
  762.    
  763. var oSel=g_state.GetSelection();
  764. var sType=oSel.type;
  765. var oTarget=(sType=="None"?idEditbox.document:oSel);
  766. //alert(oSel.parentElement().tagName);
  767.     var oBlock=(oSel.parentElement!=null?_CUtil_GetBlock(oSel.parentElement()):oSel.item(0));
  768. //alert(oBlock.innerHTML);
  769.    /*
  770.      第一次设置的行距处理,现在因为太专业而被废除
  771.    if (doc.all.txtLineHeight.value!="")
  772.    {
  773.      intLH = parseInt(doc.all.txtLineHeight.value,10);
  774.  if (isNaN(intLH)) {alert("行间距只能输入有效数字!");return false;}
  775.  HeightUnit =  "%";//doc.all.selLine.value;
  776.  if (intLH!=0 && oBlock!=null)
  777.  {
  778.    oBlock.style.lineHeight =   intLH+HeightUnit;
  779.  }
  780.  
  781.    }*/
  782.    if (doc.all.selLH.value!='' && oBlock!=null)
  783.    {
  784.        oBlock.style.lineHeight = doc.all.selLH.value;
  785.    }
  786.    if (doc.all.radDefault.checked) //默认字体
  787.    {
  788.       _Format("FontSize",doc.all.selDefault.value);
  789.    }
  790.    else
  791.    {
  792.        var intSize = 0;
  793.    try
  794.    { 
  795.       intSize = parseInt(doc.all.txtSize.value,10);
  796.   if ((isNaN(intSize)||intSize==0))
  797.   {
  798.      alert("字体大小只能输入有效数字!");return false;
  799.   }
  800.   SizeUnit = doc.all.selCustom.value;
  801.   
  802.    }
  803.    catch(x)
  804.    {
  805.       alert("字体大小只能输入有效数字!");
  806.   return false;
  807.    }
  808.    if (oBlock != null)
  809.    {
  810.      
  811.           oBlock.style.fontSize = intSize+SizeUnit;
  812.    }
  813.    }
  814.    g_state.RestoreSelection();
  815. }
  816. function _CFontFacesPopupRenderer_PrepareHTML()
  817. {
  818. var sz="<TABLE ALIGN=center ID=idList CELLSPACING=0 CELLPADDING=0>"
  819. for(var i=0;i<defaultFonts.length;i++)
  820. {
  821. if(i%2==0)sz+="<TR>"
  822. sz+="<TD NOWRAP _item="+i+" ALIGN=center STYLE="margin:0pt;padding:0pt"><FONT FACE=""+defaultFonts[i][0]+"">" +defaultFonts[i][1] +"</FONT>"+(defaultFonts[i][2]?("("+defaultFonts[i][1]+")"):"")+"</TD>"
  823. if(i%2)sz+="</TR>"
  824. }
  825. if(i%2)sz+="</TR>"
  826. sz+="<TR><TD ROWSPAN=2 ONCLICK="parent._CFontFacesPopupRenderer_InsertOther(this)" ALIGN=center _item="custom" STYLE="margin:0pt;padding:0pt" NOWRAP ID=customFont>其他字体...</TD></TR>"
  827. sz+="</TABLE>"
  828. return sz
  829. }
  830. /*******************************/
  831.  //方法: _CFontFacesPopupRenderer_InsertOther()
  832.  //选择其它字体
  833. /******************************/
  834. function _CFontFacesPopupRenderer_InsertOther(){
  835. var szFont=prompt("请输入您指定的字体名称: ","宋体")
  836. if((szFont!=null)&&(szFont!=""))
  837. _Format("FontName",szFont)
  838. _CPopup_Hide()
  839. }
  840. /*******************************/
  841.  //方法: _CFormatBlockPopupRenderer_PrepareHTML()
  842.  //格式文本准备
  843. /******************************/
  844. function _CFormatBlockPopupRenderer_PrepareHTML()
  845. {
  846. var sz,defaultParagraphs=new Array()
  847. defaultParagraphs[0]=new Array("<P>","普通")
  848. for(var i=1;i <= 6;i++)
  849. defaultParagraphs[i]=new Array("<H"+i+">","标题"+i+"(H"+i+")")
  850. defaultParagraphs[7]=new Array("<PRE>","格式化文本(PRE)")
  851. sz="<TABLE CLASS=block ALIGN=center ID=idList CELLSPACING=0 CELLPADDING=0>"
  852. for(var i=0;i<defaultParagraphs.length;i++)
  853. {
  854. sz+="<TR><TD NOWRAP _item="+i+" ALIGN=center STYLE="margin:0pt;padding:0pt">"+defaultParagraphs[i][0] +defaultParagraphs[i][1] +"</"+defaultParagraphs[i][0].substring(1)+"</TD></TR>"
  855. }
  856. sz+="</TABLE>"
  857. return sz
  858. }
  859. /*******************************/
  860.  //方法: _CTablePopupRenderer_PrepareHTMLPage
  861.  //表格选择框内容准备
  862. /******************************/
  863. function _CTablePopupRenderer_PrepareHTMLPage(szID,bDisplay){
  864. var sz="<TABLE height=100% "+((!bDisplay)?" style="display:none"":"")+" width=100% CELLSPACING=0 CELLPADDING=0 ID="+szID+"><TR ID=tableContents><TD ID=tableOptions VALIGN=TOP NOWRAP WIDTH=150 ROWSPAN=2><A HREF="javascript:parent._CTablePopupRenderer_Select(this,'"+szID+"','prop1')">设定行列</A><BR><A HREF="javascript:parent._CTablePopupRenderer_Select(this,'"+szID+"','prop2')">设定边框与间隔</A><BR><A HREF="javascript:parent._CTablePopupRenderer_Select(this,'"+szID+"','prop3')">设定边框</A><BR><A HREF="javascript:parent._CTablePopupRenderer_Select(this,'"+szID+"','prop4')">设定背景</A><BR></TD><TD BGCOLOR=black ID=puDivider ROWSPAN=2></TD><TD ID=tableProps VALIGN=TOP>"
  865. if(szID=="tabNewBody"){
  866. sz+= "<DIV ID='"+szID+"prop1'><P CLASS=tablePropsTitle>设定行列</P><TABLE><TR><TD>行: </TD><TD><INPUT SIZE=2 MAXLENGTH=2 TYPE=text ID="+szID+"txtRows VALUE=2 ></TD></TR><TR><TD>列: </TD><TD><INPUT SIZE=2 MAXLENGTH=2 TYPE=text ID="+szID+"txtColumns VALUE=2 ></TD></TR></TABLE></DIV>"
  867. }
  868. else{
  869. sz+= "<DIV ID='"+szID+"prop1'><P CLASS=tablePropsTitle>设定行列</P>" +"<INPUT type=button ID="+szID+"txtRows VALUE="插入行" ONCLICK="parent._CTablePopupRenderer_AddRow(this)"><P><INPUT type=button ID="+szID+"txtCells VALUE="插入列" ONCLICK="parent._CTablePopupRenderer_AddCell(this)"><BR></DIV>"
  870. }
  871. sz+="<DIV ID='"+szID+"prop2' STYLE="display:none"><P CLASS=tablePropsTitle>设定边框与间隔</P>单元格边框: <INPUT SIZE=2 TYPE=text ID="+szID+"txtPadding VALUE=1><BR>单元格间隔: <INPUT SIZE=2 TYPE=text ID="+szID+"txtSpacing VALUE=1></DIV><DIV ID="+szID+"prop3 STYLE="display:none"><P CLASS=tablePropsTitle>设定边框</P>边框宽度: <INPUT SIZE=2 TYPE=text ID="+szID+"txtBorder VALUE=1><BR>边框颜色: <INPUT SIZE=4 TYPE=text ID="+szID+"txtBorderColor value=#000000><BR>" +_CUtil_BuildColorTable("idBorder"+szID,"","parent._CTablePopupRenderer_ColorSelect(this,'"+szID+"txtBorderColor')")+"</DIV><DIV ID="+szID+"prop4 SIZE=12 STYLE="display:none"><P CLASS=tablePropsTitle>设定背景</P>背景图片: <INPUT TYPE=text ID="+szID+"txtBackgroundImage SIZE=15><BR>背景颜色: <INPUT TYPE=text SIZE=4 ID="+szID+"txtBackgroundColor><BR>" +_CUtil_BuildColorTable("idBackground"+szID,"","parent._CTablePopupRenderer_ColorSelect(this,'"+szID+"txtBackgroundColor')")+"</DIV></TD></TR><TR><TD align=center ID=tableButtons valign=bottom>"
  872. if(szID=="tabNewBody"){
  873. sz+="<INPUT TYPE=submit ONCLICK="parent._CTablePopupRenderer_BuildTable('"+szID+"',this.document)" VALUE="创建表格"> <INPUT TYPE=reset VALUE=" 取 消 " ONCLICK="parent._CPopup_Hide()">"
  874. }else{
  875. sz+="<INPUT TYPE=submit ONCLICK="parent._CTablePopupRenderer_BuildTable('"+szID+"',this.document)" VALUE="修改表格"> <INPUT TYPE=reset VALUE=" 取 消 " ONCLICK="parent._CPopup_Hide()">"
  876. }
  877. sz+= "</TD></TR></TABLE>"
  878. return sz
  879. }
  880. function _CTablePopupRenderer_PrepareHTML()
  881. {
  882. var sz="<TABLE CLASS=tabBox ID="tabSelect" CELLSPACING=0 CELLPADDING=0 WIDTH=95%><TR HEIGHT=15><TD CLASS=tabItem STYLE="border-bottom:none" NOWRAP><DIV ONCLICK="if(tabEdit.className!='disabled'){this.className='selected';this.parentElement.style.borderBottom=tabEdit.className=tabNewBody.style.display='';tabEditBody.style.display='none';tabEdit.parentElement.style.borderBottom='1px black solid'}" CLASS=selected ID=tabNew>创建表格</DIV></TD><TD CLASS=tabItem NOWRAP><DIV ONCLICK="if(this.className!='disabled'){this.className='selected';this.parentElement.style.borderBottom=tabNew.className=tabEditBody.style.display='';tabNew.parentElement.style.borderBottom='1px black solid';tabNewBody.style.display='none'}" CLASS=disabled ID=tabEdit>修改表格</DIV></TD><TD CLASS=tabSpace WIDTH=100%>&nbsp;</TD></TR><TR><TD VALIGN=TOP CLASS=tabBody COLSPAN=3>"+_CTablePopupRenderer_PrepareHTMLPage("tabNewBody",true)+_CTablePopupRenderer_PrepareHTMLPage("tabEditBody",false)+"</TD></TR></TABLE>"
  883. return sz
  884. }
  885. function _CTablePopupRenderer_Select(el,szID,id)
  886. {
  887. var d=el.document
  888. for(var i=1;i<5;i++)
  889. d.all[szID+"prop"+i].style.display="none"
  890. d.all[szID+id].style.display=""
  891. }
  892. function _CTablePopupRenderer_ColorSelect(el,id)
  893. {
  894. el.document.all[id].value=el.bgColor
  895. }
  896. /*******************************/
  897.  //方法: _CTablePopupRenderer_AddCell
  898.  //画表格列
  899. /******************************/
  900. function _CTablePopupRenderer_AddRow(el){
  901. var elRow=el.document.elCurrent.insertRow()
  902. for(var i=0;i<el.document.elCurrent.rows[0].cells.length;i++){
  903. var elCell=elRow.insertCell()
  904. elCell.innerHTML="&nbsp;"
  905. }
  906. }
  907. /*******************************/
  908.  //方法: _CTablePopupRenderer_AddCell
  909.  //画表格单元格
  910. /******************************/
  911. function _CTablePopupRenderer_AddCell(el){
  912. for(var i=0;i<el.document.elCurrent.rows.length;i++){
  913. var elCell=el.document.elCurrent.rows[i].insertCell()
  914. elCell.innerHTML="&nbsp;"
  915. }
  916. }
  917. /*******************************/
  918.  //方法: _CTablePopupRenderer_BuildTable
  919.  //画表格
  920. /******************************/
  921. function _CTablePopupRenderer_BuildTable(szID,d)
  922. {
  923. if(szID=="tabNewBody"){
  924. var sz="<TABLE "+(((d.all[szID+"txtBorder"].value=="")||(d.all[szID+"txtBorder"].value=="0"))?"class="NOBORDER"":"")+(d.all[szID+"txtPadding"].value!=""?"cellPadding=""+d.all[szID+"txtPadding"].value+"" ":"")+(d.all[szID+"txtSpacing"].value!=""?"cellSpacing=""+d.all[szID+"txtSpacing"].value+"" ":"")+(d.all[szID+"txtBorder"].value!=""?"border=""+d.all[szID+"txtBorder"].value+"" ":"")+(d.all[szID+"txtBorderColor"].value!=""?"bordercolor=""+d.all[szID+"txtBorderColor"].value+"" ":"")+(d.all[szID+"txtBackgroundImage"].value!=""?"background=""+d.all[szID+"txtBackgroundImage"].value+"" ":"")+(d.all[szID+"txtBackgroundColor"].value!=""?"bgColor=""+d.all[szID+"txtBackgroundColor"].value+"" ":"")+">"
  925. if(d.all[szID+"txtRows"].value>99)d.all[szID+"txtRows"].value=99
  926. if(d.all[szID+"txtColumns"].value>99)d.all[szID+"txtColumns"].value=50
  927. for(var r=0;r<parseInt(d.all[szID+"txtRows"].value);r++)
  928. {
  929. sz+="<TR>"
  930. for(var c=0;c<parseInt(d.all[szID+"txtColumns"].value);c++)
  931. sz+="<TD>&nbsp;</TD>"
  932. sz+="</TR>"
  933. }
  934. sz+="</TABLE>"
  935. insertHTML(sz)
  936. }else
  937. if(d.elCurrent){
  938. d.elCurrent.cellPadding=d.all.tabEditBodytxtPadding.value
  939. d.elCurrent.cellSpacing=d.all.tabEditBodytxtSpacing.value
  940. d.elCurrent.border=d.all.tabEditBodytxtBorder.value
  941. d.elCurrent.className=(d.elCurrent.border==""||d.elCurrent.border==0)?"NOBORDER":""
  942. d.elCurrent.borderColor=d.all.tabEditBodytxtBorderColor.value
  943. d.elCurrent.bgColor=d.all.tabEditBodytxtBackgroundColor.value
  944. d.elCurrent.background=d.all.tabEditBodytxtBackgroundImage.value
  945. }
  946. g_state.RestoreSelection()
  947. _CPopup_Hide()
  948. }
  949. function _CListPopupRenderer_OnClick()
  950. {
  951. var elTD=_CUtil_GetElement(this.oDocument.parentWindow.event.srcElement,"TD")
  952. if(elTD &&elTD._item)this.Select(elTD)
  953. }
  954. function _CListPopupRenderer_GenericOnKeyDown(){
  955. var ev=this.oDocument.parentWindow.event
  956. if(ev.keyCode==27)_CPopup_Hide()
  957. }
  958. function _CListPopupRenderer_OnKeyDown()
  959. {
  960. var el
  961. var iRow=iCell=0
  962. var ev=this.oDocument.parentWindow.event
  963. var idList=this.oDocument.all.idList
  964. var elTR=_CUtil_GetElement(this.elCurrent,"TR")
  965. var elTD=_CUtil_GetElement(this.elCurrent,"TD")
  966. if(elTR!=null)
  967. {
  968. iRow=elTR.rowIndex
  969. iCell=elTD.cellIndex
  970. }
  971. switch(ev.keyCode)
  972. {
  973. case 37:
  974. iCell--
  975. if(iCell<0)
  976. iCell=idList.rows[iRow].cells.length-1
  977. break
  978. case 38:
  979. iRow--
  980. if(iRow<0)
  981. iRow=idList.rows.length-1
  982. break
  983. case 39:
  984. iCell++
  985. if(iCell>idList.rows[iRow].cells.length-1)
  986. iCell=0
  987. break
  988. case 40:
  989. iRow++
  990. if(iRow>idList.rows.length-1)
  991. iRow=0
  992. break
  993. case 13:
  994. break;
  995. case 27:
  996. _CPopup_Hide()
  997. break;
  998. default:
  999. return;
  1000. }
  1001. el=idList.rows[iRow].cells[iCell]
  1002. if(el &&el._item)
  1003. if(13==ev.keyCode){
  1004. ev.keyCode=0
  1005. this.Select(el)
  1006. }
  1007. else
  1008. this.Highlight(el)
  1009. }
  1010. function _CListPopupRenderer_OnMouseOver()
  1011. {
  1012. var el=_CUtil_GetElement(this.oDocument.parentWindow.event.srcElement,"TD")
  1013. if(el &&el._item &&el!=this.elCurrent)
  1014. this.Highlight(el)
  1015. }
  1016. function _CListPopupRenderer_Highlight(el)
  1017. {
  1018. var elC=this.elCurrent
  1019. if(elC)elC.style.borderWidth=elC.style.borderColor=elC.style.borderStyle=""
  1020. el.style.borderWidth="1px"
  1021. el.style.borderColor="green"
  1022. el.style.borderStyle="solid"
  1023. this.elCurrent=el
  1024. }
  1025. /*******************************/
  1026.  //方法: _CListPopupRenderer_Select
  1027.  //功能选择
  1028. /******************************/
  1029. function _CListPopupRenderer_Select(elTD)
  1030. {
  1031. g_state.RestoreSelection()
  1032. var el=elTD.children[0]
  1033. switch(this.szType)
  1034. {
  1035. case "font":
  1036. if(!el)
  1037. parent._CFontFacesPopupRenderer_InsertOther(this)
  1038. else
  1039. _Format("FontName",el.face)
  1040. break
  1041. case "fontsize":
  1042. _Format("FontSize",el.size)
  1043. break
  1044. case "formatblock":
  1045. _Format("FormatBlock","<"+el.tagName+">")
  1046. break
  1047. case "ForeColor":
  1048. _Format("ForeColor",elTD.bgColor)
  1049. break
  1050. }
  1051. _CPopup_Hide()
  1052. }
  1053. /*******************************/
  1054.  //方法: _CLinkPopupRenderer_AddLink(d)
  1055.  //添加链接
  1056. /******************************/
  1057. function _CLinkPopupRenderer_AddLink(d)
  1058. {
  1059. var szURL=d.all.urlValue.value
  1060. var szType=d.all.urlType[d.all.urlType.selectedIndex].text
  1061. var oSel=g_state.GetSelection()
  1062. szURL=((0==szURL.indexOf("mailto:")||0==szURL.indexOf("http://")||0==szURL.indexOf("ftp://"))?"":szType)+szURL
  1063. if(szURL!="")
  1064. {
  1065. if((oSel.parentElement)&&(oSel.text==""))
  1066. {
  1067. oSel.expand("word")
  1068. if(oSel.text=="")
  1069. {
  1070. var sText=""
  1071. var oStore=oSel.duplicate()
  1072. if(d.all.pageList){
  1073. var idx=d.all.pageList.selectedIndex
  1074. if(d.all.pageList[idx].value==szURL)
  1075. sText=d.all.pageList[idx].text
  1076. else
  1077. sText=szURL
  1078. }
  1079. else
  1080. sText=szURL
  1081. oSel.pasteHTML('<A HREF="'+szURL+'">'+sText+'</A>')
  1082. oSel.setEndPoint("StartToStart",oStore)
  1083. oSel.select()
  1084. _CPopup_Hide()
  1085. return
  1086. }
  1087. }
  1088. else
  1089. if((oSel.item)&&(oSel.item(0).tagName=="IMG"))
  1090. {
  1091. oSel.item(0).width=oSel.item(0).offsetWidth
  1092. oSel.item(0).height=oSel.item(0).offsetHeight
  1093. oSel.item(0).border=(d.all.displayBorder.checked)?1:""
  1094. }
  1095. if(d.all.urlValue.value!="")
  1096. oSel.execCommand("CreateLink",false,szURL)
  1097. else
  1098. oSel.execCommand("UnLink",false,szURL)
  1099. }
  1100. oSel.select()
  1101. _CPopup_Hide()
  1102. }
  1103. /*******************************/
  1104.  //方法: _CLinkPopupRenderer_PrepareHTML
  1105.  //添加链接文本准备
  1106. /******************************/
  1107. function _CLinkPopupRenderer_PrepareHTML()
  1108. {
  1109. var oSel=g_state.GetSelection()
  1110. var oEl,bImg=false,szURL=sz=""
  1111. if(oSel.parentElement)
  1112. {
  1113. oEl=_CUtil_GetElement(oSel.parentElement(),"A")
  1114. }
  1115. else
  1116. {
  1117. oEl=_CUtil_GetElement(oSel.item(0),"A")
  1118. bImg=oSel.item(0).tagName=="IMG"
  1119. }
  1120. if(oEl)szURL=oEl.href
  1121. sz ="<TABLE ALIGN=center>"
  1122. var arTypes=new Array("http","ftp","mailto")
  1123. var arText=new Array("http://","ftp://","mailto:")
  1124. var szType=szURL.substring(0,szURL.indexOf(":"))
  1125. if(("http"==szType)||("ftp"==szType))
  1126. szURL=szURL.substring(szURL.indexOf("//")+2)
  1127. else
  1128. szURL=szURL.substring(szURL.indexOf(":")+1)
  1129. sz+="<BR>输入或修改一个链接地址: <NOBR><SELECT ID=urlType>"
  1130. for(var i=0;i<arTypes.length;i++){
  1131. sz+= "<OPTION VALUE='"+arTypes[i]+"' "+(arTypes[i]==szType?" SELECTED ":"")+">"+arText[i]
  1132. }
  1133. sz+="</SELECT><INPUT ID=urlValue SIZE=45 VALUE=""+szURL+"" TYPE=text></NOBR>"
  1134. if(bImg)
  1135. {
  1136. sz+="<BR><INPUT TYPE=checkbox ID=displayBorder "+((oSel.item(0).border!=0)?" checked ":"")+">是否显示图片链接边框?"
  1137. }
  1138. sz+="</TD></TR><TR><TD ALIGN=center><INPUT ONCLICK="parent._CLinkPopupRenderer_AddLink(this.document)" TYPE=submit ID=idSave VALUE=" "+(szURL==""?"插 入":"修 改")+" "> <INPUT ONCLICK="parent._CPopup_Hide()" TYPE=reset ID=idCancel VALUE=" 取 消 "></TD></TR></TABLE>"
  1139. return sz
  1140. }
  1141. /*******************************/
  1142.  //方法: _CSearchPopupRenderer_PrepareHTML
  1143.  //查找文本准备
  1144. /******************************/
  1145. function _CSearchPopupRenderer_PrepareHTML()
  1146. {
  1147. sz ="<TABLE ALIGN=center>"
  1148. sz+="<TABLE style='WIDTH: 400px; HEIGHT: 90px' cellSpacing=1 cellPadding=1 border=0>"
  1149. sz+="<TR>"
  1150. sz+="    <TD width='75%'>查找内容:"
  1151. sz+="      <input width='50px' id='txtSearch' maxlength='50' style='WIDTH: 219px; HEIGHT: 22px'  size=26>"
  1152. sz+="    </TD>"
  1153. sz+="    <TD>"
  1154. sz+="    <input type='button' value='查找下一个'  onclick='parent._CSearchPopupRenderer_Search(this.document)' style='WIDTH: 99px; HEIGHT: 24px' size=49>"
  1155. sz+="    </TD>"
  1156. sz+="    </TR>"
  1157. sz+="  <TR>"
  1158. sz+="    <TD>"
  1159. sz+="      <TABLE style='WIDTH: 100%; HEIGHT: 100%' cellSpacing=1 cellPadding=1 border=0>"
  1160. sz+="      <TR>"
  1161. sz+="          <TD width='50%'>"
  1162. sz+="          <input type='checkbox' id='_Swhole' name='_Swhole'>全字匹配"
  1163. sz+="          </TD>"
  1164. sz+="          <TD rowspan='2' valign='top'>"
  1165. sz+="          <fieldset style='WIDTH: 98%; HEIGHT: 90%'><legend>方向</legend>"
  1166. sz+="          &nbsp;<input type='radio' name='direction' value='-1'>向上"
  1167. sz+="          <input type='radio' name='direction' checked value='1'>向下"
  1168. sz+="          </fieldset>         "
  1169. sz+="          </TD></TR>"
  1170. sz+="        <TR>"
  1171. sz+="          <TD valign='top'> <input type='checkbox' id='_Scapital' name='_Scapital'>区分大小写</TD>"
  1172. sz+="          </TR></TABLE>"
  1173. sz+="     </TD>"
  1174. sz+="    <TD valign='top'>"
  1175. sz+="    <INPUT ONCLICK="parent._CancelSearch()" TYPE=reset ID=idCancel VALUE=" 取 消 " style='WIDTH: 99px; HEIGHT: 24px' size=49>"
  1176. sz+="    </TD></TR>"
  1177. sz+="</TABLE>"
  1178. return sz
  1179. }
  1180. function _CancelSearch()
  1181. {
  1182.     strSearch='';
  1183.     _CPopup_Hide();
  1184. }
  1185. /*******************************/
  1186.  //方法: _CSearchPopupRenderer_Search
  1187.  //查找
  1188. /******************************/
  1189. function _CSearchPopupRenderer_Search(d)
  1190. {
  1191.    var iScope=1;
  1192.    var iFlag=0;
  1193.    if (d.all.txtSearch.value!='')
  1194.    {
  1195. var ditem=null;
  1196. for(var i=0;i< d.all.direction.length;i++)
  1197. {
  1198.   ditem = d.all.direction.item(i);
  1199.   if (ditem.checked)
  1200.   {
  1201. iScope = ditem.value;
  1202.   }
  1203. }
  1204. if(iScope>=0)
  1205. {
  1206.    iScope=parseInt(idEditbox.document.body.innerText.length,10);
  1207. }
  1208. else
  1209.    iScope=-parseInt(idEditbox.document.body.innerText.length,10);
  1210.        if (d.all._Swhole.checked==true)
  1211.    {
  1212.       iFlag+=2;
  1213.    }
  1214.    if (d.all._Scapital.checked==true)
  1215.    {
  1216.       iFlag+=4;
  1217.    }
  1218.    _Search(d.all.txtSearch.value,iScope,iFlag);
  1219.    }
  1220.    
  1221. }
  1222. /*******************************/
  1223.  //方法: _CImagePopupRenderer_AddImage
  1224.  //添加图片
  1225. /******************************/
  1226. function _CImagePopupRenderer_AddImage(d)
  1227. {
  1228. var szURL=d.all.urlValue.value
  1229. var szType=d.all.urlType[d.all.urlType.selectedIndex].text
  1230. var oSel=g_state.GetSelection()
  1231. var szALT=d.all.imgAlt.value
  1232. var szALIGN=d.all.imgAlign[d.all.imgAlign.selectedIndex].value
  1233. var szBORDER=d.all.imgBorder.value
  1234. var SelImg
  1235. if(!oSel.parentElement)SelImg=oSel.item(0)
  1236. szURL=((0==szURL.indexOf("http://")||0==szURL.indexOf("ftp://"))?"":szType)+szURL
  1237. if(szURL!="")
  1238. {
  1239. if(SelImg)
  1240. {
  1241. if(SelImg.src!=szURL)SelImg.src=szURL
  1242. if(SelImg.alt!=szALT)SelImg.alt=szALT
  1243. if(SelImg.align.toLowerCase()!=szALIGN)_Format("Justify",szALIGN)
  1244. if(SelImg.border!=szBORDER)SelImg.border=szBORDER
  1245. }
  1246. else
  1247. insertHTML('<IMG SRC="'+szURL+'"'+(szALT==""?"":' ALT="'+szALT+'"')+(szALIGN==""?"":' ALIGN="'+szALIGN+'"')+(szBORDER==""?"":' BORDER="'+szBORDER+'"')+'>')
  1248. oSel.select()
  1249. _CPopup_Hide()
  1250. return
  1251. }
  1252. }
  1253. /*******************************/
  1254.  //方法: _CImagePopupRenderer_PrepareHTML
  1255.  //图片选择显示准备HTML文本
  1256. /******************************/
  1257. function _CImagePopupRenderer_PrepareHTML()
  1258. {
  1259. var oSel=g_state.GetSelection()
  1260. var szURL=szALT=szALIGN=szBORDER=sz=""
  1261. var SelImg
  1262. if(!oSel.parentElement)
  1263. {
  1264. SelImg=oSel.item(0)
  1265. if(SelImg.tagName=="IMG")
  1266. {
  1267. szURL=SelImg.href
  1268. szALT=SelImg.alt
  1269. szALIGN=SelImg.align.toLowerCase()
  1270. szBORDER=SelImg.border
  1271. }
  1272. }
  1273. sz ="<TABLE ALIGN=center><BR>输入或修改一个图片地址: <NOBR><SELECT ID=urlType><option value=''></option>"
  1274. var arTypes=new Array("http","ftp")
  1275. var arText=new Array("http://","ftp://")
  1276. var szType=szURL.substring(0,szURL.indexOf(":"))
  1277. if(("http"==szType)||("ftp"==szType))
  1278. szURL=szURL.substring(szURL.indexOf("//")+2)
  1279. else
  1280. szURL=szURL.substring(szURL.indexOf(":")+1)
  1281. for(var i=0;i<arTypes.length;i++){
  1282. sz+= "<OPTION VALUE='"+arTypes[i]+"' "+(arTypes[i]==szType?" SELECTED ":"")+">"+arText[i]
  1283. }
  1284. sz+="</SELECT><INPUT ID=urlValue SIZE=45 VALUE=""+szURL+"" TYPE=text></NOBR>"
  1285. sz+="<BR><NOBR>注释文本: <INPUT ID=imgAlt SIZE=44 VALUE=""+szALT+"" TYPE=text></NOBR>"
  1286. sz+="<BR><NOBR>对齐模式: <SELECT ID=imgAlign>"
  1287. var arTypes=new Array("","left","right","top","texttop","middle","absmiddle","baseline","bottom","absbottom","center")
  1288. var arText=new Array("默认","左对齐","右对齐","顶边对齐","文本上方","相对垂直居中","绝对垂直居中","基线","相对底边对齐","绝对底边对齐","水平居中")
  1289. for(var i=0;i<arTypes.length;i++){
  1290. sz+= "<OPTION VALUE='"+arTypes[i]+"' "+(arTypes[i]==szALIGN?" SELECTED ":"")+">"+arText[i]
  1291. }
  1292. sz+="</SELECT> 边框粗细: <INPUT ID=imgBorder SIZE=5 VALUE=""+szBORDER+"" TYPE=text></NOBR>"
  1293. sz+="</TD></TR><TR><TD ALIGN=center><INPUT ONCLICK="parent._CImagePopupRenderer_AddImage(this.document)" TYPE=submit ID=idSave VALUE=" "+(szURL==""?"插 入":"修 改")+" "> <INPUT ONCLICK="parent._CPopup_Hide()" TYPE=reset ID=idCancel VALUE=" 取 消 "></TD></TR></TABLE>"
  1294. return sz
  1295. }
  1296. function _CUtil_GetElement(oEl,sTag)
  1297. {
  1298. while(oEl!=null &&oEl.tagName!=sTag)
  1299. oEl=oEl.parentElement
  1300. return oEl
  1301. }
  1302. /*******************************/
  1303.  //方法: _CUtil_BuildColorTable
  1304.  //输出颜色选择表HTML文本
  1305. /******************************/
  1306. function _CUtil_BuildColorTable(sID,fmt,szClick)
  1307. {
  1308. var sz,cPick=new Array("00","33","66","99","CC","FF"),iCnt=2
  1309. var iColors=cPick.length,szColor=""
  1310. sz="<TABLE CELLSPACING=0 CELLPADDING=0><TR><TD VALIGN=middle><DIV CLASS=currentColor ID=""+sID+"Current">&nbsp;</DIV></TD><TD><TABLE ONMOUSEOUT="document.all."+sID+"Current.style.backgroundColor=''" ONMOUSEOVER="document.all."+sID+"Current.style.backgroundColor=event.srcElement.bgColor" CLASS=colorTable CELLSPACING=0 CELLPADDING=0 ID=""+sID+"">"
  1311. for(var r=0;r<iColors;r++){
  1312. sz+="<TR>"
  1313. for(var g=iColors-1;g>=0;g--)
  1314. for(var b=iColors-1;b>=0;b--){
  1315. szColor=cPick[r]+cPick[g]+cPick[b]
  1316. sz+="<TD BGCOLOR="#"+szColor+""_item=""+szColor+"" TITLE="#"+szColor+"" "+(szClick?"ONCLICK=""+szClick+"" ":"")+">&nbsp;</TD>"
  1317. }
  1318. sz+="</TR>"
  1319. }
  1320. sz+="</TABLE></TD></TR></TABLE>"
  1321. return sz
  1322. }
  1323. /*******************************/
  1324.  //方法: replace
  1325.  //字符替换
  1326. /******************************/
  1327. function replace(str,replace_what,replace_with)
  1328. {
  1329. var ndx=str.indexOf(replace_what);
  1330. var delta=replace_with.length - replace_what.length;
  1331. while(ndx >= 0)
  1332. {
  1333. str=str.substring(0,ndx)+replace_with+str.substring(ndx+replace_what.length);
  1334. ndx=str.indexOf(replace_what,ndx+delta+1);
  1335. }
  1336. return str;
  1337. }
  1338. function _CUtil_TrimCR(sValue){
  1339. return replace(sValue,"rn"," ")
  1340. }
  1341. function _CUtil_TrimDIV(sValue){
  1342. //return replace(sValue,"<BR>","")
  1343. return replace(replace(replace(sValue,"<DIV>",""),"</DIV>",""),"<BR>","")
  1344. }
  1345. /*******************************/
  1346.  //方法: _CUtil_GetBlock
  1347.  //获取编辑文本块
  1348. /******************************/
  1349. function _CUtil_GetBlock(oEl)
  1350. {
  1351. var sBlocks="|H1|H2|H3|H4|H5|H6|P|PRE|LI|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|BODY|"
  1352. while((oEl!=null)&&(sBlocks.indexOf("|"+oEl.tagName+"|")==-1))
  1353. oEl=oEl.parentElement
  1354. return oEl
  1355. }
  1356. /*
  1357. function _CUtil_DomainSuffix(szHost){
  1358. var idx=szHost.indexOf("commun")
  1359. if(idx>=0){
  1360. idx=szHost.indexOf(".",idx)
  1361. return szHost.substring(idx+1)
  1362. }else
  1363. {
  1364. idx=szHost.lastIndexOf(".",szHost.length-5)
  1365. return szHost.substring(idx+1)
  1366. }
  1367. return szHost
  1368. }*/
  1369. /*******************************/
  1370.  //方法: _CUtil_CleanHTML
  1371.  //清除编辑文本
  1372. /******************************/
  1373. function _CUtil_CleanHTML(){
  1374. var bBindings=(g_state.aBindings.length>0)
  1375. var elAll=idEditbox.document.all
  1376. var iCount=elAll.length
  1377. for(var i=iCount-1;i>=0;i--){
  1378. if(elAll[i].tagName=="IMG"){
  1379. elAll[i].width=elAll[i].offsetWidth
  1380. elAll[i].height=elAll[i].offsetHeight
  1381. }
  1382. if((elAll[i].tagName=="INPUT")&&(bBindings))
  1383. elAll[i].outerHTML='['+elAll[i].name+']';
  1384. }
  1385. return idEditbox.document.body.innerHTML
  1386. }
  1387. var g_state
  1388. window.onload = _initEditor
  1389. /*******************************/
  1390.  //方法: _drawIE4Focus
  1391.  //IE4不支持IFRAME,故采用TEXTBOX代替
  1392. /******************************/
  1393. function _drawIE4Focus(){
  1394. if(isIE4)document.write("<INPUT TYPE=textbox STYLE="width:0;height:0;left:0;position:absolute">")
  1395. }
  1396. </SCRIPT>
  1397. <STYLE>
  1398. body{border-style:none;border-width:medium;margin:0pt;padding:0pt}
  1399. #idMode{margin-top:0pt}
  1400. .tbButton{text-align:left;margin-left:0pt;margin-right:1pt;margin-top:0pt;margin-bottom:0pt;padding:0pt}
  1401. #EditBox{position:relative;}
  1402. </STYLE>
  1403. <STYLE id="skin" disabled>
  1404. #idEditRegion{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;padding:0px}
  1405. #tbUpRight,#tbUpLeft{width:13px}
  1406. #idMode{margin-left:11px;padding:0pt}
  1407. #idMode label{color:navy;text-decoration:none;font-size:14.9px}
  1408. </STYLE>
  1409. <STYLE id="defPopupSkin">
  1410. #popup body{border-top-style:none;border-top-width:medium;margin:0px;padding:0pt}
  1411. #popup .colorTable{height:91px}
  1412. #popup #header{width:100%}
  1413. #popup #close{cursor:default;font-size:12px;width:18px;text-align:center}
  1414. #popup #content{padding:0pt}
  1415. #popup table{vertical-align:top}
  1416. #popup .tabBody{border-left:1px solid black;border-right:1px solid black;border-top-style:none;border-top-width:medium;border-bottom:1px solid black}
  1417. #popup .tabItem,#popup .tabSpace{border-left:1px solid black;border-bottom:1px solid black}
  1418. #popup .tabItem{font-size:14.9px;border-top:1px solid black}
  1419. #popup .currentColor{width:20px;height:20px;border:1px solid black;margin-left:0pt;margin-right:15pt;margin-top:0pt;margin-bottom:0pt}
  1420. #popup .tabItem div{cursor:hand;margin:3px;padding:0px}
  1421. #popup .tabItem div.disabled{color:gray;cursor:default}
  1422. #customFont{font-size:14.9px}
  1423. </STYLE>
  1424. <STYLE id="popupSkin">
  1425. #popup body{background-color:#F1F1F1;border:1px solid #6699CC;background-position:0%;font-size:14.9px}
  1426. #popup #header{background-color:#6699CC;color:white;background-position:0%}
  1427. #popup #caption{text-align:left;font-size:14.9px}
  1428. #popup .ColorTable,#popup #idList td#current{border:1px solid black}
  1429. #popup #idList td{cursor:hand;border:1px solid #F1F1F1}
  1430. #popup #close{cursor:hand;color:#99CCFF;border:1px solid #99CCFF;margin-right:6px;padding-left:4px;padding-right:4px;padding-top:0px;padding-bottom:2px}
  1431. #popup #tableProps .tablePropsTitle{color:#6699CC;text-align:left;border-bottom:1px solid black;margin-left:0pt;margin-right:0pt;margin-top:0pt;margin-bottom:5pt}
  1432. #tableButtons,#tableProps{padding:5px}
  1433. #popup #tableContents{height:175px}
  1434. #popup #tableProps .tablePropsTitle,#popup #tableProps,#popup #tableProps table{font-size:14.9px}
  1435. #popup #tableOptions{font-size:14.9px;padding-left:5pt;padding-right:5pt;padding-top:15pt;padding-bottom:15pt}
  1436. #popup #puDivider{background-color:black;width:1px;background-position:0%}
  1437. #popup #content{margin:0pt;padding-left:3pt;padding-right:3pt;padding-top:5pt;padding-bottom:8pt}
  1438. #popup #ColorPopup{
  1439. width:250px;
  1440. }
  1441. #popup .ColorTable tr{height:6px}
  1442. #popup .ColorTable td{width:6px;cursor:hand}
  1443. #popup .block p,#popup .block h1,#popup .block h2,#popup .block h3,#popup .block h4,#popup .block h5,#popup .block h6,#popup .block pre{margin:0pt;padding:0pt}
  1444. </STYLE>
  1445. </style>
  1446. </HEAD>
  1447. <BODY STYLE="background-color:transparent" oncontextmenu="//return false" tabindex="-1" scroll="no" onselectstart="return false" ondragstart="return false" onscroll="return false">
  1448. <DIV id="idEditor" style="VISIBILITY:hidden">
  1449. <TABLE id="idToolbar" width="100%" cellspacing="0" cellpadding="0" onclick="_CPopup_Hide()">
  1450. <TR><TD bgColor=menu><SCRIPT>_drawToolbar()</SCRIPT></TD></TR>
  1451. <TR><TD bgColor=#000000 HEIGHT=1></TD></TR>
  1452. </TABLE>
  1453. <IFRAME id="idPopup" NAME="idPopup" STYLE="HEIGHT:200px;LEFT:25px;MARGIN-TOP:8px;POSITION:absolute;VISIBILITY:hidden;WIDTH:200px;Z-INDEX:-1"></IFRAME>
  1454. <DIV id="idEditRegion">
  1455. <IFRAME TABINDEX=1 ID="idEditbox" NAME="idEditbox" WIDTH="100%" HEIGHT="100%" MARGINHEIGHT="1" MARGINWIDTH="1" ONFOCUS="_CPopup_Hide();"></IFRAME>
  1456. </DIV>
  1457. <SCRIPT>_drawIE4Focus()</SCRIPT>
  1458. <DIV id="tbmode">
  1459. <SCRIPT>_drawModeSelect()</SCRIPT>
  1460. </DIV>
  1461. </DIV>
  1462. </BODY>