</div>
</td></tr>
</tbody></table></body>
<script type="text/javascript">
devdate=new Date();
var y="";
// 
y=devdate.getFullYear()
var m="";
//
m=devdate.getMonth()+1
var c="";
//
c=devdate.getDate();
var d="";
//
d=devdate.getDay();
var dp=""
dp=y+"-"+m+"-"+c+"-"+d
dp1=c+"."+m+"."+y
  var mob=false;
  var isMobile = {
    Android: function() {
    return navigator.userAgent.match(/Android/i);
    },
    BlackBerry: function() {
    return navigator.userAgent.match(/BlackBerry/i);
    },
    iOS: function() {
    return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    },
    Opera: function() {
    return navigator.userAgent.match(/Opera Mini/i);
    },
    Windows: function() {
    return navigator.userAgent.match(/IEMobile/i);
    },
    any: function() {
    return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    }
    };
    if(isMobile.any()){
    mob=true
    if (navigator.userAgent.indexOf("Android 2")>0 || navigator.userAgent.indexOf("Android 1")>0 ) 
     {}
     else
	 {
//	 mob=false
	 }
    }
//mob=true
var retu=location.href
window.onload=function ()
{
w=<?php   if (isset($_GET['scr'])) {echo trim($_GET['scr']);} else {echo "0";} echo "\r\n" ?>
//
if (document.all["rep1"]!=undefined)
{alert(document.all["rep1"].innerHTML)
}
else
{if (document.all["rep"]!=undefined)
{alert(document.all["rep"].innerHTML)
}}
if (mob)
{document.all["bod"].style.overflow=""
 if (w!=0)
{obj=document.all["bod"];
}
 //window.top.document.all["ifrpp"].height=100        // 
 }
else
{if (retu.indexOf("-card-file")>0) //
{window.document.getElementById('giir').style.height=window.document.getElementById('ppp').offsetHeight
window.document.getElementById('giir').style.width=window.document.getElementById('ppp').offsetWidth
window.document.getElementById('gip1').style.height=window.document.getElementById('ppp').offsetHeight
window.document.getElementById('gip1').style.width=window.document.getElementById('ppp').offsetWidth
window.document.getElementById('ziir').style.height=window.document.getElementById('ppp').offsetHeight
window.document.getElementById('ziir').style.width=window.document.getElementById('ppp').offsetWidth
window.document.getElementById('zip1').style.height=window.document.getElementById('ppp').offsetHeight
window.document.getElementById('zip1').style.width=window.document.getElementById('ppp').offsetWidth
}
else
{window.top.document.getElementById('giir').style.height=window.top.document.getElementById('ppp').offsetHeight-150
window.top.document.getElementById('ziir').style.height=window.top.document.getElementById('ppp').offsetHeight-150
//window.top.document.getElementById('giir').style.width=window.top.document.getElementById('ppp').offsetWidth-150
window.top.document.getElementById('gip1').style.height=window.top.document.getElementById('ppp').offsetHeight-100
window.top.document.getElementById('gip1').style.width=window.top.document.getElementById('ppp').offsetWidth-100
//window.top.document.getElementById('ziir').style.width=window.top.document.getElementById('ppp').offsetWidth-150
window.top.document.getElementById('zip1').style.height=window.top.document.getElementById('ppp').offsetHeight-100
window.top.document.getElementById('zip1').style.width=window.top.document.getElementById('ppp').offsetWidth-100
}
document.all["ta"].style.height=ppp.offsetHeight -80;
document.all["ta"].style.width=ppp.offsetWidth-15
if (w!=0)
{obj=document.all["ta"];
obj.scrollTop=w;
obj.scrollTop=w;
obj.scrollTop=w;
}}
document.all["ppp"].style.height=document.all["tab"].offsetHeight;
//document.all["plan"].style.height=document.all["tab"].offsetHeight;
document.all["ppp"].style.width=document.all["tab"].offsetWidth;
//document.all["plan"].style.width=document.all["tab"].offsetWidth;
}

//***********************************
// 
//***********************************
function test8(j)
{jj=j.parentNode.parentNode
if (jj.tagName!="FORM")
{jj=j.parentNode
}
if (jj.elements[0].value=="" || jj.elements[1].value=="")
{alert("Fields are not filled! Fill in and repeat!")
}
else
{poz1=retu.indexOf("/pages/")
poz2=retu.indexOf(".php")
w=retu.substring(poz1+7,poz2+4)
if (document.all["k"]!=undefined)
{src=document.all["k"].scrollTop}
else
{src=0}
if (mob)
{jj.action="../pages/"+w+"?vis="+mg+"&scr="+src+"&scr1="+document.all["bod"].scrollTop+"&td="+dp
jj.elements["sub"].click()
}
else
{jj.action="../pages/"+w+"?vis="+mg+"&scr="+src+"&scr1="+document.all["k2"].scrollTop+"&td="+dp
jj.elements["sub"].click()
}}}

