var wid=340;
var hei=160;
var hei2=200;
var hei3=300;
var poswid=screen.width/2-wid/2;var poshei=screen.height/2-hei/2-100;
gde="width="+wid+",height="+hei+",copyhistory=no,directories=no,menubar=no,resizable=no,status=no,tollbar=no,scrollbars=no,top="+poshei+",left="+poswid;
gde2="width="+wid+",height="+hei2+",copyhistory=no,directories=no,menubar=no,resizable=no,status=no,tollbar=no,scrollbars=no,top="+poshei+",left="+poswid;
gde3="width="+wid+",height="+hei3+",copyhistory=no,directories=no,menubar=no,resizable=no,status=no,tollbar=no,scrollbars=no,top="+poshei+",left="+poswid;
var sectionhead1 = "<HTML><title>";
var sectionhead2 = "</title><style>body{font-family:Verdana;font-size:12px;}</style><BODY background='http://katalogue.org/images/fon.jpg'>";

function addscript(uslovieraboti1,uslovieraboti2){
stritog="<scr"+"ipt>function pst3(sel, kto, msid, tag1, tag2){"+uslovieraboti1+uslovieraboti2+"var messageField = opener.document.theForm.message;var selStart = messageField.selectionStart;var selEnd = messageField.selectionEnd;var MsgVal = messageField.value;"+"var text = new String();var step = new Number();messageField.focus();if(document.selection){opener.document.theForm.document.selection.createRange().text = tag1+sel+opener.document.theForm.document.selection.createRange().text+tag2;}else{if(selStart || messageField.selectionStart == '0'){step = tag1.length + sel.length + tag2.length;text = MsgVal.substring(0, selStart) + tag1 + sel;text += MsgVal.substring(selStart, selEnd) + tag2;text += MsgVal.substring(selEnd, MsgVal.length);"+"messageField.value = text;messageField.selectionStart = selStart + selEnd + step; messageField.selectionEnd = selEnd + step;}} window.close();}</sc"+"ript>";
return stritog;
}

function abbr(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка аббревиатуры"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "if (TheForm.poletwo.value=='') {window.close();return true;}";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Сокращение:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("Расшифровка:<br><input type=text name=poletwo size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[abbr title='+TheForm.poletwo.value+']',TheForm.poleone.value+'[/abbr]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function marker(){
myWindow = window.open("", "Insert", gde2);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Выделение текста"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите цвет фона (можно не указывать):<br><input class=\"color {styleElement:'myStyle',hash:true,adjust:false,pickerPosition:'bottom',pickerMode:'HSV'}\" type=text name=poleone size=37 value=''> ");
myWindow.document.write("<input id=myStyle type=text size=4 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:if(TheForm.poleone.value!=''){pst3('','','','[marker color='+TheForm.poleone.value+']','[/marker]')}else{pst3('','','','[marker]','[/marker]')}f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write('<scr'+'ipt type="text/javascript" src="http://katalogue.org/forum/forumcolor/jscolor.js"></scr'+'ipt></BODY></HTML>');
myWindow.document.close();
}

function fontcolor(){
myWindow = window.open("", "Insert", gde2);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Цвет текста"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите цвет текста:<br><input class=\"color {styleElement:'myStyle',hash:true,adjust:false,pickerPosition:'bottom',pickerMode:'HSV'}\" type=text name=poleone size=37 value=''> ");
myWindow.document.write("<input id=myStyle type=text size=4 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[font color='+TheForm.poleone.value+']','[/font]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write('<scr'+'ipt type="text/javascript" src="http://katalogue.org/forum/forumcolor/jscolor.js"></scr'+'ipt></BODY></HTML>');
myWindow.document.close();
}

function textsize(){
myWindow = window.open("", "Insert", gde3);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Размер текста"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");

myWindow.document.write("Укажите размер (от 9 до 99):<br><input type='text' name='poleone' size='25' value='30' onkeyup=\"if((this.value>8)&&(this.value<100))document.getElementById('razmer').style.fontSize=this.value+poletwo.options[poletwo.selectedIndex].value\" onkeypress=\"if((this.value>8)&&(this.value<100))document.getElementById('razmer').style.fontSize=this.value+poletwo.options[poletwo.selectedIndex].value\" onmousewheel = \"var wheelDelta = 0;var step = 1;if (!event){event = window.event;}if (event.wheelDelta){wheelDelta = event.wheelDelta/120;}else if (event.detail){wheelDelta = -event.detail/3;}position=wheelDelta*step+parseInt(poleone.value);if((position>8)&&(position<100))poleone.value=position;document.getElementById('razmer').style.fontSize=this.value+poletwo.options[poletwo.selectedIndex].value\">");

myWindow.document.write(" <input type='hidden' name='select'><select NAME='poletwo' onchange=\"if((poleone.value>8)&&(poleone.value<100))document.getElementById('razmer').style.fontSize=poleone.value+poletwo.options[poletwo.selectedIndex].value\">");
myWindow.document.write("<option value='pt'>пунктов</option><option value='px' selected>пикселей</option></select><br><br>");

myWindow.document.write("<table border=1 width=300px cellspacing=0 style='border-collapse:collapse;border:none'><tr><td width=300px valign=top style='background:#FFFF99; border:solid windowtext 1.0pt; padding:5 15 5 15;'><div style='overflow: hidden;'><span id='razmer' style='font-size:30px'>Пример</span></div></td></tr></table><br>");

myWindow.document.write("<small>*для IE и Opera доступна прокрутка размера скролом мыши</small><br><br>");

myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[size='+TheForm.poleone.value+TheForm.poletwo.value+']','[/size]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write('</BODY></HTML>');
myWindow.document.close();
}

