function insertMyText() {
var SelectColor = "background-color:white;color:black";
document.write('<center style="font-family:Arial;">توقيعك يعكس شخصيتك</center>');
}
function insertHTML() {
var SelectColor = "background-color:white;color:black";
document.write('<select style="' + SelectColor + ';font-family:MS Sans Serif;font-size:xx-small" onchange="Editor_addCode(\'[color=\'+this[this.selectedIndex].value+\']\',\'[/color]\');this.selectedIndex=0">');
document.write('<option selected>:أختيار اللـون::</option>');
document.write('<option value="B7D8FB" style="color:#B7D8FB">أزرق فاتـــح</option>');
document.write('<option value="5C92CC" style="color:#5C92CC">أزرق متوسط</option>');
document.write('<option value="144273" style="color:#144273">أزرق غامـــق</option>');
document.write('<option value="A4D867" style="color:#A4D867">أخضر فاتـح</option>');
document.write('<option value="78AB3C" style="color:#78AB3C">أخضر متوسط</option>');
document.write('<option value="497418" style="color:#497418">أخضر غامــــق</option>');
document.write('<option value="F6C9D2" style="color:#F6C9D2">وردي فاتـــح</option>');
document.write('<option value="DE94A4" style="color:#DE94A4">وردي متوسط</option>');
document.write('<option value="AC5668" style="color:#AC5668">وردي غامـــق</option>');
document.write('<option value="FA0309" style="color:#FA0309">أحمـــر حـــاد</option>');
document.write('<option value="940306" style="color:#940306">أحمــر ثقيـــل</option>');
document.write('<option value="000000" style="color:#000000">أسـود شعبي</option>');
document.write('<option value="FFFFFF" style="color:#FFFFFF">أبيض شعبي</option>');
document.write('<option value="E4CDA1" style="color:#E4CDA1">بني فاتــح</option>');
document.write('<option value="B09664" style="color:#B09664">بني متوسط</option>');
document.write('<option value="6D5423" style="color:#6D5423">بني غامــق</option>');
document.write('<option value="722C70" style="color:#722C70">بنفسجـــــي</option>');
document.write('<option value="F2B7F0" style="color:#F2B7F0">موف فاتـــح</option>');
document.write('<option value="D6D3D6" style="color:#D6D3D6">رمادي فاتح</option>');
document.write('<option value="A8A5A8" style="color:#A8A5A8">رمادي وسـط</option>');
document.write('<option value="706E70" style="color:#706E70">رمادي ثقيــل</option>');
document.write('<option value="F8FAB9" style="color:#F8FAB9">أصفر فاتــح</option>');
document.write('<option value="F69935" style="color:#F69935">أصفر متوسط</option>');
document.write('<option value="BE5108" style="color:#BE5108">أصفر ثقيــل</option>');document.write('</select>');
document.write('<select style="' + SelectColor + ';font-family:MS Sans Serif;font-size:xx-small" onchange="Editor_addCode(\'[size=\'+this[this.selectedIndex].value+\']\',\'[/size]\');this.selectedIndex=0">');
document.write('<option selected>:حجـــم الخــط::</option>');
document.write('<option value="1">1</option>');
document.write('<option value="2">2</option>');
document.write('<option value="3">3</option>');
document.write('<option value="4">4</option>');
document.write('<option value="5">5</option>');
document.write('<option value="6">6</option>');
document.write('<option value="7">7</option>');
document.write('<option value="8">8</option>');
document.write('<option value="9">9</option>');
document.write('</select>'),
document.write('<select style="' + SelectColor + ';font-family:MS Sans Serif;font-size:xx-small" onchange="Editor_addCode(\'[face=\'+this[this.selectedIndex].value+\']\',\'[/face]\');this.selectedIndex=0">');
document.write('<option selected>:نــــوع الخــط::</option>');
document.write('<option value="Arial">Arial</option>');
document.write('<option value="Arial Black">Arial Black</option>');
document.write('<option value="Arial Narrow">Arial Narrow</option>');
document.write('<option value="Comic Sans MS">Comic Sans MS</option>');
document.write('<option value="Courier New">Courier New</option>');
document.write('<option value="System">System</option>');
document.write('<option value="Tahoma">Tahoma</option>');
document.write('<option value="Times New Roman">Times New Roman</option>');
document.write('<option value="Simplified Arabic">Simplified Arabic</option>');
document.write('<option value="Verdana">Verdana</option>');
document.write('<option value="Wingdings">Wingdings</option>');
document.write('<option value="MS Sans Serif">MS Sans Serif</option>');
document.write('</select>');
}
var buttons = new Array();
function addRow(a) {
buttons = buttons.concat("*");
buttons = buttons.concat(a);
}
function showButtons() {		
addRow (new Array("mup|تحريك انسيابي إلى الأعلى","mdown|تحريك انسيابي إلى الأسفل","cut|قص","copy|نسخ","paste|لصق","delete|إزالة","keyb|إظهار لوحة المفاتيح العربية","link|رابط الكتروني","image|صورة","ltr|تحويل الكتابة من اليسار إلى اليمين","rtl|تحويل الكتابة من اليمين إلى اليسار","bold|داكن","italic|مائل","uline|خط سفلي"));
addRow (new Array("mleft|تحريك انسيابي إلى اليسار","mright|تحريك انسيابي إلى اليمين","php|كود PHP","code|كود","quote|اقتباس","quran|نص قراني","info|معلومات","rplayer|تشغيل ملف رييل بلاير (rm,ra,ram)","media|تشغيل ملفات الصوت والصورة ","flash|تشغيل ملف فلاش (swf)","left|إلى اليسار","center|توسيط","right|إلى اليمين","justify|محاذاة إلى الأطراف"));
addButtons(buttons, 0);
buttons = null;
}