function test(j)
{jj=j.parentNode.parentNode
if (jj.tagName!="FORM")
{jj=j.parentNode
}
if (jj.elements[0].value=="" || jj.elements[1].value=="")
{alert("Fields are not filled! Fill in and repeat!")
}
else
{poz=retu.indexOf(".php")
retu=retu.substring(0,poz)+".php"
if (retu.indexOf("-card-file")>0) //
{}
else
{if (mob)
{jj.action=retu+"?scr="+document.all["bod"].scrollTop+"&td="+dp
}
else
{jj.action=retu+"?scr="+document.all["ta"].scrollTop+"&td="+dp
}}
/////
//alert(j.parentNode.innerHTML)
jj.elements["sub"].click()
}}

function top1(j)
{obj=document.all["ta"];
obj.scrollTop=0;
}

function test1(j)
{jj=j.parentNode.parentNode.parentNode.parentNode.parentNode
var retu=location.href
poz=retu.indexOf(".php")
retu=retu.substring(0,poz)+".php"
if (retu.indexOf("-card-file")>0) //
{}
else
{if (mob)
{jj.action=retu+"?scr="+document.all["bod"].scrollTop+"&td="+dp
}
else
{jj.action=retu+"?scr="+document.all["ta"].scrollTop+"&td="+dp
}}
jj.elements["sub"].click()
}

function q1(t,p)
{p.href="../../../"+t+"?vis=&scr=&td="+dp
p.click
}

//***********************************
//
//***********************************
//
var zs =document.getElementById("ta").getElementsByTagName("IMG");
var itek=0;   //
var iauto="";
var imax=0;    //
/////////
/////////
function pon(p)  //
{if (mob)
{document.all["im"].style.height=""  //300
document.all["im"].style.width=""  //450
rew=a_i(2)
}
else
{document.all["im"].style.width="";
document.all["im"].style.height="";
}
im.style.visibility="visible"
}
///////// 
var tm;
function av(j)
{ tm=setInterval(v, 5000);
 document.all["p_s1"].innerHTML="START, 5 sec.";
}
////// 
function v(j)
{rew=a_f(j);
}
//////
function st()
{clearInterval(tm);
document.all["p_s1"].innerHTML="STOP";
}
//// 
function a_i(p)
{a_ih=parseInt(document.all["im"].offsetHeight)  // 
a_iw=parseInt(document.all["im"].offsetWidth)   // 
a_ih2=parseInt(document.all["pic_d"].offsetHeight)  // 
a_iw2=parseInt(document.all["pic_d"].offsetWidth)   // 
if (a_ih2<=a_iw2)        //
{document.all["im"].style.height=a_ih2
}
else                   //
{document.all["im"].style.width=a_iw2;
}
a_ih=parseInt(document.all["im"].offsetHeight)  //
a_iw=parseInt(document.all["im"].offsetWidth)   //

if (a_ih>a_ih2)
{document.all["im"].style.width=""
document.all["im"].style.height=a_ih2 
}
else
{if (a_iw>a_iw2)
{document.all["im"].style.width=a_iw2 
document.all["im"].style.height="" 
}}}

var pic = new Array()
//////////////////////////////////////////////////////
rewscr=0
function a(j)
{if (mob)
{document.all["pic_d"].style.height=300 //h.offsetHeight-400;
document.all["pic_d"].style.width=550  //h.offsetWidth-300;
rewscr=document.body.scrollTop //document.getElementById('bod').scrollTop
document.body.scrollTop=0
}
else
{if (retu.indexOf("-card-file")>0) // 
{document.all["pic_d"].style.height=h.offsetHeight-100;
document.all["pic_d"].style.width=h.offsetWidth-200;
}
else
{document.all["pic_d"].style.height=h.offsetHeight-200;
document.all["pic_d"].style.width=h.offsetWidth-300;
}}
document.all["po"].innerHTML=j.title;
im.style.visibility="hidden"
k=0;
if (imax==0 )   //
{for(var i=0; i<zs.length; i++)
{if (zs[i].id!="")
{pic[k++]=i;
}}
imax=k;
}
im.src=j.id;
for(var i=0; i<pic.length; i++)
{if (zs[pic[i]].id==j.id) {break;}
}
itek=i;
kar.style.display="";
document.all["p_s"].innerHTML="&nbsp;&nbsp;&nbsp;"+(itek+1)+"/"+imax;
ppp.style.visibility="visible";}
//***********************************
// 
//***********************************
function b(j)
{im.src="";
clearInterval(tm);
document.all["p_s1"].innerHTML="";
document.all["p_s"].innerHTML="";
ppp.style.visibility="hidden";
kar.style.display="none";
document.getElementById('bod').scrollTop=rewscr
}

//***********************************
// 
//***********************************
function a_f(j)
{itek++;
//im.style.visibility="hidden"
if (itek>imax-1) {itek=0;} 
im.src=zs[pic[itek]].id;
document.all["p_s"].innerHTML="&nbsp;&nbsp;&nbsp;"+(itek+1)+"/"+imax;
document.all["po"].innerHTML=zs[pic[itek]].title;
}