function comment(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка комментария"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");

myWindow.document.write('Выровнить блок комментария:<br><input type="hidden" name="select"><select size=3 NAME="poleone">');
myWindow.document.write('<option value="left" selected>по левой стороне сообщения</option>');
myWindow.document.write('<option value="right">по правой стороне сообщения</option>');
myWindow.document.write('</select><br><br>');

myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[comment float='+poleone.options[poleone.selectedIndex].value+']','[/comment]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function listnumeric(){
myWindow = window.open("", "Insert", gde3);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Оформление списка"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");

myWindow.document.write('Тип маркера или тип нумерации списка:<br><br><input type="hidden" name="select"><select size=9 NAME="poleone">');
myWindow.document.write('<option value="d">сплошной кружок</option>');
myWindow.document.write('<option value="c">окружность</option>');
myWindow.document.write('<option value="s">сплошной квадрат</option>');
myWindow.document.write('<option value="1" selected>арабские цифры</option>');
myWindow.document.write('<option value="i">малые римские цифры</option>');
myWindow.document.write('<option value="I">большие римские цифры</option>');
myWindow.document.write('<option value="a">малые латинские буквы</option>');
myWindow.document.write('<option value="A">большие латинские буквы</option>');
myWindow.document.write('<option value="n">вообще убрать маркер или нумерацию</option>');
myWindow.document.write('</select><br>');
myWindow.document.write('<small>*незабудьте вставить внутрь пункты списка - [li]</small><br><br>');

myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[list='+poleone.options[poleone.selectedIndex].value+']','[/list]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function flash(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка флеш-ролика"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите полный адрес:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[flash]',TheForm.poleone.value+'[/flash]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function rutube(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка видео-ролика с rutube.ru"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите полный адрес, например, http://rutube.ru/tracks/2185075.html?v=c6fd7dc413b467563e8e08ed4d594ca5:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[rut]',TheForm.poleone.value+'[/rut]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function mp3(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка mp3"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите полный адрес:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[mp3]',TheForm.poleone.value+'[/mp3]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function mp3hosting(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка mp3 с хостинга filehoster.ru"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Зайдите на http://www.filehoster.ru и загрузите mp3-файл, ");
myWindow.document.write("после этого введите адрес полученной страницы:<br><input type=text name=poleone size=47 value=''><br>");
myWindow.document.write("<small>*например, http://www.filehoster.ru/files/bh9471</small><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[mp3hosting]',TheForm.poleone.value+'[/mp3hosting]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function mail(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка почтового адреса"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите почтовый адрес:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[mail]',TheForm.poleone.value+'[/mail]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function push(slots){
myWindow = window.open("", "Insert", gde3);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка произвольного текста"+sectionhead2);
uslovieraboti1 = "var f=true;if(TheForm.poleone.value==''){window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<scr"+"ipt>slots=\['"+slots.join("','")+"'\];</scr"+"ipt>");
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write('Выберите заготовленный текст:<br><br><input type="hidden" name="select"><select size=7 NAME="poleone" onchange="document.getElementById(\'viewer\').innerHTML=slots[poleone.selectedIndex]">');
for(j=0;j<slots.length;j++)myWindow.document.write('<option '+((j==0)?'selected':'')+' value="'+j+'">'+(slots[j].length>43 ? (slots[j].substring(0,43)+'...') : slots[j])+'</option>');
myWindow.document.write('</select><br><br>');
myWindow.document.write("<small id='viewer'>*В одно сообщение можно вставить не больше одного текста</small><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[push slot='+TheForm.poleone.value+']','');f=false;\">");
myWindow.document.write(" <input type=submit value='Вставить как текст' onClick=\"javascript:pst3('','','',slots[TheForm.poleone.selectedIndex],'');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}
               
function table(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка таблицы"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите ширину таблицы (можно не указывать):<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:if(TheForm.poleone.value!=''){pst3('','','','[table width='+TheForm.poleone.value+']','[/table]')}else{pst3('','','','[table]','[/table]')}f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function tabletr(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка ряда таблицы"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите высоту ряда (можно не указывать):<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:if(TheForm.poleone.value!=''){pst3('','','','[tr height='+TheForm.poleone.value+']','[/tr]')}else{pst3('','','','[tr]','[/tr]')}f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function tabletd(){
myWindow = window.open("", "Insert", gde2);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка ячейки таблицы"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите ширину ячейки, можно в процентах:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("Введите количество colspan:<br><input type=text name=poletwo size=47 value=''><br>");
myWindow.document.write("<small>*Оба пункта можно не заполнять.</small><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:if(TheForm.poleone.value!=''){if(TheForm.poletwo.value==''){pst3('','','','[td width='+TheForm.poleone.value+']','[/td]')}else{pst3('','','','[td width='+TheForm.poleone.value+' colspan='+TheForm.poletwo.value+']','[/td]')}}else{if(TheForm.poletwo.value==''){pst3('','','','[td]','[/td]')}else{pst3('','','','[td colspan='+TheForm.poletwo.value+']','[/td]')}}f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function edit(){
myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка текстового поля"+sectionhead2);
uslovieraboti1 = "var f=true;if (TheForm.poleone.value=='') {window.close();return true;}";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");
myWindow.document.write("Введите текст:<br><input type=text name=poleone size=47 value=''><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','','[edit]',TheForm.poleone.value+'[/edit]');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}


/* отдельное спасибо ребятам за функцию и за найденный сайт с клевым транслитом - "983" & "Прохожий" */
function callTranslit(){
window.open('http://translit.cc/mini','_blank','width=800,height=390,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,location=no');
}

function callFileHosting(){
window.open('http://katalogue.org/forum/filehosting.htm','_blank','width=600,height=380,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,location=no');
}

function filehosting(){
window.open('http://pda.webfile.ru/','_blank','width=220,height=300,resizable=yes,toolbar=no,status=no,scrollbars=no,menubar=no,location=no');
}

function resizemessage(){
if(document.getElementsByName("message")[0].rows==15)
{
document.getElementsByName("message")[0].rows=20;
document.getElementsByName("message")[0].style.height=280;
}
else
{
if(document.getElementsByName("message")[0].rows==20)
{
document.getElementsByName("message")[0].rows=30;
document.getElementsByName("message")[0].style.height=420;
}
else
{
document.getElementsByName("message")[0].rows=15;
document.getElementsByName("message")[0].style.height=210;
}}}

function pastesimbol(){
var wid=620;
var hei=260;
var poswid=screen.width/2-wid/2;
var poshei=screen.height/2-hei/2-100;
gde="width="+wid+",height="+hei+",copyhistory=no,directories=no,menubar=no,resizable=no,status=no,tollbar=no,scrollbars=yes,top="+poshei+",left="+poswid;

myWindow = window.open("", "Insert", gde);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка символа"+sectionhead2);
uslovieraboti1 = "";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write('<style type="text/css">Td{font-size:14px;border-width: 1px;vertical-align: top;border: 1px solid black;border-bottom-width: 0;border-right-width: 0;}Table{border-width: 1px;border: 1px solid black;border-left-width: 0;border-top-width: 0;}a{color: #000000;text-decoration:none; cursor: handler;}</style>');
var symbols = ['&sect; параграф', '&copy; копирайт', '&reg; зарегистрированно', '&nbsp; неразрывный пробел', '&trade; товарная марка', '&times; умножение', '&plusmn; больше/меньше', '&permil; промиля', '&#176; градус', '&#045; минус', '&#8211; дефис', '&#150; тире', '&#151; прямая речь', '&#8730; корень квадратный', '&#8800; не равно', '&#8776; примерно равно', '&#8801; тождество', '&#8804; меньше равно', '&#8805; больше равно', '&#8734; бесконечность', '&#8592; стрелка влево', '&#8593; стрелка вверх', '&#8594; стрелка вправо', '&#8595; стрелка вниз', '&#8596; стрелка влево-вправо', '&#8597; стрелка вверх-вниз', '&#0166; прерывистая вертикальная черта', '&#0945; альфа', '&#0946; бетта', '&#0947; гамма', '&#0948; дельта', '&#0949; эпсилон', '&#0960; пи'];
var colperrow=3;
myWindow.document.write("Выберите нужный вам символ:<br><br><table cellpadding=\"5\" cellspacing=\"0\">");
for(j=0;j<symbols.length;j++){
if(j % colperrow == 0)myWindow.document.write("<tr>");
myWindow.document.write("<td><a href=\"#\" onClick=\"javascript:pst3('','','',this.innerHTML.split(' ')[0],'');\">"+symbols[j]+"</a></td>");
if(j % colperrow == (colperrow-1))myWindow.document.write("</tr>");
}
myWindow.document.write("</table><br><center><input type=button value='Закрыть' onClick=javascript:window.close();></center>");
myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function pastechessboard(){
myWindow = window.open("", "Insert", gde2);
myWindow.document.open();
myWindow.document.write(sectionhead1+"Вставка шахматной доски"+sectionhead2);
uslovieraboti1 = "var f=true;";
uslovieraboti2 = "";
myWindow.document.write(addscript(uslovieraboti1,uslovieraboti2));
myWindow.document.write("<form name=TheForm onsubmit='if(f){defautselect.click();}return false;'>");

myWindow.document.write('Выберите нужный вам код:<br><br><input type="hidden" name="select"><select style="width:300px" size=4 NAME="poleone">');
myWindow.document.write('<option value="[chess][/chess]" selected>Пустой бб-тег [chess][/chess]</option>');
myWindow.document.write('<option value="[chess]rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[/chess]">Начать новую партию (fen-code)</option>');
myWindow.document.write('<option value="[chess]bRa8, bNb8, bBc8, bQd8, bKe8, bBf8, bNg8, bRh8, bPa7, bPb7, bPc7, bPd7, bPe7, bPf7, bPg7, bPh7, wPa2, wPb2, wPc2, wPd2, wPe2, wPf2, wPg2, wPh2, wRa1, wNb1, wBc1, wQd1, wKe1, wBf1, wNg1, wRh1[/chess]">Начать новую партию (описательный код)</option>');
myWindow.document.write('<option value="[chess]1p1p1p1p/p1p1p1p1/1p1p1p1p/8/8/P1P1P1P1/1P1P1P1P/P1P1P1P1[/chess]">Сыграть в шашки</option>');
myWindow.document.write('</select><br>');
myWindow.document.write("<small>* Просто так вставлять пустой бб-тег шахмат нельзя.</small><br><br>");
myWindow.document.write("<input type=submit value='Вставить' name='defautselect' onClick=\"javascript:pst3('','','',poleone.options[poleone.selectedIndex].value,'');f=false;\">");
myWindow.document.write(" <input type=button value='Закрыть' onClick=javascript:window.close();></form>");

myWindow.document.write("</BODY></HTML>");
myWindow.document.close();
}

function deactivbbtags(){
//opener.document.
theForm.message.value=theForm.message.value.replace(/\[\[b\]\[\/b\]/g,"`");
theForm.message.value=theForm.message.value.replace(/\[/ig,"[[b][/b]");
theForm.message.value=theForm.message.value.replace(/\`/g,"\[\[b\]\[\/b\]");
}

function helpmy(){
poshei4=poshei-50;
poswid4=poswid-100;
gde4="width=550,height=300,copyhistory=no,directories=no,menubar=no,resizable=no,status=no,tollbar=no,scrollbars=yes,top="+poshei4+",left="+poswid4;
myWindow = window.open("http://katalogue.org/forum/normiridium-bbtag-instruction.htm", "Insert", gde4);
}