function signshowButtons() {		
addRow (new Array("quran|نص قراني","info|معلومات","rplayer|تشغيل ملف رييل بلاير (rm,ra,ram)","media|تشغيل ملفات الصوت والصورة ","keyb|إظهار لوحة المفاتيح العربية","link|رابط الكتروني","image|صورة","ltr|تحويل الكتابة من اليسار إلى اليمين","rtl|تحويل الكتابة من اليمين إلى اليسار","bold|داكن","italic|مائل","uline|خط سفلي"));
signaddButtons(buttons);
buttons = null;
}

var tip = "ضع المؤشر للحصول على التعليمات";
var keyboardColor,statusColor,tipColor;
var btn_backcolor_over, btn_backcolor_down, btn_bordercolor;
var toolbox_background,toolbox_backcolor;
var btn_obj = "";
function Capture(b) {
if (document.activeElement.name != "post") {
return;
}
if (event.srcElement.tagName.toLowerCase() == "select")
return;
if (btn_obj) {		
btn_obj.releaseCapture();
btn_obj = "";
} else if (b == 1) {		
btn_obj = event.srcElement;		
btn_obj.setCapture();
}
}
function button_over(eButton, w) {
if (w == -1) {
eButton.parentElement.background = "html/toolbox/key_2.gif";
eButton.style.color = "white";
} else {
rafia.toolboxbar.style.color = statusColor;
rafia.toolboxbar.value = w;
doButton(btn_backcolor_over, 1, eButton);}
}
function button_out(eButton, w) {
if (w == -1) {
eButton.parentElement.background = "";
eButton.style.color = "black";
} else {
rafia.toolboxbar.style.color = tipColor;
rafia.toolboxbar.value = tip;
doButton("", 0, eButton);
}
}
function button_down(eButton, w) {
if (w != -1)
doButton(btn_backcolor_down, 1, eButton);
}
function button_up(eButton, w) {
if (w != -1)
doButton(btn_backcolor_over, 1, eButton);
	eButton = null;
}
function doButton(bk, s, btn) {
if (event.button == 2) return;
btn.style.backgroundColor = bk;
if (s == 0)	{
btn.parentElement.style.backgroundColor = "transparent";		
} else {		
btn.parentElement.style.backgroundColor = btn_bordercolor;
}
}
function addKeys(buttons) {
var tbl, events, newRow;
document.write('<table dir="rtl" id="keyboardTable" border="0" cellpadding="0" cellspacing="0" width="1" style="display:none">');
document.write('<tr><td>');
newRow = 1;
for (var i = 0; i < buttons.length; i++) {
if (i % 15 == 0) {
document.write('<table dir="rtl" align="center" background="html/toolbox/key_1.gif" border="0" cellpadding="0" cellspacing="0" width="1px"><tr>');
newRow = 0;
}
events = 'onclick="execTool(\'' + "key_" + buttons[i] + '\')" onmouseover="button_over(this,-1)" onmouseout="button_out(this,-1)" onmousedown="button_down(this,-1)" onmouseup="button_up(this,-1)"';
tbl = '<td height="29px"><div style="cursor:hand;text-align:center;width:30px;height:20px;color:black" ' + events + '>';
if (buttons[i] == " ")
buttons[i] = "&nbsp;";
tbl += '<font face="arial" size="2"><b>' + buttons[i] + '</b></font></div>';
tbl += '</td>';
document.write(tbl);
if ((i + 1) % 15 == 0) {
document.write('</tr></table>');				
newRow = 1;
}
}
if (newRow == 0) {
document.write('</tr></table>');
}
document.write('</td></tr></table>');
}