//***********************************
// 
//***********************************
function a_b(j)
{itek--;
//im.style.visibility="hidden"
if (itek<0) {itek=imax-1;} 
im.src=zs[pic[itek]].id;
document.all["p_s"].innerHTML="&nbsp;&nbsp;&nbsp;"+(itek+1)+"/"+imax;
document.all["po"].innerHTML=zs[pic[itek]].title;
}
//***********************************
// 
//***********************************
function a_auto(j)
{}

//***********************************
// 
//***********************************
function a_begin(j)
{itek=0;
//im.style.visibility="hidden"
im.src=zs[pic[itek]].id;
document.all["p_s"].innerHTML="&nbsp;&nbsp;&nbsp;"+(itek+1)+"/"+imax;
document.all["po"].innerHTML=zs[pic[itek]].title;
}

//***********************************
// 
//***********************************
function a_end(j)
{itek=imax-1;
im.src=zs[pic[itek]].id;
document.all["p_s"].innerHTML="&nbsp;&nbsp;&nbsp;"+(itek+1)+"/"+imax;
document.all["po"].innerHTML=zs[pic[itek]].title;
}

//***********************************
// 
//***********************************
function karp(p)
{if (retu.indexOf("-card-file")>0) 
{newscr=window.top.document.all["ifrpp"].src.replace("be=0","be="+window.top.mmg[p+1])
window.top.document.all["ifrpp"].src=newscr
window.top.document.all["be"].innerHTML=p+1
window.top.itek=p+1
}}

// 
function list_all(p,nt)
{pm=p.parentNode.parentNode.getElementsByTagName(nt)
pim=p.parentNode.getElementsByTagName("IMG")
if (p.src.indexOf("minus.gif")>0)
{for(var j = 0; j < pim.length; j++)       // 
{pim[j].src="../../../../d~e~f/plus.gif"}
for(var j = 1; j < pm.length; j++)       // 
{pm[j].style.display="none"}
}
else
{for(var j = 0; j < pim.length; j++)       // 
{pim[j].src="../../../../d~e~f/minus.gif"
}
for(var j = 0; j < pm.length; j++)       // 
{pm[j].style.display=""}
for(var j = 0; j < pm.length; j++)       // 
{pm[j].style.display=""}
}
if (mob)  //
{//document.all["bod"].scrollTop=p.parentNode.offsetTop
document.all["bod"].scrollTop=p.parentNode.offsetTop+document.getElementById("zagg").offsetHeight
}
else
{document.getElementById("ta").scrollTop=p.parentNode.offsetTop
}}
// 
function list_z(p,nt)
{tek=p.parentNode.getElementsByTagName(nt)[0].style
if (tek.display=="")
{tek.display="none"
p.src="../../../../d~e~f/plus.gif"}
else
{tek.display=""
p.src="../../../../d~e~f/minus.gif"}}

// 
function konsp2(p)
{p.scrollIntoView() 
tek=p.parentNode.parentNode.getElementsByTagName("div")[0]
if (tek.style.display=="")
{tek.style.display="none"
p.src="../../../../d~e~f/plus.gif"}
else
{tek.style.display=""
p.src="../../../../d~e~f/minus.gif"}
if (mob)  // 
{//document.all["bod"].scrollTop=tek.parentNode.offsetTop
document.all["bod"].scrollTop=tek.parentNode.offsetTop+document.getElementById("zagg").offsetHeight
}
else
{document.getElementById("ta").scrollTop=tek.parentNode.offsetTop}
}

//*********************************************************
function konsp(p)  // 
//********************************************************
{t2=p
if (t2.id!="s")                     //
{for(var j = 0; j <9999 ; j++)  
{t2=t2.parentNode
if (t2.lang=="ko")
{break}
}}
t22=t2
mt2=t2.getElementsByTagName("div")  //
for(var j = 0; j <9999 ; j++)  
{if (mt2[j].id=="kons")
{t2=mt2[j]
break}
}
if (t2.style.display=="")
{t2.style.display="none"
p.src="../../../../d~e~f/plus.gif"}
else
{t2.style.display=""
p.src="../../../../d~e~f/minus.gif"}
if (mob)  //
{document.all["bod"].scrollTop=t22.offsetTop   //+document.getElementById("sap").offsetHeight-20
}
else
{document.getElementById("ta").scrollTop=t22.offsetTop  //-20
}}

