﻿var WEBeditor;if (WEBeditor == undefined) {WEBeditor = function (settings) {this.initWEBeditor(settings);};}WEBeditor.prototype.initWEBeditor = function (settings){this.settings = {};this.initSettings(settings);this.initeditform(this.settings.____divbody,this.settings.____hiddenid);};WEBeditor.prototype.initSettings=function (settings) {this.ensureDefault = function (settingName, defaultValue) {var setting = settings[settingName];if (setting != undefined) {this.settings[settingName] = setting;} else {this.settings[settingName] = defaultValue;}};this.ensureDefault("____divbody", "");this.ensureDefault("____hiddenid","");this.ensureDefault("____height","200");this.ensureDefault("____width","516");this.ensureDefault("____isIE", navigator.appName == "Microsoft Internet Explorer");this.ensureDefault("____fname", "");this.ensureDefault("____fsize","12");this.ensureDefault("____color","");this.ensureDefault("____bgcolor","");this.ensureDefault("____popcheckfy", {top:-100,left:-100,bottom:-100,right:-100});this.ensureDefault("____iframe", '___iframe'+this.fRandomBy(0,90000));this.ensureDefault("____webposdiv",'____webposdiv'+this.fRandomBy(0,90000));this.ensureDefault("____language","cn");delete this.ensureDefault;};WEBeditor.prototype.fRandomBy=function(under, over){switch(arguments.length){case 1: return parseInt(Math.random()*under+1);case 2: return parseInt(Math.random()*(over-under+1) + under);default: return 0;}};WEBeditor.prototype.getselectionText=function(){var oRTE = document.getElementById(this.settings.____iframe).contentWindow;var rng;var selection;var seltext='';if(this.settings.____isIE) {selection = oRTE.document.selection;if (selection != null) {var sRangeType = oRTE.document.selection.type;if (sRangeType == "Text"){rng = selection.createRange();seltext=rng.text;}}}else {selection = oRTE.getSelection();rng = selection.getRangeAt(selection.rangeCount - 1).cloneRange();rng.text = rng.toString();seltext=rng.text;}if(seltext==''){}return seltext;};WEBeditor.prototype.checks=function(){var cthis=this;var _onclick=function(evt){evt=evt?evt:(window.event?window.event:null);var tag=evt.target?evt.target:evt.srcElement;var px=evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;var py=evt.clientY+document.body.scrollTop+document.documentElement.scrollTop;if(py<cthis.settings.____popcheckfy.top||py>cthis.settings.____popcheckfy.bottom||px<cthis.settings.____popcheckfy.left||px>cthis.settings.____popcheckfy.right){document.getElementById(cthis.settings.____webposdiv).style.display='none';}};if(window.document.attachEvent){window.document.attachEvent("onclick",_onclick);}else{window.document.addEventListener("click",_onclick,false);}};WEBeditor.prototype.execComms=function(scomms,svalue,evt){var cthis=this;var oRTE = document.getElementById(this.settings.____iframe).contentWindow;oRTE.focus();if(scomms=="fontName"){if(this.getselectionText()!=''){this.settings.____fname=svalue;var html= "<font style='font-family:"+this.settings.____fname+"; font-size:"+this.settings.____fsize+"px;color:"+this.settings.____color+";background:"+this.settings.____bgcolor+";'>"+this.getselectionText()+"</font>";if(this.settings.____isIE){var oRng = oRTE.document.selection.createRange();oRng.pasteHTML(html);oRng.collapse(false);oRng.select();}else{oRTE.document.execCommand("insertHTML", false,html);}}}if(scomms=="fontSize"){if(this.getselectionText()!=''){this.settings.____fsize=svalue;var html= "<font style='font-family:"+this.settings.____fname+"; font-size:"+this.settings.____fsize+"px;color:"+this.settings.____color+";background:"+this.settings.____bgcolor+";'>"+this.getselectionText()+"</font>";if(this.settings.____isIE){oRTE.focus();var oRng = oRTE.document.selection.createRange();oRng.pasteHTML(html);oRng.collapse(false);oRng.select();}else{oRTE.document.execCommand("insertHTML", false, html);}}}if(scomms=="bold"){oRTE.document.execCommand(scomms, false, "900");}if(scomms=="italic"){oRTE.document.execCommand(scomms, false, "2em");}if(scomms=="underline"||scomms=="justifycenter"||scomms=="justifyleft"||scomms=="justifyright"||scomms=="outdent"||scomms=="indent"){oRTE.document.execCommand(scomms,false,"");}if(scomms=="justifyfull"){oRTE.document.execCommand(scomms,false,true);}if(scomms=="insertorderedlist"||scomms=="insertunorderedlist"){oRTE.document.execCommand(scomms,false,scomms);}if(scomms=="ParaFormatting"){var oBody	= oRTE.document.body;var oChild	= oBody.childNodes;for(var i = 0; i < oChild.length; i++){if(oChild[i].tagName){try{oChild[i].innerHTML	= oChild[i].innerHTML.replace(/(^[ ||]*)|([ ||]*$)/g, "");}catch(ex){}if(!oChild[i].style.textIndent){oChild[i].style.textIndent	= '2em';}else{oChild[i].style.textIndent	= '';}}else{oBody.innerHTML = '<div style="text-indent:2em;">' + oBody.innerHTML.replace(/(^[ |　]*)|([ |　]*$)/g, ""); + '</div>';}}}if(scomms=="insertImage"){oRTE.document.execCommand("insertImage", false, svalue);}if(scomms=="forecolor"||scomms=="backColor"){if(svalue!=''){if(this.getselectionText()!=''){if(scomms=="forecolor"){this.settings.____color=svalue;var html= "<font style='font-family:"+this.settings.____fname+"; font-size:"+this.settings.____fsize+"px;color:"+this.settings.____color+";background:"+this.settings.____bgcolor+";'>"+this.getselectionText()+"</font>";if(this.settings.____isIE){var oRng = oRTE.document.selection.createRange();oRng.pasteHTML(html);oRng.collapse(false);oRng.select();}else{oRTE.document.execCommand("insertHTML", false,html);}}else{this.settings.____bgcolor=svalue;var html= "<font style='font-family:"+this.settings.____fname+"; font-size:"+this.settings.____fsize+"px;color:"+this.settings.____color+";background:"+this.settings.____bgcolor+";'>"+this.getselectionText()+"</font>";if(this.settings.____isIE){var oRng = oRTE.document.selection.createRange();oRng.pasteHTML(html);oRng.collapse(false);oRng.select();}else{oRTE.document.execCommand("insertHTML", false,html);}}}}}if(scomms=="forecolor1"||scomms=="hilitecolor"||scomms=="face"){document.getElementById(this.settings.____webposdiv).innerHTML='';if(scomms=="face"){document.getElementById(this.settings.____webposdiv).innerHTML='';document.getElementById(this.settings.____webposdiv).style.width="180px";document.getElementById(this.settings.____webposdiv).style.height="170px";for(var ____n=1;____n<43;____n++){var _faces = document.createElement("div");_faces.className='faceli';var mstr0001='';if(____n<=9){mstr0001='00'+____n;}else{mstr0001='0'+____n;}var _faceimg=document.createElement("img");_faceimg.src='/Skin/stylegy/face/qq/'+mstr0001+'.gif';_faceimg.style.border='0';_faceimg.align='absmiddle';_faceimg.style.width='19px';_faceimg.style.height='19px';_faceimg.onclick=function(evt){cthis.execComms("insertImage",this.src,evt);};_faces.appendChild(_faceimg);document.getElementById(this.settings.____webposdiv).appendChild(_faces);}var facepage = document.createElement("div");facepage.className='facepagestyle';var span1= document.createElement("span");span1.style.cursor='pointer';var span2= document.createElement("span");span2.style.marginLeft='10px';span2.style.cursor='pointer';var span3= document.createElement("span");span3.style.marginLeft='10px';span3.style.cursor='pointer';var span4= document.createElement("span");span4.style.marginLeft='10px';span4.style.cursor='pointer';span1.innerHTML="<strong><img src='/Skin/stylegy/nums/151920B28-64.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span2.innerHTML="<strong><img src='/Skin/stylegy/nums/1519205505-65.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span3.innerHTML="<strong><img src='/Skin/stylegy/nums/151920GQ-66.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span4.innerHTML="<strong><img src='/Skin/stylegy/nums/15192035D-67.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span1.onclick=function(evt){document.getElementById(cthis.settings.____webposdiv).innerHTML='';for(var ____n=1;____n<43;____n++){var _faces = document.createElement("div");_faces.className='faceli';var mstr0001='';if(____n<=9){mstr0001='00'+____n;}else{mstr0001='0'+____n;}var _faceimg=document.createElement("img");_faceimg.src='/Skin/stylegy/face/qq/'+mstr0001+'.gif';_faceimg.style.border='0';_faceimg.align='absmiddle';_faceimg.style.width='19px';_faceimg.style.height='19px';_faceimg.onclick=function(evt){cthis.execComms("insertImage",this.src,evt);};_faces.appendChild(_faceimg);document.getElementById(cthis.settings.____webposdiv).appendChild(_faces);}span1.innerHTML="<strong><img src='/Skin/stylegy/nums/151920B28-64.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span2.innerHTML="<strong><img src='/Skin/stylegy/nums/1519205505-65.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span3.innerHTML="<strong><img src='/Skin/stylegy/nums/151920GQ-66.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span4.innerHTML="<strong><img src='/Skin/stylegy/nums/15192035D-67.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";facepage.appendChild(span1);facepage.appendChild(span2);facepage.appendChild(span3);facepage.appendChild(span4);document.getElementById(cthis.settings.____webposdiv).appendChild(facepage);};span2.onclick=function(evt){document.getElementById(cthis.settings.____webposdiv).innerHTML='';for(var ____n=1;____n<43;____n++){var _faces = document.createElement("div");_faces.className='faceli';var mstr0001='';if(____n<=9){mstr0001='00'+____n;}else{mstr0001='0'+____n;}var _faceimg=document.createElement("img");_faceimg.src='/Skin/stylegy/face/other1/'+mstr0001+'.gif';_faceimg.style.border='0';_faceimg.align='absmiddle';_faceimg.style.width='19px';_faceimg.style.height='19px';_faceimg.onclick=function(evt){cthis.execComms("insertImage",this.src,evt);};_faces.appendChild(_faceimg);document.getElementById(cthis.settings.____webposdiv).appendChild(_faces);}span1.innerHTML="<strong><img src='/Skin/stylegy/nums/151920B28-64.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span2.innerHTML="<strong><img src='/Skin/stylegy/nums/1519205505-65.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span3.innerHTML="<strong><img src='/Skin/stylegy/nums/151920GQ-66.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span4.innerHTML="<strong><img src='/Skin/stylegy/nums/15192035D-67.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";facepage.appendChild(span1);facepage.appendChild(span2);facepage.appendChild(span3);facepage.appendChild(span4);document.getElementById(cthis.settings.____webposdiv).appendChild(facepage);};span3.onclick=function(evt){document.getElementById(cthis.settings.____webposdiv).innerHTML='';for(var ____n=1;____n<43;____n++){var _faces = document.createElement("div");_faces.className='faceli';var mstr0001='';if(____n<=9){mstr0001='00'+____n;}else{mstr0001='0'+____n;}var _faceimg=document.createElement("img");_faceimg.src='/Skin/stylegy/face/other2/'+mstr0001+'.gif';_faceimg.style.border='0';_faceimg.align='absmiddle';_faceimg.style.width='19px';_faceimg.style.height='19px';_faceimg.onclick=function(evt){cthis.execComms("insertImage",this.src,evt);};_faces.appendChild(_faceimg);document.getElementById(cthis.settings.____webposdiv).appendChild(_faces);}span1.innerHTML="<strong><img src='/Skin/stylegy/nums/151920B28-64.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span2.innerHTML="<strong><img src='/Skin/stylegy/nums/1519205505-65.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span3.innerHTML="<strong><img src='/Skin/stylegy/nums/151920GQ-66.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span4.innerHTML="<strong><img src='/Skin/stylegy/nums/15192035D-67.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";facepage.appendChild(span1);facepage.appendChild(span2);facepage.appendChild(span3);facepage.appendChild(span4);document.getElementById(cthis.settings.____webposdiv).appendChild(facepage);};span4.onclick=function(evt){document.getElementById(cthis.settings.____webposdiv).innerHTML='';for(var ____n=1;____n<43;____n++){var _faces = document.createElement("div");_faces.className='faceli';var mstr0001='';if(____n<=9){mstr0001='00'+____n;}else{mstr0001='0'+____n;}var _faceimg=document.createElement("img");_faceimg.src='/Skin/stylegy/face/other3/'+mstr0001+'.gif';_faceimg.style.border='0';_faceimg.align='absmiddle';_faceimg.style.width='19px';_faceimg.style.height='19px';_faceimg.onclick=function(evt){cthis.execComms("insertImage",this.src,evt);};_faces.appendChild(_faceimg);document.getElementById(cthis.settings.____webposdiv).appendChild(_faces);}span1.innerHTML="<strong><img src='/Skin/stylegy/nums/151920B28-64.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span2.innerHTML="<strong><img src='/Skin/stylegy/nums/1519205505-65.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span3.innerHTML="<strong><img src='/Skin/stylegy/nums/151920GQ-66.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";span4.innerHTML="<strong><img src='/Skin/stylegy/nums/15192035D-67.gif' width='20' height='20'  border='0' align='absmiddle'/></strong>";facepage.appendChild(span1);facepage.appendChild(span2);facepage.appendChild(span3);facepage.appendChild(span4);document.getElementById(cthis.settings.____webposdiv).appendChild(facepage);};facepage.appendChild(span1);facepage.appendChild(span2);facepage.appendChild(span3);facepage.appendChild(span4);document.getElementById(this.settings.____webposdiv).appendChild(facepage);}var colors = ["#FFB6C1","#FFC0CB","#DC143C","#FFF0F5","#DB7093","#FF69B4","#FF1493","#C71585","#DA70D6","#D8BFD8","#DDA0DD","#EE82EE","#FF00FF","#FF00FF","#8B008B","#800080","#BA55D3","#9400D3","#9932CC","#4B0082","#8A2BE2","#9370DB","#7B68EE","#6A5ACD","#483D8B","#E6E6FA","#F8F8FF","#0000FF","#0000CD","#191970","#00008B","#000080","#4169E1","#6495ED","#B0C4DE","#778899","#708090","#1E90FF","#F0F8FF","#4682B4","#87CEFA","#87CEEB","#00BFFF","#ADD8E6","#B0E0E6","#5F9EA0","#F0FFFF","#E0FFFF","#AFEEEE","#00FFFF","#00FFFF","#00CED1","#2F4F4F","#008B8B","#008080","#48D1CC","#20B2AA","#40E0D0","#7FFFD4","#66CDAA","#00FA9A","#F5FFFA","#00FF7F","#3CB371","#2E8B57","#F0FFF0","#90EE90","#98FB98","#8FBC8F","#32CD32","#00FF00","#228B22","#008000","#006400","#7FFF00","#7CFC00","#ADFF2F","#556B2F","#9ACD32","#6B8E23","#F5F5DC","#FAFAD2","#FFFFF0","#FFFFE0","#FFFF00","#808000","#BDB76B","#FFFACD","#EEE8AA","#F0E68C","#FFD700","#FFF8DC","#DAA520","#B8860B","#FFFAF0","#FDF5E6","#F5DEB3","#FFE4B5","#FFA500","#FFEFD5","#FFEBCD","#FFDEAD","#FAEBD7","#D2B48C","#DEB887","#FFE4C4","#FF8C00","#FAF0E6","#CD853F","#FFDAB9","#F4A460","#D2691E","#8B4513","#FFF5EE","#A0522D","#FFA07A","#FF7F50","#FF4500","#E9967A","#FF6347","#FFE4E1","#FA8072","#FFFAFA","#F08080","#BC8F8F","#CD5C5C","#FF0000","#A52A2A","#B22222","#8B0000","#800000","#FFFFFF","#F5F5F5","#DCDCDC","#D3D3D3","#C0C0C0","#A9A9A9","#808080","#696969","#000000"];if(scomms=="forecolor1"){document.getElementById(this.settings.____webposdiv).style.width="182px";document.getElementById(this.settings.____webposdiv).style.height="130px";for(var ____m=0;____m<colors.length;____m++){var _forecolor = document.createElement("div");_forecolor.className='fontcolor';var _forecolorimg=document.createElement("img");_forecolorimg.src='/Skin/stylegy/images/blank.gif';_forecolorimg.className='fontbg';_forecolorimg.style.background=colors[____m];_forecolorimg.title=colors[____m];_forecolorimg.onclick=function(evt){cthis.execComms("forecolor",this.title,evt);};_forecolor.appendChild(_forecolorimg);document.getElementById(this.settings.____webposdiv).appendChild(_forecolor);}}if(scomms=="hilitecolor"){document.getElementById(this.settings.____webposdiv).style.width="182px";document.getElementById(this.settings.____webposdiv).style.height="130px";for(var ____m=0;____m<colors.length;____m++){var _forecolor = document.createElement("div");_forecolor.className='fontcolor';var _forecolorimg=document.createElement("img");_forecolorimg.src='/Skin/stylegy/images/blank.gif';_forecolorimg.className='fontbg';_forecolorimg.style.background=colors[____m];_forecolorimg.title=colors[____m];_forecolorimg.onclick=function(evt){cthis.execComms("backColor",this.title,evt);};_forecolor.appendChild(_forecolorimg);document.getElementById(this.settings.____webposdiv).appendChild(_forecolor);}}this.checks();evt=evt?evt:(window.event?window.event:null);document.getElementById(this.settings.____webposdiv).style.display='block';document.getElementById(this.settings.____webposdiv).style.top=(evt.clientY+document.body.scrollTop+document.documentElement.scrollTop)+'px';document.getElementById(this.settings.____webposdiv).style.left=(evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft)+'px';this.settings.____popcheckfy.top=evt.clientY+document.body.scrollTop+document.documentElement.scrollTop;this.settings.____popcheckfy.left=evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;this.settings.____popcheckfy.bottom=this.settings.____popcheckfy.top+parseInt(parseInt(document.getElementById(this.settings.____webposdiv).style.height));this.settings.____popcheckfy.right=this.settings.____popcheckfy.left+parseInt(document.getElementById(this.settings.____webposdiv).style.width);if(scomms=="face"){var __pdivs=(evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft-parseInt(document.getElementById(this.settings.____webposdiv).style.width));document.getElementById(this.settings.____webposdiv).style.left=(__pdivs>=0?__pdivs:(evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft))+'px';this.settings.____popcheckfy.left=(evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft-parseInt(document.getElementById(this.settings.____webposdiv).style.width));this.settings.____popcheckfy.right=(evt.clientX+document.body.scrollLeft+document.documentElement.scrollLeft);}}else{document.getElementById(this.settings.____webposdiv).style.display='none';}if(scomms=="clearhtm"){document.getElementById(this.settings.____iframe).contentWindow.document.body.innerHTML=document.getElementById(this.settings.____iframe).contentWindow.document.body.innerHTML.toLowerCase().replace(/n[s| ]*r/g,"").replace(/(^s*)|(s*$)/g,"").replace(/<(?!\/?(img|br)).*?>/ig,"");}this.initiframe();};WEBeditor.prototype.initiframe=function(){try{var cthis=this;document.getElementById(this.settings.____hiddenid).value=document.getElementById(this.settings.____iframe).contentWindow.document.body.innerHTML;document.getElementById(this.settings.____iframe).onload=function(){if(this.contentWindow){document.getElementById(cthis.settings.____hiddenid).value=this.contentWindow.document.body.innerHTML;}}}catch(e){try{var cthis=this;document.getElementById(this.settings.____iframe).onreadystatechange=function(){if (this.readyState=="interactive"){document.getElementById(cthis.settings.____hiddenid).value=this.contentWindow.document.body.innerHTML;}}}catch(ex){}}};WEBeditor.prototype.setHTML=function(___htm){try{document.getElementById(this.settings.____iframe).contentWindow.document.body.innerHTML=___htm;document.getElementById(this.settings.____iframe).onload=function(){this.contentWindow.document.body.innerHTML=___htm;}}catch(e){document.getElementById(this.settings.____iframe).onreadystatechange=function(){if (this.readyState=="interactive"){this.contentWindow.document.body.innerHTML=___htm;}}}};WEBeditor.prototype.getHTML=function(){try{return document.getElementById(this.settings.____iframe).contentWindow.document.body.innerHTML;}catch(e){}};WEBeditor.prototype.initeditform=function(divbody,hiddenid){var ___hiddenid=document.getElementById(hiddenid);var ___divbody=document.getElementById(divbody);if(___divbody==null||___divbody==undefined||___hiddenid==null||___hiddenid==undefined)return;var webeditbar = document.createElement("div");webeditbar.style.width=this.settings.____width+'px';webeditbar.className="edittoolbtn";var menuitem001=document.createElement("div");menuitem001.className='menuitems';var select001=document.createElement("select");select001.className='selectstyle';var fontfamily=[];fontfamily=[{n:"字体",v:"Times New Roman"},{n:"宋体",v:"宋体"},{n:"新宋体",v:"新宋体"},{n:"黑体",v:"黑体"},{n:"Arial",v:"Arial"},{n:"Times New Roman",v:"Times New Roman, Times, serif"},{n:"Courier New",v:"Courier New, Courier, monospace"},{n:"Georgia",v:"Georgia, Times New Roman, Times, serif"},{n:"Verdana",v:"Verdana, Arial, Helvetica, sans-serif"},{n:"Geneva",v:"Geneva, Arial, Helvetica, sans-serif"},{n:"华文彩云",v:"华文彩云"},{n:"华文仿宋",v:"华文仿宋"},{n:"华文琥珀",v:"华文琥珀"},{n:"华文楷体",v:"华文楷体"},{n:"华文隶书",v:"华文隶书"},{n:"华文宋体",v:"华文宋体"},{n:"华文细黑",v:"华文细黑"},{n:"华文新魏",v:"华文新魏"},{n:"华文行楷",v:"华文行楷"},{n:"华文中宋",v:"华文中宋"},{n:"隶书",v:"隶书"}];if(this.settings.____language=='cn'){fontfamily=[{n:"字体",v:"Times New Roman"},{n:"宋体",v:"宋体"},{n:"新宋体",v:"新宋体"},{n:"黑体",v:"黑体"},{n:"Arial",v:"Arial"},{n:"Times New Roman",v:"Times New Roman, Times, serif"},{n:"Courier New",v:"Courier New, Courier, monospace"},{n:"Georgia",v:"Georgia, Times New Roman, Times, serif"},{n:"Verdana",v:"Verdana, Arial, Helvetica, sans-serif"},{n:"Geneva",v:"Geneva, Arial, Helvetica, sans-serif"},{n:"华文彩云",v:"华文彩云"},{n:"华文仿宋",v:"华文仿宋"},{n:"华文琥珀",v:"华文琥珀"},{n:"华文楷体",v:"华文楷体"},{n:"华文隶书",v:"华文隶书"},{n:"华文宋体",v:"华文宋体"},{n:"华文细黑",v:"华文细黑"},{n:"华文新魏",v:"华文新魏"},{n:"华文行楷",v:"华文行楷"},{n:"华文中宋",v:"华文中宋"},{n:"隶书",v:"隶书"}];}if(this.settings.____language=='tw'){fontfamily=[{n:"字體",v:"Times New Roman"},{n:"宋體",v:"宋體"},{n:"新宋體",v:"新宋體"},{n:"黑體",v:"黑體"},{n:"Arial",v:"Arial"},{n:"Times New Roman",v:"Times New Roman, Times, serif"},{n:"Courier New",v:"Courier New, Courier, monospace"},{n:"Georgia",v:"Georgia, Times New Roman, Times, serif"},{n:"Verdana",v:"Verdana, Arial, Helvetica, sans-serif"},{n:"Geneva",v:"Geneva, Arial, Helvetica, sans-serif"},{n:"華文彩雲",v:"華文彩雲"},{n:"華文仿宋",v:"華文仿宋"},{n:"華文琥珀",v:"華文琥珀"},{n:"華文楷體",v:"華文楷體"},{n:"華文隸書",v:"華文隸書"},{n:"華文宋體",v:"華文宋體"},{n:"華文細黑",v:"華文細黑"},{n:"華文新魏",v:"華文新魏"},{n:"華文行楷",v:"華文行楷"},{n:"華文中宋",v:"華文中宋"},{n:"隸書",v:"隸書"}];}if(this.settings.____language=='en'){fontfamily=[{n:"Typeface",v:"Times New Roman"},{n:"Times New Roman",v:"宋体"},{n:"New font",v:"新宋体"},{n:"Blackbody",v:"黑体"},{n:"Arial",v:"Arial"},{n:"Times New Roman",v:"Times New Roman, Times, serif"},{n:"Courier New",v:"Courier New, Courier, monospace"},{n:"Georgia",v:"Georgia, Times New Roman, Times, serif"},{n:"Verdana",v:"Verdana, Arial, Helvetica, sans-serif"},{n:"Geneva",v:"Geneva, Arial, Helvetica, sans-serif"},{n:"Chinese rosy clouds",v:"华文彩云"},{n:"Chinese Italics",v:"华文仿宋"},{n:"Chinese Amber",v:"华文琥珀"},{n:"Chinese style",v:"华文楷体"},{n:"Chinese Calligraphy",v:"华文隶书"},{n:"Chinese font",v:"华文宋体"},{n:"Chinese black",v:"华文细黑"},{n:"Wei Hua author",v:"华文新魏"},{n:"Chinese Xingkai",v:"华文行楷"},{n:"China in this paper, the song",v:"华文中宋"},{n:"Official script",v:"隶书"}];}for(var _a=0;_a<fontfamily.length;_a++){select001.options.add(new Option(fontfamily[_a].n,fontfamily[_a].v));}menuitem001.appendChild(select001);webeditbar.appendChild(menuitem001);var menuitem002=document.createElement("div");menuitem002.className="menuitems";var select002=document.createElement("select");select002.className="selectstyle1";var zhl="字号";if(this.settings.____language=='tw'){zhl="字號";}if(this.settings.____language=='en'){zhl="Fsize";}var fontsize=[{n:zhl,v:12},{n:9,v:9},{n:10,v:10},{n:12,v:12},{n:14,v:14},{n:16,v:16},{n:18,v:18},{n:24,v:24},{n:30,v:30},{n:36,v:36},{n:48,v:48},{n:60,v:60},{n:72,v:72}];for(var _a=0;_a<fontsize.length;_a++){select002.options.add(new Option(fontsize[_a].n,fontsize[_a].v));}menuitem002.appendChild(select002);webeditbar.appendChild(menuitem002);var styleicos=[{n:"fontName",t:"字体"},{n:"fontSize",t:"字号"},{n:"bold",t:"加粗"},{n:"italic",t:"倾斜"},{n:"underline",t:"下划线"},{n:"forecolor1",t:"字体颜色"},{n:"hilitecolor",t:"背景色"},{n:"justifyleft",t:"左对齐"},{n:"justifycenter",t:"中间对齐"},{n:"justifyright",t:"右对齐"},{n:"justifyfull",t:"两边对齐"},{n:"insertorderedlist",t:"编号"},{n:"insertunorderedlist",t:"项目符号"},{n:"outdent",t:"减少缩进量"},{n:"indent",t:"增加缩进量"},{n:"face",t:"表情"},{n:"ParaFormatting",t:"段落格式化"},{n:"clearhtm",t:"清除所有HTML样式"}];if(this.settings.____language=='tw'){styleicos=[{n:"fontName",t:"字體"},{n:"fontSize",t:"字型大小"},{n:"bold",t:"加粗"},{n:"italic",t:"傾斜"},{n:"underline",t:"下劃線"},{n:"forecolor1",t:"字體顏色"},{n:"hilitecolor",t:"背景色"},{n:"justifyleft",t:"左對齊"},{n:"justifycenter",t:"中間對齊"},{n:"justifyright",t:"右對齊"},{n:"justifyfull",t:"兩邊對齊"},{n:"insertorderedlist",t:"編號"},{n:"insertunorderedlist",t:"專案符號"},{n:"outdent",t:"減少縮進量"},{n:"indent",t:"增加縮進量"},{n:"face",t:"表情"},{n:"ParaFormatting",t:"段落格式化"},{n:"clearhtm",t:"清除所有HTML樣式"}];}if(this.settings.____language=='en'){styleicos = [{n:"fontName",t:"font"},{n:"fontSize",t:"name"},{n:"bold",t:"bold"},{n:"Italic",t:"tilt"},{n:"underline",t:"underline"},{n:"forecolor1",t:"font color"},{n:"hilitecolor",t:"background"},{n:"justifyleft",t:"left"},{n:"justifycenter",t:"middle alignment"},{n:"justifyright",t:"right"},{n:"justifyfull",t:"justifier"},{n:"insertorderedlist",t:"number"},{n:"insertunorderedlist",t:"bullet"},{n:"outdent",t:"decrease indent"},{n:"indent",t:"the increase indent"},{n:"face",t:"the expression"},{n:"ParaFormatting",t:"paragraphs formatted"},{n:"clearhtm",t:"clear all HTML style"}];}var cthis=this;for(var _a=0;_a<styleicos.length;_a++){if(_a==0){if(styleicos[_a].n=="fontName"){select001.title=styleicos[_a].t;select001.onchange=function(evt){cthis.execComms("fontName",this.value,evt);this.value='Times New Roman';}}}if(_a==1){if(styleicos[_a].n=="fontSize"){select002.title=styleicos[_a].t;select002.onchange=function(evt){cthis.execComms("fontSize",this.value,evt);this.value=12;}}}if(_a>1){var menuitem003=document.createElement("div");menuitem003.className="menuitems1";var commicons=document.createElement("img");commicons.id=styleicos[_a].n;commicons.src="/Skin/stylegy/images/"+styleicos[_a].n+".gif";commicons.onmouseover=function(){this.src='/Skin/stylegy/images/'+this.id+'_over.gif';};commicons.onmouseout=function(){this.src='/Skin/stylegy/images/'+this.id+'.gif';};if(styleicos[_a].n=="bold"){commicons.onclick=function(evt){cthis.execComms("bold",'',evt);}}if(styleicos[_a].n=="italic"){commicons.onclick=function(evt){cthis.execComms("italic",'',evt);}}if(styleicos[_a].n=="underline"){commicons.onclick=function(evt){cthis.execComms("underline",'',evt);}}if(styleicos[_a].n=="forecolor1"){commicons.onclick=function(evt){cthis.execComms("forecolor1",'',evt);}}else if(styleicos[_a].n=="hilitecolor"){commicons.onclick=function(evt){cthis.execComms("hilitecolor",'',evt);}}else if(styleicos[_a].n=="justifyleft"){commicons.onclick=function(evt){cthis.execComms("justifyleft",'',evt);}}else if(styleicos[_a].n=="justifycenter"){commicons.onclick=function(evt){cthis.execComms("justifycenter",'',evt);}}else if(styleicos[_a].n=="justifyright"){commicons.onclick=function(evt){cthis.execComms("justifyright",'',evt);}}else if(styleicos[_a].n=="justifyfull"){commicons.onclick=function(evt){cthis.execComms("justifyfull",'',evt);}}else if(styleicos[_a].n=="insertorderedlist"){commicons.onclick=function(evt){cthis.execComms("insertorderedlist",'',evt);}}else if(styleicos[_a].n=="insertunorderedlist"){commicons.onclick=function(evt){cthis.execComms("insertunorderedlist",'',evt);}}else if(styleicos[_a].n=="outdent"){commicons.onclick=function(evt){cthis.execComms("outdent",'',evt);}}else if(styleicos[_a].n=="indent"){commicons.onclick=function(evt){cthis.execComms("indent",'',evt);}}else if(styleicos[_a].n=="face"){commicons.onclick=function(evt){cthis.execComms("face",'',evt);}}else if(styleicos[_a].n=="ParaFormatting"){commicons.onclick=function(evt){cthis.execComms("ParaFormatting",'',evt);}}else if(styleicos[_a].n=="clearhtm"){commicons.onclick=function(evt){cthis.execComms("clearhtm",'',evt);}}commicons.style.cursor='pointer';commicons.title=styleicos[_a].t;menuitem003.appendChild(commicons);webeditbar.appendChild(menuitem003);}}var bottomdiv=document.createElement("div");bottomdiv.className="bottomdiv";webeditbar.appendChild(bottomdiv);var webeditborder=document.createElement("div");webeditborder.style.width=this.settings.____width+'px';webeditborder.style.height=this.settings.____height+'px';webeditborder.className='editframe';var webeditbody=document.createElement("iframe");webeditbody.id=this.settings.____iframe;webeditbody.name=this.settings.____iframe;webeditbody.scrolling='auto';webeditbody.src='about:blank';webeditbody.frameBorder='0';webeditbody.style.width=this.settings.____width+'px';webeditbody.style.height=this.settings.____height+'px';webeditbody.onreadystatechange=function(){if (this.readyState=="interactive"){var converter = document.createElement("DIV");converter.innerHTML = document.getElementById(cthis.settings.____hiddenid).value;var output = converter.innerHTML;converter = null;webeditbody.contentWindow.document.body.innerHTML=output;webeditbody.contentWindow.focus();}};webeditbody.onload=function(){var converter = document.createElement("DIV");converter.innerHTML = document.getElementById(cthis.settings.____hiddenid).value;var output = converter.innerHTML;converter = null;webeditbody.contentWindow.document.body.innerHTML=output;webeditbody.contentWindow.focus();};webeditborder.appendChild(webeditbody);___divbody.appendChild(webeditbar);___divbody.appendChild(webeditborder);var wpopdiv = document.createElement("div");wpopdiv.id=this.settings.____webposdiv;wpopdiv.style.position="absolute";wpopdiv.style.width="180px";wpopdiv.style.height="167px";wpopdiv.style.border="#666666 solid 1px";wpopdiv.style.background="#FFFFFF";wpopdiv.style.display="none";wpopdiv.style.zIndex=99999;document.body.appendChild(wpopdiv);var ___html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">html{SCROLLBAR-FACE-COLOR: #f2f2f2; SCROLLBAR-HIGHLIGHT-COLOR: #fff; SCROLLBAR-SHADOW-COLOR: #d2d4d4; COLOR: #666; SCROLLBAR-3DLIGHT-COLOR: #d2d4d4; SCROLLBAR-ARROW-COLOR: #d2d4d4; SCROLLBAR-TRACK-COLOR: #fff; SCROLLBAR-DARKSHADOW-COLOR: #fff; SCROLLBAR-BASE-COLOR: #f2f2f2;}</style></head><body style="margin:0; font-size:14px;background-attachment: fixed;background-image: url(/Skin/stylegy/images/bookcontentbg.png);background-color:#FFFFFF;background-repeat: no-repeat;background-position: right bottom;">';var ___html2='</body></html>';var ___editor = webeditbody.contentWindow;___editor.document.open();___editor.document.writeln(___html);___editor.document.writeln(___html2);___editor.document.close();if(window._isIE){___editor.document.body.contentEditable = true;}else{___editor.document.designMode = "on";}if(document.attachEvent){___editor.document.attachEvent("onclick",function(evt){document.getElementById(cthis.settings.____webposdiv).style.display='none';cthis.initiframe();});___editor.document.attachEvent("onkeypress",function(evt){cthis.initiframe();});___editor.document.attachEvent("onmouseup",function(evt){cthis.initiframe();});___editor.document.attachEvent("onkeyup",function(evt){cthis.initiframe();});document.attachEvent("onkeypress",function(evt){cthis.initiframe();});document.attachEvent("onmouseup",function(evt){cthis.initiframe();});document.attachEvent("onkeyup",function(evt){cthis.initiframe();});document.attachEvent("onclick",function(evt){cthis.initiframe();});}else{___editor.document.addEventListener("click",function(evt){document.getElementById(cthis.settings.____webposdiv).style.display='none';cthis.initiframe();},false);___editor.document.addEventListener("blur",function(evt){cthis.initiframe();},false);___editor.document.addEventListener("keypress",function(evt){cthis.initiframe();},false);___editor.document.addEventListener("mouseup",function(evt){cthis.initiframe();},false);___editor.document.addEventListener("keyup",function(evt){cthis.initiframe();},false);document.addEventListener("keypress",function(evt){cthis.initiframe();},false);document.addEventListener("mouseup",function(evt){cthis.initiframe();},false);document.addEventListener("keyup",function(evt){cthis.initiframe();},false);document.addEventListener("click",function(evt){cthis.initiframe();},false);}};