function addButtons(buttons) {
var tbl, bn, events, newRow;
document.write('<table bgcolor="' + toolbox_backcolor + '" background="' + toolbox_background + '" dir="rtl" border="0" cellpadding="0" cellspacing="0" width="1" style="border:1 ridge">');
document.write('<tr><td>');
document.write('<table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1 ridge" height=23px><tr><td align="right">');
insertHTML();
document.write('</td></tr></table>');	
newRow = 1;
for (var i = 0; i < buttons.length; i++) {
if (buttons[i] == "*") {
if (newRow == 0) {
document.write('</tr></table>');
document.write('</td></tr></table>');
newRow = 1;
}
continue;
}
if (newRow) {
document.write('<table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="1" style="merge:5px;"><tr><td style="border:1 ridge;padding-right:10px;padding-left:10px">');
document.write('<table align="left" width="1" border="0" cellpadding="0" cellspacing="0"><tr>');
newRow = 0
}
if (buttons[i] == "") {
tbl = '</tr></table><td style="border:1 ridge;padding-right:10px;padding-left:10px">';
tbl += '<table align="left" width="1" border="0" cellpadding="0" cellspacing="0"><tr>';
} else if (buttons[i] == " ") {
tbl = '<td style="padding:1px"><div class="cbtn" style="font-size:1pt">&nbsp;';
} else {
bn = buttons[i] + "| ";
bn = bn.split("|");
events = 'onclick="execTool(\'' + bn[0] + '\')" onmouseover="button_over(this,\'' + bn[1] + '\')" onmouseout="button_out(this,1)" onmousedown="button_down(this,1)" onmouseup="button_up(this,1)"';			
tbl = '<td style="padding:1px"><div align="center" class="cbtn" ' + events + '>';
tbl += '<img border="0" align="absmiddle" width="18px" height="18px" src="html/toolbox/' + bn[0] + '.gif" alt="' + bn[1] + '">';
}
tbl += '</div></td>';		
document.write(tbl);
}
if (newRow == 0) {
document.write('</tr></table>');
document.write('</td></tr></table>');
}
document.write('<table dir="rtl" border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1 ridge"><tr>');
document.write('<td width="1"><img border="0" align="middle" src="html/toolbox/tip.gif"></td>');
	document.write('<td><input type="text" name="toolboxbar" value="' + tip + '" style="height:18px;border-style:none;width:100%;font:8pt MS Sans Serif ;background-color:transparent;color:' + tipColor + '"></td></tr>');
document.write('</table>');
document.write('</td></tr></table>');
}