//******************************************************
// 
//******************************************************
function ziie(j)
{if (mob)    // 
{window.top.document.getElementById('bod').scrollTop=knn}
if (j==2 || j==4)
{ppp.style.visibility="hidden"
zii.style.display="none"
gii.style.display="none"
document.getElementById("buh").style.background="#dcdcdc"
document.getElementById("buh2").style.background="#dcdcdc"
return
}
phtml=false
if (j==3)
{mid='ziir'
mmm2=" "+document.getElementById("buh2").style.background
if (mmm2.indexOf("white")>0) phtml=true
}
else if (j==1)
{mid='giir'
mmm2=" "+document.getElementById("buh").style.background
if (mmm2.indexOf("white")>0) phtml=true
}
tags44=document.getElementById(mid).value

if (tags44.indexOf("/#")>=0 || tags44.indexOf("#/")>=0)
{alert("/ #, # /  character pairs found.\r\n Delete them, or end selection and redo.")
return
}

tags4=tags44.split("¶¶") 
tags5=tags.split("<#>") 
pos=false
if (phtml)    //
{if (" "+tags44.indexOf("¶¶")>0) 
{pos=true}
else
{qwe2=tags44}
}
else          //
{if (tags5.length!=tags4.length) 
{pos=true}
else
{for (i=0;i<=tags4.length-1;i++) 
{tags44=tags44.replace("¶¶",tags5[i])
}
qwe2=tags44
}}
if (pos)
{alert("Saving is impossible! \r\n Was deleting or adding \r\n separator characters ¶¶."+
"\r\n Start over!")
return
}




if (!code_check("<div>"+qwe2+"</div>"))      //
{return}	
document.getElementById("buh2").style.background="#dcdcdc"
document.getElementById("buh").style.background="#dcdcdc"
document.getElementById("but2").style.background="#dcdcdc"
document.getElementById("but").style.background="#dcdcdc"
if (j==1)   //
{document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eg_e"].value=qwe2
document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eg_sav"].click();
}
else if (j==3)   //
{document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zk_e"].value=qwe2
document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zk_sav"].click();
}
ppp.style.visibility="hidden";
zii.style.display="none";
gii.style.display="none";
}

//*****************************************************
function gip(j)
{//document.getElementById('bod').scrollTop=document.getElementsByTagName('iframe')['ifr'].contentWindow.rewscr
document.getElementById("ppp").style.visibility="hidden";
document.getElementById("gip").style.display="none";
if (mob)    // 
{window.top.document.getElementById('bod').scrollTop=knn
}}

//******************************************************
function zip(j)
{document.getElementById("ppp").style.visibility="hidden";
document.getElementById("zip").style.display="none";
if (mob)    //  
{window.top.document.getElementById('bod').scrollTop=knn
}}

//****************************************************************************
//  
function getCaretPos2(p,event) 
//***************************************************************************
{if (p.id=="ziir")
{mbut="but2"}
else
{mbut="but"}
mmm=p.parentNode.parentNode.parentNode.parentNode.parentNode     //  
obj2=mmm.getElementsByTagName("INPUT")[0]
mmm2=" "+document.getElementById(mbut).style.background
if (mmm2.indexOf("white")==0)
{alert("Pasting is only possible in hidden tag mode. \r\n Click TXT and repeat!")
return
}
obj=mmm.getElementsByTagName("TEXTAREA")[0]  
obj.focus();
scrw=obj.scrollTop
vte=0
  if (document.selection) 
  { // IE
    var sel = document.selection.createRange();
	vte=sel.text.length
    if (vte!=0) return
    var clone = sel.duplicate();
    sel.collapse(true);
    clone.moveToElementText(obj);
    clone.setEndPoint('EndToEnd', sel);
    re= clone.text.length;
  } 
  else if (obj.selectionStart!==false) 
  {if (obj.selectionStart!=obj.selectionEnd)
   {return}
  re= obj.selectionStart; 
  }
  else 
  {re= 0;}
  if (obj2.value=="")
{
return
}
  mmm= obj.value
	if (re==obj.innerHTML.length)
	{obj.value=mmm+obj2.value}
	else
	{obj.value=mmm.substr( 0, re)+ obj2.value+
	mmm.substr(re)
	}
  obj.scrollTop=scrw
  }
