解密:
// ButtonЧ¹ûdocument.onmouseover = doOver;
document.onmouseout = doOut;
document.onmousedown = doDown;
document.onmouseup = doUp;var bIsIE5 = navigator.userAgent.indexOf("IE 5") > -1;
var bIsIE55= navigator.userAgent.indexOf("IE 5.5") > -1;
var edit;
var RangeType;function doOver() {
var toEl = getReal(window.event.toElement, "className", "coolButton");
var fromEl = getReal(window.event.fromElement, "className", "coolButton");
if (toEl == fromEl) return;
var el = toEl;
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (el.className == "coolButton")
el.onselectstart = new Function("return false");
if ((el.className == "coolButton") && !cDisabled) {
makeRaised(el);
makeGray(el,false);
}
}
function doOut() {
var toEl = getReal(window.event.toElement, "className", "coolButton");
var fromEl = getReal(window.event.fromElement, "className", "coolButton");
if (toEl == fromEl) return;
var el = fromEl;
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
toggle_disabled = (cToggle != null);
if (cToggle && el.value) {
makePressed(el);
makeGray(el,true);
}
else if ((el.className == "coolButton") && !cDisabled) {
makeFlat(el);
makeGray(el,true);
}
}
function doUp() {
el = getReal(window.event.srcElement, "className", "coolButton");
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if ((el.className == "coolButton") && !cDisabled) {
makeRaised(el);
}
}function doDown() {
if (event.button == 2 | event.button == 3)
{
// Èç¹ûµãµÄÊÇÓÒ¼ü»òÕßµÚÈýÊó±ê¼üµ¯³ö°ïÖúÎļþ
//onlinehelp();
} else{ // --------document.frames.myEditor.selectRange(); // È¡µÃÑ¡È¡µÄÇøÓò·¶Î§
el = getReal(window.event.srcElement, "className", "coolButton");
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if ((el.className == "coolButton") && !cDisabled) {
makePressed(el)
}
}
}function getReal(el, type, value) {
temp = el;
while ((temp != null) && (temp.tagName != "BODY")) {
if (eval("temp." + type) == value) {
el = temp;
return el;
}
temp = temp.parentElement;
}
return el;
}
function findChildren(el, type, value) {
var children = el.children;
var tmp = new Array();
var j=0;
for (var i=0; i<children.length; i++) {
if (eval("children[i]." + type + "==\"" + value + "\"")) {
tmp[tmp.length] = children[i];
}
tmp = tmp.concat(findChildren(children[i], type, value));
}
return tmp;
}
function disable(el) {
if (document.readyState != "complete") {
window.setTimeout("disable(" + el.id + ")", 100);
return;
}
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (!cDisabled) {
el.cDisabled = true;
el.innerHTML = '<span style="background: buttonshadow; width: 100%; height: 100%; text-align: center;">' +
'<span style="filter:Mask(Color=buttonface) DropShadow(Color=buttonhighlight, OffX=1, OffY=1, Positive=0); height: 100%; width: 100%%; text-align: center;">' +
el.innerHTML + '</span>' + '</span>';
if (el.onclick != null) {
el.cDisabled_onclick = el.onclick;
el.onclick = null;
}
}
}
function enable(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (cDisabled) {
el.cDisabled = null;
el.innerHTML = el.children[0].children[0].innerHTML;
if (el.cDisabled_onclick != null) {
el.onclick = el.cDisabled_onclick;
el.cDisabled_onclick = null;
}
}
}
function addToggle(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
cToggle = (cToggle != null);
if (!cToggle && !cDisabled) {
el.cToggle = true;
if (el.value == null)
el.value = 0;
if (el.onclick != null)
el.cToggle_onclick = el.onclick;
else
el.cToggle_onclick = "";
el.onclick = new Function("toggle(" + el.id +"); " + el.id + ".cToggle_onclick();");
}
}
function removeToggle(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
cToggle = (cToggle != null);
if (cToggle && !cDisabled) {
el.cToggle = null;
if (el.value) {
toggle(el);
}
makeFlat(el);
if (el.cToggle_onclick != null) {
el.onclick = el.cToggle_onclick;
el.cToggle_onclick = null;
}
}
}
// ButtonЧ¹ûdocument.onmouseover = doOver;
document.onmouseout = doOut;
document.onmousedown = doDown;
document.onmouseup = doUp;var bIsIE5 = navigator.userAgent.indexOf("IE 5") > -1;
var bIsIE55= navigator.userAgent.indexOf("IE 5.5") > -1;
var edit;
var RangeType;function doOver() {
var toEl = getReal(window.event.toElement, "className", "coolButton");
var fromEl = getReal(window.event.fromElement, "className", "coolButton");
if (toEl == fromEl) return;
var el = toEl;
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (el.className == "coolButton")
el.onselectstart = new Function("return false");
if ((el.className == "coolButton") && !cDisabled) {
makeRaised(el);
makeGray(el,false);
}
}
function doOut() {
var toEl = getReal(window.event.toElement, "className", "coolButton");
var fromEl = getReal(window.event.fromElement, "className", "coolButton");
if (toEl == fromEl) return;
var el = fromEl;
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
toggle_disabled = (cToggle != null);
if (cToggle && el.value) {
makePressed(el);
makeGray(el,true);
}
else if ((el.className == "coolButton") && !cDisabled) {
makeFlat(el);
makeGray(el,true);
}
}
function doUp() {
el = getReal(window.event.srcElement, "className", "coolButton");
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if ((el.className == "coolButton") && !cDisabled) {
makeRaised(el);
}
}function doDown() {
if (event.button == 2 | event.button == 3)
{
// Èç¹ûµãµÄÊÇÓÒ¼ü»òÕßµÚÈýÊó±ê¼üµ¯³ö°ïÖúÎļþ
//onlinehelp();
} else{ // --------document.frames.myEditor.selectRange(); // È¡µÃÑ¡È¡µÄÇøÓò·¶Î§
el = getReal(window.event.srcElement, "className", "coolButton");
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if ((el.className == "coolButton") && !cDisabled) {
makePressed(el)
}
}
}function getReal(el, type, value) {
temp = el;
while ((temp != null) && (temp.tagName != "BODY")) {
if (eval("temp." + type) == value) {
el = temp;
return el;
}
temp = temp.parentElement;
}
return el;
}
function findChildren(el, type, value) {
var children = el.children;
var tmp = new Array();
var j=0;
for (var i=0; i<children.length; i++) {
if (eval("children[i]." + type + "==\"" + value + "\"")) {
tmp[tmp.length] = children[i];
}
tmp = tmp.concat(findChildren(children[i], type, value));
}
return tmp;
}
function disable(el) {
if (document.readyState != "complete") {
window.setTimeout("disable(" + el.id + ")", 100);
return;
}
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (!cDisabled) {
el.cDisabled = true;
el.innerHTML = '<span style="background: buttonshadow; width: 100%; height: 100%; text-align: center;">' +
'<span style="filter:Mask(Color=buttonface) DropShadow(Color=buttonhighlight, OffX=1, OffY=1, Positive=0); height: 100%; width: 100%%; text-align: center;">' +
el.innerHTML + '</span>' + '</span>';
if (el.onclick != null) {
el.cDisabled_onclick = el.onclick;
el.onclick = null;
}
}
}
function enable(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
if (cDisabled) {
el.cDisabled = null;
el.innerHTML = el.children[0].children[0].innerHTML;
if (el.cDisabled_onclick != null) {
el.onclick = el.cDisabled_onclick;
el.cDisabled_onclick = null;
}
}
}
function addToggle(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
cToggle = (cToggle != null);
if (!cToggle && !cDisabled) {
el.cToggle = true;
if (el.value == null)
el.value = 0;
if (el.onclick != null)
el.cToggle_onclick = el.onclick;
else
el.cToggle_onclick = "";
el.onclick = new Function("toggle(" + el.id +"); " + el.id + ".cToggle_onclick();");
}
}
function removeToggle(el) {
var cDisabled = el.cDisabled;
cDisabled = (cDisabled != null);
var cToggle = el.cToggle;
cToggle = (cToggle != null);
if (cToggle && !cDisabled) {
el.cToggle = null;
if (el.value) {
toggle(el);
}
makeFlat(el);
if (el.cToggle_onclick != null) {
el.onclick = el.cToggle_onclick;
el.cToggle_onclick = null;
}
}
}
el.value = !el.value;
if (el.value)
el.style.background = "URL(/images/tileback.gif)";
else
el.style.backgroundImage = "";
}
function makeFlat(el) {
with (el.style) {
background = "";
border = "1px solid buttonface";
padding = "1px";
}
}
function makeRaised(el) {
with (el.style) {
borderLeft = "1px solid buttonhighlight";
borderRight = "1px solid buttonshadow";
borderTop = "1px solid buttonhighlight";
borderBottom = "1px solid buttonshadow";
padding = "1px";
}
}
function makePressed(el) {
with (el.style) {
borderLeft = "1px solid buttonshadow";
borderRight = "1px solid buttonhighlight";
borderTop = "1px solid buttonshadow";
borderBottom = "1px solid buttonhighlight";
paddingTop = "2px";
paddingLeft = "2px";
paddingBottom = "0px";
paddingRight = "0px";
}
}
function makeGray(el,b) {
}// ¸ü¶à¹¤¾ßÀ¸°´Å¥
function showmore()
{
if(document.all["editbar"].style.display=="none")
{
document.all["editbar"].style.display="";
document.all["more"].style.display="";
document.all["fore"].style.display="none";
document.all["editbar1"].style.display="none";
}
else
{
document.all["editbar1"].style.display="";
document.all["fore"].style.display="";
document.all["editbar"].style.display="none";
document.all["more"].style.display="none";
}
}function doFormat(what)
{
// var editTextRange = window.frames.edit1.document.selection.createRange();
// important !!!
// not editTextRange.execCommand(what, true);
doFocus();
if(arguments[1] == null)
window.frames.edit1.document.execCommand(what, true);
else
window.frames.edit1.document.execCommand(what, true, arguments[1]);
}function doFocus()
{ window.frames.edit1.focus();
}// insert imagefunction insertImage()
{
window.open("insertImage.html","insertImage","width=400,height=223");
}function insertFile() {
window.open("insertFile.html","insertFile","width=300,height=124");
}function palette() {
var return_value = showModalDialog("palette.html","","dialogWidth:18;dialogHeight:16;dialogTop:50;dialogLeft:500;status:no;");
if (return_value != "")
doFormat("ForeColor",return_value)
}function addTable()
{
var return_value= showModalDialog("insertTable.html","","dialogWidth:30;dialogHeight:13.4;dialogTop:50;dialogLeft:500;status:no;"); if (return_value != "")
{
doInsert(return_value);
}
}function doInsert(str)
{ doFocus();
var editTextRange = window.frames.edit1.document.selection.createRange();
editTextRange.pasteHTML(str);
}function doSelectClick(str, el) {
var Index = el.selectedIndex;
if (Index != 0){
el.selectedIndex = 0;
if (el.id == "specialtype")
specialtype(el.options[Index].value);
else
doFormat(str,el.options[Index].value);
}
}function selectRange(){
edit = edit1.document.selection.createRange();
RangeType = edit1.document.selection.type;
}function specialtype(Mark){
var strHTML;
if (bIsIE5) selectRange();
if (RangeType == "Text"){
strHTML = "<" + Mark + ">" + edit.text + "</" + Mark + ">";
edit.pasteHTML(strHTML);
textEdit.focus();
edit.select();
}
}function onlinehelp() {
showModalDialog("help.html","","dialogWidth:18;dialogHeight:16;dialogTop:50;dialogLeft:500;status:no;");
}function insertTest()
{
doFocus();
var editTextRange = window.frames.edit1.document.selection.createRange();
editTextRange.pasteHTML("<b>aaa</b>");
}var displayMode = 1;
function changeModel(n, model)
{ switch(n)
{ case 1:
mode_1.style.display='';
mode_2.style.display='none';
mode_3.style.display='none';
if(displayMode != 1)
window.frames.edit1.document.body.innerHTML=theForm.content.value;
imageName = "bn_edit_s.gif";
break;
case 2:
mode_1.style.display='none';
mode_3.style.display='none';
mode_2.style.display='';
if(displayMode != 2)
theForm.content.value=window.frames.edit1.document.body.innerHTML;
imageName = "bn_code_s.gif";
break;
case 3:
mode_1.style.display='none';
mode_2.style.display='none';
mode_3.style.display='';
if(displayMode == 1)
window.frames.edit2.document.body.innerHTML=window.frames.edit1.document.body.innerHTML;
else if(displayMode == 2)
window.frames.edit2.document.body.innerHTML=theForm.content.value; imageName = "bn_preview_s.gif";
break;
}
if(n !=3)
displayMode = n; model1.innerHTML = "<img src=\"images/bn_edit.gif\" border=0>";
model2.innerHTML = "<img src=\"images/bn_code.gif\" border=0>";
model3.innerHTML = "<img src=\"images/bn_preview.gif\" border=0>";
model.innerHTML = "<img src=\"images/"+imageName+"\" border=0>";
}