function signaddButtons(buttons) {
var tbl, bn, events, newRow;
document.write('<table bgcolor="' + toolbox_backcolor + '" background="' + toolbox_background + '" dir="rtl" border="0" cellpadding="0" cellspacing="0" width="1" style="border:1 ridge">');
document.write('<tr><td>');
document.write('<table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1 ridge" height=23px><tr><td align="right">');
insertMyText();
document.write('</td></tr></table>');	
newRow = 1;
for (var i = 0; i < buttons.length; i++) {
if (buttons[i] == "*") {
if (newRow == 0) {
document.write('</tr></table>');
document.write('</td></tr></table>');
newRow = 1;
}
continue;
}
if (newRow) {
document.write('<table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="1" style="merge:5px;"><tr><td style="border:1 ridge;padding-right:10px;padding-left:10px">');
document.write('<table align="left" width="1" border="0" cellpadding="0" cellspacing="0"><tr>');
newRow = 0
}
if (buttons[i] == "") {
tbl = '</tr></table><td style="border:1 ridge;padding-right:10px;padding-left:10px">';
tbl += '<table align="left" width="1" border="0" cellpadding="0" cellspacing="0"><tr>';
} else if (buttons[i] == " ") {
tbl = '<td style="padding:1px"><div class="cbtn" style="font-size:1pt">&nbsp;';
} else {
bn = buttons[i] + "| ";
bn = bn.split("|");
events = 'onclick="execTool(\'' + bn[0] + '\')" onmouseover="button_over(this,\'' + bn[1] + '\')" onmouseout="button_out(this,1)" onmousedown="button_down(this,1)" onmouseup="button_up(this,1)"';			
tbl = '<td style="padding:1px"><div align="center" class="cbtn" ' + events + '>';
tbl += '<img border="0" align="absmiddle" width="18px" height="18px" src="html/toolbox/' + bn[0] + '.gif" alt="' + bn[1] + '">';
}
tbl += '</div></td>';		
document.write(tbl);
}
if (newRow == 0) {
document.write('</tr></table>');
document.write('</td></tr></table>');
}
document.write('<table dir="rtl" border="0" cellpadding="0" cellspacing="0" width="100%" style="border:1 ridge"><tr>');
document.write('<td width="1"><img border="0" align="middle" src="html/toolbox/tip.gif"></td>');
	document.write('<td><input type="text" name="toolboxbar" value="' + tip + '" style="height:18px;border-style:none;width:100%;font:8pt MS Sans Serif ;background-color:transparent;color:' + tipColor + '"></td></tr>');
document.write('</table>');
document.write('</td></tr></table>');
}
function showKeyboard() {
var buttons = new Array("ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","هـ","و","ي","ة","أ","إ","آ","ء","ؤ","ئ","ى","لا","لإ","لآ"," "," ","ـ","،","؛","؟");
addKeys(buttons);
}
function showColorsWindow() {
var posX = event.screenX;
var posY = event.screenY + 5;
var screenW = screen.width;                                 // screen size
var screenH = screen.height - 20;                           // take taskbar into account
if (posX + 232 > screenW) { posX = posX - 232 - 40; }       // if mouse too far right
if (posY + 164 > screenH) { posY = posY - 164 - 80; }       // if mouse too far down
var wPosition = "dialogLeft:" +posX+ "; dialogTop:" +posY;
return showModalDialog("colors.html", "",
"dialogWidth:238px; dialogHeight: 195px; resizable: no; help: no; status: no; scroll: no; "	+ wPosition);
}
function execTool(btn) {	
if (event.altKey) {
if (btn.substr(0,4) != "key_") {
open("help.php?toolsel=" + btn, "help", "toolbar=no,scrollbars=yes,resizable=yes,width=550px,height=350px,left=50px,top=100px");
}
} else
EditorFunctions(btn);
}
function Editor_getSelText() {
var oSelect,oSelectRange;
document.rafia.post.focus();
oSelect = document.selection;
oSelectRange = oSelect.createRange();
return oSelectRange; 
}
function Editor_addCode(tag1,tag2) {	
var oSelText = Editor_getSelText();
if (oSelText.text == "")
alert("يرجى تظليل النص أولا");
else
oSelText.text = tag1 + oSelText.text + tag2;
}
function EditorFunctions(tag) {  
if (tag.substr(0, 4) == "key_") {  // Arabic Keyboard
var oSelText = Editor_getSelText();
tag = tag.substr(4);
if (tag == "هـ") tag = "ه";
oSelText.text = tag;
}
else if (tag == "rtl" || tag == "ltr") {
document.rafia.post.dir=tag.substr(tag);
}
else if (tag == "bold") {
Editor_addCode("[B]","[/B]");
}
else if (tag == "italic") {
Editor_addCode("[I]","[/I]");
}
else if (tag == "uline") {
Editor_addCode("[U]","[/U]");
}
else if (tag == "quote") {
Editor_addCode(" [quote] "," [/quote] ");
}
else if (tag == "code") {
Editor_addCode(" [code] "," [/code] ");
}
else if (tag == "php") {
Editor_addCode(" [PHP] "," [/PHP] ");
}
else if (tag == "quran") {
Editor_addCode(" [QURAN] "," [/QURAN] ");
}
else if (tag=="mktsr") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("cannedtext.php",oSelText,"help:no; center:yes; status:no; dialogHeight:400px; dialogWidth:400px");
}
else if (tag=="up") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("up/",oSelText,"help:no; center:yes; status:no; dialogHeight:360px; dialogWidth:350px");
}
else if (tag=="zzz") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("zzz.htm",oSelText,"help:no; center:yes; status:no; dialogHeight:360px; dialogWidth:350px");
}
else if (tag=="poetry") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("hackpoet.htm",oSelText,"help:no; center:yes; status:no; dialogHeight:360px; dialogWidth:390px");
}
else if (tag=="lon") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("colo.htm",oSelText,"help:no; center:yes; status:no; dialogHeight:319px; dialogWidth:457px");
}
else if (tag=="list1") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post")
showModalDialog("msn.htm",oSelText,"help:no; center:yes; status:no; dialogHeight:319px; dialogWidth:457px");
}
else if (tag == "gradient") {
var oSelText = Editor_getSelText();
if (oSelText.text == "") {
alert("يرجى تظليل النص أولا");
return;
}
code = showModalDialog("gradient_form.htm","","help:no; center:yes; status:no; dialogHeight:150px; dialogWidth:420px");
if (!code)
return;
oSelText.text = "[grade=\"" + code + "\"]" + oSelText.text + "[/grade]"
}  
else if (tag == "left" || tag == "center" || tag == "right" || tag == "justify") {
Editor_addCode("[align="+tag.toLowerCase()+"]","[/align]");
}
else if (tag == "link") {
var oSelText = Editor_getSelText();
var ob = window.prompt("أدخل الرابط:","http://");
txt = oSelText.text;
if (ob) {
if (txt=="")
txt = window.prompt("أدخل التعليق على الرابط","");
if (txt)
oSelText.text = "[url]"+ob+"[ll]"+txt+"[/url]";
else
oSelText.text = "[url]"+ob+"[ll]"+ob+"[/url]";
}

}