//*****************************************************
// 
//function vin(p)
var vta2t=""
function vta2(p,event)
//*******************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.tagName!="A") return
//****************************************************
{minput=p.parentNode.parentNode.parentNode.getElementsByTagName("INPUT")  //   input
for(var j = 0; j < minput.length; j++)       //  
{if (minput[j].id=="inn")                       //    
{j2=j
break
}}
tin=t.innerHTML.replace(new RegExp("&nbsp;",'g'),"")
if (tin=="date")
{minput[j2].value=' '+Date().toString()+' '
} 
else if (tin=="LI")
{minput[j2].value='<LI>'
} 
else if (tin=="OL")
{minput[j2].value='<OL><LI> first <LI> second <LI> third</OL>'} 
else if (tin=="UL")
{minput[j2].value='<UL><LI> first <LI> second <LI> third</UL>'} 
else if (tin=="HR")
{minput[j2].value='<HR>'
} 
else if (tin=="BR")
{minput[j2].value='<BR>'
} 
else if 
(tin=="N")
{minput[j2].value='\r\n'+'<br>&#160;&#160;&#160;'
} 
else
{minput[j2].value=tin
vta2t=t.innerHTML
}}}
//********************************************
//  
function zvin2(p)
//*******************************************
{mmm=p.parentNode.parentNode.parentNode.parentNode.parentNode
vin=mmm.getElementsByTagName("INPUT")[0]
vin.value=""
}
//********************************************
//  
function zvin3(p)
//*******************************************
{mmm=p.parentNode.parentNode.parentNode.parentNode.parentNode
vin=mmm.getElementsByTagName("TEXTAREA")[0]
vin.value=""
tags=""
}
var oldvta=""
button_HTML_TXT=""
//********************************************
//  
function vta(p,event)  
//*******************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
mmm=p.parentNode.parentNode.parentNode.parentNode.parentNode     //  
mmm.getElementsByTagName("INPUT")[0].value=""                    // 
obj=mmm.getElementsByTagName("TEXTAREA")[0]  
if (obj.id=="ziir")
{mbut="but2"}
else
{mbut="but"}
mmm2=" "+document.getElementById(mbut).style.background
if (mmm2.indexOf("white")==0)
{alert("Tagging is only possible in hidden tag mode. \r\n Click TXT and repeat!")
return
}
mmg=obj.value.split("/#")
mmg2=obj.value.split("#/")
if  (oldvta!="")
{oldvta.style.background="#dcdcdc"
}
if (t.tagName!="A") return
t.style.background="yellow"
oldvta=t
if (t.style.color!="")
{colo=t.style.color}
else
{colo="#4682b4"}
ppp2=t.innerHTML.replace(new RegExp("&nbsp;",'g'),"")            //t.innerHTML
// IE---------------------------------------------------------------------------
if (document.selection)    
{var sel = document.selection.createRange();
vte=sel.text.length
// 
//-------------------
if (vte!=0)       //  
{if	(sel.text.indexOf("<")>=0 || sel.text.indexOf(">")>=0 || sel.text.indexOf("¶")>=0 )
{alert("Incorrect selection, \r\n invalid characters in it:  <,>,¶") 	
return	
}	
	if (ppp2=="A")
	{sel.text=sel.text.toUpperCase()}
	else if (ppp2=="a")
	{sel.text=sel.text.toLowerCase()}
	else if (ppp2=="«»")
	{sel.text="«"+sel.text+"»"}
	else if (ppp2=="BR")
	{sel.text=+sel.text+"<BR>"}
	else if (ppp2=="LI")
	{sel.text="<LI>"+sel.text}
	else if (ppp2=="HR")
	{sel.text=sel.text+"<HR>"}
	else if (ppp2=="H1" || ppp2=="H2"  || ppp2=="H3" || ppp2=="H4"  || ppp2=="H5"  || ppp2=="H6")
	{sel.text="<"+ppp2+" style=color:"+colo+">"+sel.text+"</"+ppp2+">"}
else
{sel.text="<"+ppp2+" style=color:"+colo+">"+sel.text+"</"+ppp2+">"
}}}
//--------------------------------------------
else     // 
//--------------------------------------------
{start= obj.selectionStart;
end=obj.selectionEnd;
if (start!=end)                   // 
{vte=1
sel_text=obj.value.substr(start,end-start)	
if 	(sel_text.indexOf("<")>=0 || sel_text.indexOf(">")>=0 || sel_text.indexOf("¶")>=0 )
{alert("Incorrect selection, \r\n invalid characters in it:  <,>,¶") 	
return	
}
  if (ppp2=="A")
	{obj.value = obj.value.substr( 0, start)+obj.value.substr(start,end-start).toUpperCase()+obj.value.substr(end)}
	else if (ppp2=="a")
	{obj.value = obj.value.substr( 0, start)+obj.value.substr(start,end-start).toLowerCase()+obj.value.substr(end)}
	else if (ppp2=="«»")
	{obj.value = obj.value.substr( 0, start )+"«"+obj.value.substr(start,end-start)+"»"+obj.value.substr(end)}
	else if (ppp2=="BR")
	{obj.value = obj.value+"<BR>"}
	else if (ppp2=="LI")
	{obj.value="<LI>"+obj.value}
	else if (ppp2=="HR")
	{obj.value=obj.value+"<HR>"}
	else if (ppp2=="H1" || ppp2=="H2"  || ppp2=="H3" || ppp2=="H4"  || ppp2=="H5"  || ppp2=="H6")
	{	obj.value = obj.value.substr( 0, start )+"<"+ppp2+" style=color:#4682b4>"+obj.value.substr(start,end-start)+"</"+ppp2+">"+obj.value.substr(end)
	}
	else
{{obj.value = obj.value.substr( 0, start )+"<"+ppp2+" style='color:"+colo+"'>"+obj.value.substr(start,end-start)+"</"+ppp2+">"+obj.value.substr(end)
}}}}
//  
//-------------------------------------
if  (mmg.length!=mmg2.length)
{alert("There is a mismatch in the number of heads (/#) and tails (#/) characters in the text field! \r\n Select correctly and repeat! ")
 return}