else if (tag == "email") {
var oSelText = Editor_getSelText();
var ob = window.prompt("أدخل عنوان البريد الالكتروني:","@");
if (ob)
if (oSelText.text=="")
oSelText.text = "[mail="+ob+"]"+ob+"[/mail]";
else
oSelText.text = "[mail="+ob+"]"+oSelText.text +"[/mail]";
}
else if (tag == "image") {
var oSelText = Editor_getSelText();
var link=((oSelText.text=="")?"http://":oSelText.text);
var ob = window.prompt("أدخل رابط الصورة:",link);
if (ob)
oSelText.text = "[IMG]"+ob+"[/IMG]";
}

else if (tag == "bimg") {
var oSelText = Editor_getSelText();
var link=((oSelText.text=="")?"http://":oSelText.text);
var ob = window.prompt("أدخل رابط الصورة المراد ضبطها:",link);
if (ob)
oSelText.text = "[bimg="+ob+"][/bimg]";
}
  else if (tag == "mleft" || tag == "mright" || tag == "mup" || tag == "mdown") {
    Editor_addCode("[move="+tag.substr(1).toLowerCase()+"]","[/move]");
  }
  else if (tag == "tleft" || tag == "tright" || tag == "tup" || tag == "tdown") {
    Editor_addCode("[movet="+tag.substr(1).toLowerCase()+"]","[/movet]");
  }
  else if (tag == "oleft" || tag == "oright" || tag == "oup" || tag == "odown") {
    Editor_addCode("[moveo="+tag.substr(1).toLowerCase()+"]","[/moveo]");
  }
  else if (tag == "kleft" || tag == "kright" || tag == "kup" || tag == "kdown") {
    Editor_addCode("[movek="+tag.substr(1).toLowerCase()+"]","[/movek]");
  }
  else if (tag == "sleft" || tag == "sright" || tag == "sup" || tag == "sdown") {
    Editor_addCode("[moves="+tag.substr(1).toLowerCase()+"]","[/moves]");
  }
else if (tag == "rplayer") {
var oSelText = Editor_getSelText();
var link=((oSelText.text=="")?"http://":oSelText.text);
var ob = window.prompt("أدخل رابط ملف الرييل بلاير:", link);
if (ob) {
t = window.prompt("صوت فقط = 0\r\nصورة = 1", 0);
if (t) {
if (t==0)
oSelText.text = "[rams]"+ob+"[/rams]";
else
oSelText.text = "[ramv]"+ob+"[/ramv]";
}	  
}
}
else if (tag == "media") {
var oSelText = Editor_getSelText();
var link=((oSelText.text=="")?"http://":oSelText.text);
var ob = window.prompt("أدخل ملف الصوت والصورة:", link);
if (ob)
oSelText.text = "[media="+ob+"][/media]";
}
else if (tag == "flash") {
var oSelText = Editor_getSelText();
var link=((oSelText.text=="")?"http://":oSelText.text);
var ob = window.prompt("أدخل رابط ملف الفلاش:", link);
if (!ob) return;
var w = window.prompt("أدخل طول شاشة الفلاش بوحدة البيكسل:","400");
if (!w) return;
var h = window.prompt("أدخل عرض شاشة الفلاش بوحدة البيكسل:","350");
if (!h) return;
oSelText.text = "[flash WIDTH="+w+" HEIGHT="+h+"]"+ob+"[/flash]";
}
else if (tag == "info") {
alert("محرر BBcode تم تعديله ليوافق برنامج البوابة العربية \n جميع الحقوق محفوظة لأصحابها");
}
else if (tag == "frame") {
var oSelText = Editor_getSelText();
if (oSelText.text == "") {
alert("يرجى تظليل النص أولا");
return;
}
code = showModalDialog("frame_form.htm","","help:no; center:yes; status:no; dialogHeight:290px; dialogWidth:450px");
if (!code)
return;
oSelText.text = '[frame="' + code + '"]' + oSelText.text + '[/frame]';
}
else if (tag == "plain") {
var oSelText = Editor_getSelText();
if (oSelText.parentElement().name=="post") {
var temp = oSelText.text;
temp = temp.replace(/\[FLASH=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/FLASH\]/gi,"$1");
temp = temp.replace(/\[VIDEO=([^\]]*)\]WIDTH=[0-9]{0,4} HEIGHT=[0-9]{0,4}\[\/VIDEO\]/gi,"$1");
oSelText.text = temp.replace(/\[[^\]]*\]/gi,"");
}
}
else if (tag == "cut" || tag == "copy" || tag == "paste" || tag == "delete" || tag == "close") {
var oSelText = Editor_getSelText();
oSelText.execCommand(tag);
}
else if (tag == "smile") {
opensmiliewindow(440,280)
}
else if (tag == "undo") {
alert("للتراجع\nاضغط CTRL مع مفتاح Z");
}
else if (tag == "redo") {
alert("للإعادة\nاضغط CTRL مع مفتاح Y");
}
else if (tag == "keyb") {	  
if (keyboardTable.style.display == "none") {		  
event.srcElement.src = "html/toolbox/keybx.gif";
keyboardTable.style.display = "inline";
event.srcElement.alt = "إخفاء لوحة المفاتيح العربية";
}
else {		  
event.srcElement.src = "html/toolbox/keyb.gif";
keyboardTable.style.display = "none";
event.srcElement.alt = "إظهار لوحة المفاتيح العربية";
}
}
else if (tag == "colorpicker") {
var c = showColorsWindow();
if (c) {
var oSelText = Editor_getSelText();
oSelText.text = c;}
} else if (tag == "glow" || tag == "glow1" || tag == "mark" || tag == "7la1" || tag == "all1" || tag == "color") {
var oSelText = Editor_getSelText();
if (oSelText.text == "") {
alert("يرجى تظليل النص أولا");
return;
}
var c = showColorsWindow();
if (c) {
oSelText.text = "[" + tag + "=" + c + "]" + oSelText.text + "[/" + tag + "]";
}
} else if (tag == "help") {
open("help.php", "help",  "toolbar=no,scrollbars=yes,resizable=yes,width=550px,height=350px,left=50px,top=100px");
}
}