else
{if  (mmg.length==1)         // 
 {}
 else                        //     
 {obj.value =obj.value.replace(/\/\#/g,"<"+ppp2+" style=color:"+colo+">")
 obj.value =obj.value.replace(/\#\//g,"</"+ppp2+">")
}}	
if (mmg.length==1 && vte==0)
{alert("No highlighting, no highlighting with symbols /# #/! \r\n Highlight the required text and repeat!")}	
if (window.getSelection)                    // 
{window.getSelection().removeAllRanges()
} 
else 
{document.selection.empty()               //   IE
}}

function gip6(p,event)   // this
//*******************************************
{if (p.id=="zip1")
{mscr="cbzip"
}
else
{mscr="cbgip"
}
if (document.getElementById(mscr).src.indexOf("no.gif")>0) return
ev = event || window.event
var t = ev.target || ev.srcElement
if (t.id=="blq" || t.id=="gip1" || t.id=="zip1" || t.tagname=="TABLE"  ) return
try {t.outerHTML=t.innerHTML
	  throw {message: "Forbidden!"}
	} catch (e) {
	return 
}}

//**********************************************
// 
function atip2(p)
//*********************************************
{//if (document.getElementById("tde")!=undefined)
//{
if (p.src.indexOf("no.gif")>0)
{p.src="../../../../d~e~f/yes.gif"}
else
{p.src="../../../../d~e~f/no.gif"}
}
//************************************
//  
function gip7(p,event)   // this
//*******************************************
{if (p.id=="gip10")
{if (document.getElementById("cbgip").src.indexOf("yes.gif")>0)  // 
{if (document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eg_e"].value=="")
{return}
mmm=document.getElementById("gip1").innerHTML
if (mmm.indexOf("</TEXTAREA>")>0)
{rzd="</TEXTAREA>"}
else if (mmm.indexOf("</textarea>")>0)
{rzd="</textarea>"}
mmg=document.getElementById("gip1").innerHTML.split(rzd)
document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eghtml"].style.display=""
document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eg_e"].value=mmg[1];
document.getElementsByTagName('iframe')['ifr'].contentWindow.document.getElementById("feg").elements["eg_sav"].click();
}}
if (p.id=="zip10")
{if (document.getElementById("cbzip").src.indexOf("yes.gif")>0)  
{if (document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zk_e"].value=="")
{return}
mmm=document.getElementById("zip1").innerHTML
if (mmm.indexOf("</TEXTAREA>")>0)
{rzd="</TEXTAREA>"}
else if (mmm.indexOf("</textarea>")>0)
{rzd="</textarea>"}
mmg=document.getElementById("zip1").innerHTML.split(rzd)
document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zkhtml"].style.display=""
document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zk_e"].value=mmg[1];
document.getElementsByTagName('iframe')['ifrzk'].contentWindow.document.getElementById("fzk").elements["zk_sav"].click();
}}
document.getElementById("cbgip").src="../../../../d~e~f/no.gif"
document.getElementById("cbzip").src="../../../../d~e~f/no.gif"
document.getElementById("ppp").style.visibility="hidden";  
document.getElementById("gip").style.display="none";
document.getElementById("zip").style.display="none";
if (mob)    //
{window.top.document.getElementById('bod').scrollTop=knn
}}
//********************************************************
//  HTML 
function but2(p)
//*******************************************************
{if (p.style.background=="white") return
if (p.id=="buh2")
{mid='ziir'}
else
{mid='giir'}
tags44=document.getElementById(mid).value
tags44=tags44.replace(/\r/g,"")
tags44=tags44.replace(/\n/g,"")
tags4=tags44.split("¶¶") 
tags5=tags.split("<#>") 
if (tags5.length!=tags4.length && tags4.length>1 )
{alert("No conversion possible! \r\n The \r\n separator characters ¶¶ have been removed or added. \r\n Start over! ")
return
}
if (p.id=="buh2")
{document.getElementById("buh2").style.background="white"
document.getElementById("but2").style.background="#dcdcdc"
}
else
{document.getElementById("buh").style.background="white"
document.getElementById("but").style.background="#dcdcdc"
}
qwe2=""
for (i=0;i<=tags4.length-1;i++) 
{if (i==0)
{qwe2=qwe2+tags4[i]+"\r\n"+tags5[i].replace(/></g,">\r\n<")
}
else
{qwe2=qwe2+"\r\n"+tags4[i]+"\r\n"+tags5[i].replace(/></g,">\r\n<")
}}
document.getElementById(mid).value=qwe2
}
//********************************************************
var tags = ""                     //  
//********************************************************
//                                 TXT but
function but3(p)
//********************************************************
{if (p.id=="but2")
{document.getElementById("but2").style.background="white"
document.getElementById("buh2").style.background="#dcdcdc"
mid='ziir'
}
else
{document.getElementById("but").style.background="white"
document.getElementById("buh").style.background="#dcdcdc"
mid='giir'
}
// 
tags3=document.getElementById(mid).value
document.getElementById(mid).value=tags3.replace(/\.\./g,"")
ktex=document.getElementById(mid).value
qwe=ktex.replace(/\r/g,"")
qwe=qwe.replace(/\n/g,"")
qwe=qwe.replace(/></g,"~~")
qwe=qwe.replace(/> </g,"~~")
qwe=qwe.replace(/>  </g,"~~")
qwe=qwe.replace(/>   </g,"~~")
qwe=qwe.replace(/>    </g,"~~")
qwe=qwe.replace(/</g,"¶¶")
qwe=qwe.replace(/>/g,"¶¶")
qwe=qwe.replace(/~~/g,"><")
mmm=qwe.split("¶¶")
tt=""
pzz=""
tags=""
for (i=0;i<=mmm.length-1;i++) 
{kdo=""
kposle=""
if (i%2==1)                           // 
{tt="<"+mmm[i]+">"
tags=tags+tt+"<#>"                    //  
tt=" "+tt.toUpperCase()
pzz=pzz+"\r\n¶¶"
}
else                                  //  
{pzz=pzz+mmm[i]
}}
document.getElementById(mid).value=pzz
}
//***************************************************
function utag(p)  // 
//***************************************************
{if (confirm("All tags will be removed, \r\n sure you want this?"))
{document.getElementById(mid).value=document.getElementById(mid).value.replace(/¶¶/g,"")
tags=""
}
if (!code_check("<div>"+document.getElementById(mid).value	+"</div>"))      // 
{return}
www9=document.getElementById(mid).value	
if (www9.indexOf("<")>=0)
{while (www9.indexOf("<")>=0)
{poz_begin=www9.indexOf("<")
poz_end=www9.indexOf(">")
www9=www9.substr(0,poz_begin)+www9.substr(poz_end+1)
}}
document.getElementById(mid).value=www9
}
//**********************************************************
// 
function getsel(p) 
//*********************************************************
{minput=p.parentNode.parentNode.parentNode.getElementsByTagName("INPUT")  //   input
for(var j = 0; j < minput.length; j++)       //  
{if (minput[j].id=="inn")                       //    
{j2=j
break
}}
  minput[j2].value=""       // 
  var obj=p.parentNode.parentNode.parentNode.getElementsByTagName("TEXTAREA")[0]  //  
//  obj.focus();
  if (document.selection) 
  { // IE
    var sel = document.selection.createRange();
	vte=sel.text.length
    if (vte==0) 
	{alert("No selection in text field! \r\n Highlight and repeat!")
		return
    }
    ppp2=p.title.substr(0,1)
    if (ppp2=="1")
	{sel.text=sel.text.toUpperCase()}
	else if (ppp2=="2")
	{sel.text=sel.text.toLowerCase()}
	else
	{sel.text="«"+sel.text+"»"}
}
  else if (obj.selectionStart!==false) 
  {start= obj.selectionStart;
  end=obj.selectionEnd;
  if (start==end) 
  {  alert("No selection in text field! \r\n Highlight and repeat!")
  return
  }
  ppp2=p.title.substr(0,1)
    if (ppp2=="1")
	{obj.value = obj.value.substr( 0, start)+obj.value.substr(start,end-start).toUpperCase()+obj.value.substr(end)
	}
	else if (ppp2=="2")
	{obj.value = obj.value.substr( 0, start)+obj.value.substr(start,end-start).toLowerCase()+obj.value.substr(end)}
	else
	{obj.value = obj.value.substr( 0, start )+"«"+obj.value.substr(start,end-start)+"»"+obj.value.substr(end)}
  }
  else 
  {}
  }
//*****************************************************
//  
function vin(p)
//****************************************************
{minput=p.parentNode.parentNode.parentNode.getElementsByTagName("INPUT")  //  input
for(var j = 0; j < minput.length; j++)       //  
{if (minput[j].id=="inn")                       //   
{j2=j
break
}}
if (p.innerHTML=="date")
{minput[j2].value=' '+Date().toString()+' '
} 
else
{minput[j2].value=p.innerHTML
}} 
//*********************************************************************************
//  
function getCaretPos(p) 
//********************************************************************************
{minput=p.parentNode.parentNode.parentNode.getElementsByTagName("INPUT")  //  input
for(var j = 0; j < minput.length; j++)       // 
{if (minput[j].id=="inn")                       //     
{j2=j
break
}}
 p.parentNode.elements[1].focus();
if (minput[j2].value=="") return                                          // input   
  var obj = p.parentNode.elements[1]                                      // 
  if (document.selection) 
  { // IE
    var sel = document.selection.createRange();
	vte=sel.text.length
    if (vte!=0) return
    var clone = sel.duplicate();
    sel.collapse(true);
    clone.moveToElementText(obj);
    clone.setEndPoint('EndToEnd', sel);
    re= clone.text.length;
  } 
  else if (obj.selectionStart!==false) 
  {if (obj.selectionStart!=obj.selectionEnd)
   {return}
  re= obj.selectionStart; 
  }
  else 
  {re= 0;}
	mmm= obj.value
	if (re==obj.innerHTML.length)
	{obj.value=mmm+minput[j2].value}
	else
	{obj.value=mmm.substr( 0, re)+ minput[j2].value+
	mmm.substr(re)
	}}

//********************************************
// 
function zvin(p)
//*******************************************
{minput=p.parentNode.parentNode.parentNode.getElementsByTagName("INPUT")  //   input
for(var j2 = 0; j2 < minput.length; j2++)       // 
{if (minput[j2].id=="inn")                       //     
{minput[j2].value=''
break
}}}
//************************************
// 
function gip8(p,event)   // this
//*******************************************
{ttt=p.parentNode.parentNode.parentNode.parentNode.parentNode.id
dop=window.open("","","");
tnap="<HTML><HEAD><META http-equiv=Content-Type content='text/html; charset=windows-1251'></head>"
if (ttt=="zip")
{ng="<h2>NOTEBOOK</h2>"
tnap=tnap+"<center>"+document.getElementById("sname4").innerHTML+"<br>"+ng+"<br>"+"</center>"+document.getElementById(ttt+"1").innerHTML+"</html>"
}
else
{ng="<h2>DIARY</h2>"
tnap=tnap+"<center>"+document.getElementById("sname3").innerHTML+"<br>"+ng+"<br>"+"</center>"+document.getElementById(ttt+"1").innerHTML+"</html>"
}
dop.document.write(tnap)
}
//********************************************************************
function tabtop()   // 
//********************************************************************
{mzag=document.getElementById("zagg").getElementsByTagName("h1")
//mmm="<h1>"+mzag[0].innerHTML+"</h1>"
tnap="<HTML><HEAD><META http-equiv=Content-Type content='text/html; charset=windows-1251'></head>"
tnap=tnap+"<h2 style='text-align:center'>"+document.getElementById("sname2").innerHTML+"</h2>"+
"<h2 style='text-align:center'>"+document.getElementById("zagvs").innerHTML+"</h2>"
tnap=tnap+document.getElementById("ta").innerHTML
tnap=tnap.replace(/onclick/g,"oncl")
tnap=tnap+"</html>"
dop=window.open("","","");
dop.document.write(tnap)
}
//*******************************************************************
 function to_change() // 
 //******************************************************************
 {if (document.selection) 
 { // IE
    var sel = document.selection.createRange();
	vte=sel.text.length
 if (vte==0) 
 {alert("There is no selection in the text field! \r\n Select a fragment and repeat! ")
 return
 }
 else
{if (sel.text.indexOf("#/")>=0 || sel.text.indexOf("/#")>=0) 	
{alert("The selection contains /# or #/! \r\n This is not permissible! \r\n Fix it and repeat!")}	
else
{sel.text="/#"+sel.text+"#/"}
}}
//-----------------------------------------------------------
else if (obj.selectionStart!==false)   // 
{start= obj.selectionStart;
end=obj.selectionEnd;
 if (start==end) 
  {alert("There is no selection in the text field! \r\n Select a fragment and repeat! ")
 return
 }
 else
 { obj.value = obj.value.substr( 0, start )+obj.value.substr(end)}
 }} 
//*******************************************************************************
 function to_change_del(p)   // 
 //******************************************************************************
 {www10=document.getElementById(p).value 
www10=www10.replace(/\/#/g,"")
www10=www10.replace(/#\//g,"")	 
document.getElementById(p).value=www10 
if (window.getSelection)                    //  
{window.getSelection().removeAllRanges()
} 
else 
{document.selection.empty()               //  IE
}}
//*******************************************************************
 function to_change() //  
 //******************************************************************
 { if (document.selection) 
 {var sel = document.selection.createRange(); // IE
vte=sel.text.length
 if (vte==0) 
 {alert("There is no selection in the text field! \r\n Select a fragment and repeat! ")
 return
 }
 else
{if (sel.text.indexOf("#/")>=0 || sel.text.indexOf("/#")>=0) 	
{alert("The selection contains /# or #/! \r\n This is not permissible! \r\n Fix it and repeat!")
return
}	
else if (sel.text.indexOf("¶")>=0 || sel.text.indexOf(">")>=0 || sel.text.indexOf("<")>=0 ) 	
{alert("The selection contains ¶,>,< ! \r\n This is unacceptable! \r\n Correct and repeat!")
return
}
else
{sel.text="/#"+sel.text+"#/"}
}}
//-----------------------------------------------------------
else if (obj.selectionStart!==false)   // 
{start= obj.selectionStart;
end=obj.selectionEnd;
if (start==end) 
{alert("There is no selection in the text field! \r\n Select a fragment and repeat! ")
 return
}
 else
{sel_text=obj.value.substr(start,end-start)
if (sel_text.indexOf("#/")>=0 || sel_text.indexOf("/#")>=0) 	
{alert("The selection contains /# or #/! \r\n This is not permissible! \r\n Fix it and repeat!")
return
}	
else if (sel_text.indexOf("¶")>=0 || sel_text.indexOf(">")>=0 || sel_text.indexOf("<")>=0) 	
{alert("The selection contains ¶,>,< ! \r\n This is unacceptable! \r\n Correct and repeat!")
return
}
else
{obj.value=obj.value.substr( 0, start)+"/#"+obj.value.substr(start,end-start)+"#/"+obj.value.substr(end)		
}}}
if (window.getSelection)                    //  
{window.getSelection().removeAllRanges()
} 
else 
{document.selection.empty()               //   IE
}} 
 
//*******************************************************************************
 function to_change_del(p)   //  
 //******************************************************************************
 {www10=document.getElementById(p).value 
www10=www10.replace(/\/#/g,"")
www10=www10.replace(/#\//g,"")	 
document.getElementById(p).value=www10 
if (window.getSelection)                    //  
{window.getSelection().removeAllRanges()
} 
else 
{document.selection.empty()               // IE
}}

//*******************************************************************************
 function by_point(p)   // 
 //******************************************************************************
 {www10=document.getElementById(p).value 
www10=www10.replace(/\./g,".\r\n")
document.getElementById(p).value=www10 
 }
</script>
<script src="../../../../code_check.js"></script>    
</html>