<?php
header('Content-Type: text/html; charset=windows-1251'); 
header('X-XSS-Protection: 1');   // 
 //  echo  htmlspecialchars($zzz, ENT_QUOTES);
//***************************************************************************************************
include "f.php";   //
//**************************************************************************
function spic($sw) //
//**************************************************************************
{$mpic="#";                                   //
$sw3=str_replace('src=""',"",$sw);            //
$sw3=str_replace('"',' ',$sw3);               //
$sw3=str_replace('>',' ',$sw3);               //
$sw3=str_replace('&',' ',$sw3);               //
$msrc1 = explode('pages/'.$sm, $sw3);	      //
foreach ($msrc1 as $i => $val)    
{if ($i>0)
{$mval=explode(' '.$sm, $val);                //
$mpic=$mpic."#".$mval[0];                     //
}}
return $mpic."#";
}
?>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Create a page!</title>
<style>
<?php  include "plan/css.htm";  // ?>
a {color:#254A6C;font-family:tahoma;font-size:12px;font-weight:normal;}
.redlink {color:#B92327;font-family:tahoma;font-size:11px;font-weight:normal;}
.bluelink {color:#254A6C;font-family:tahoma;font-size:11px;font-weight:normal;}
a:hover {color:white;font-family:tahoma;font-size:12px;font-weight:normal;background:black}
h2,p,font,blockquote,pre,marquee,table {CURSOR: default}
</style>
</head>
<?php
if (file_exists(getcwd ( )."/otd/2.txt"))
{echo '<body leftMargin=0 id=bod topMargin=0  style="overflow:hidden;background:silver;">';
echo '<table id=monoz  border=0 style="width:100%;height:100%;
z-index:3;position:absolute;top:0px;left:0px;">
<tr ><td width=30%>&nbsp;</td><td width=30%  valign=center align=center>
<table border=0 width=400 style="background:white" >
<tr><td><IMG height=60 border=0 src="d~e~f/pas.jpg"></td>
<td  height=30px ><center><b style="color:red" >ATTENTION !'.
'</b></center><br>
<ol>
<li> THE ADMINISTRATOR closed the site to carry out work on its reorganization!
<li> The site will be available after completion of work!
<li> For information, contact your ADMINISTRATOR!
<li> Close site
<li> Check back later!</ol>
</td></tr>
</table>
</td><td width=30%>&nbsp;</td></tr></table></body></html>';
die;
}
?>
<script src="code_check.js"></script>

<script type="text/javascript">








//******************************************************************************************************
function finf()                                                      //
//******************************************************************************************************
{
if (wpa!="")                                                        // 
{wpa.close()}
if (document.getElementById("htm").readOnly)
{alert("No change!")
return}	
tex2=document.getElementById("htm").value
document.getElementById("htm").value=tex2.replace(/></g,">\r\n<")
if (tex2=="")
{return
}

tex22=tex2.replace(/"/g,"")
tex22=tex22.toLowerCase()
tex22=tex22.replace(/(^\s*)|(\s*)$/g, '')              //
//ev = event || window.event
//var t = ev.target || ev.srcElement

//--------------------------------------------------------------------------------
if (document.getElementById("H").checked )           // 
//--------------------------------------------------------------------------------
{
mtex22=tex22.split(">")
w6=mtex22[0].replace('id="s"','id=s')   // 
w6=w6.replace('title="','title=')
if (w6.indexOf("title="+document.getElementById("row").value)<0 || w6.indexOf("id=s")<0)
{alert( "The required attributes of the first tag\r\n have been removed or changed: id=s, title= "+document.getElementById("row").value +" \r\nEnter and/or correct attributes and repeat!")
return
}



//alert(document.getElementById("htm").value)
if (!code_check(document.getElementById("htm").value))      //
{return}	

//*********************************************************************
tex2=tex2.replace(/<!-ss->/g," ")                      //
tex2=tex2.replace(/\r\n/g,"")
document.getElementById("html").value=tex2             //
//alert(document.getElementById("html").value)
}  
//*************************************************************************************************
  else                                              //
//**************************************************************************************************
{
if (obj.innerHTML.indexOf("``")>0)                 // 
{mobj=obj.outerHTML.split("``")
tex2=tex2.replace(/</g,"&lt;")
tex2=tex2.replace(/>/g,"&gt;")
document.getElementById("html").value=mobj[0]+tex2+mobj[2]
}
else
{obj1.innerHTML=tex2
tex2=obj1.innerHTML.replace(/</g,"&lt;")
tex2=tex2.replace(/>/g,"&gt;")
obj1.innerHTML=tex2
document.getElementById("html").value=obj.outerHTML               // 
}}
 document.getElementById("vvv").click()
 document.getElementById("htm").readOnly=true
}

obj1=""       //
obj2=""       //
obj6=""       //

//****************************************************************************
 function sf(event)  //
//****************************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
document.getElementById("repo").innerHTML=""                 //
if (t.tagName=="INPUT" && t.id.substr(0,1)=="u")             //
{return}
if (t.id=="k" )                                              //
{document.getElementById("repo").innerHTML="<b style=color:red>Slip! Click an object!</b>"
document.getElementById("htm").value=""
return
}
document.getElementById("H").checked=false
document.getElementById("rta").disabled=true                   //
document.getElementById("rli").disabled=true                   //
document.getElementById("pa").disabled=true
document.getElementById("scroll").value= document.getElementById("k").scrollTop  // 
document.getElementById("col").value=""     
//*************************************************
if (t.tagName=="B" && t.id!="s" &&  t.parentNode.id=="k")  
//******************************************************************
{
document.getElementById("sfil").innerHTML="NUM"  
mnum=t.innerHTML.replace(/&nbsp;/g,"")
num=mnum.split(" -")[0]                             // 
document.getElementById("row").value= num
//alert(document.getElementById("k").outerHTML)
mobjk= document.getElementById("k").getElementsByTagName("*") 
if (mobjk.length==0)
{alert("Damaged object! Delete it!")
return
}

for(var j = 0; j <mobjk.length ; j++)                //
{obj=mobjk[j]                                        //
if  (obj.innerHTML.indexOf("``")>0)                  //
{obj6=""                                             //
mobj=obj.outerHTML
obj.outerHTML=mobj.replace(/``/g,"")
}}

for(var j = 0; j <mobjk.length ; j++)                // 
{
if (mobjk[j].title==num && mobjk[j].id=="s" )       //
{
obj=mobjk[j]                                        //
mmm=obj.outerHTML.replace(/></g,">\r\n<")
mmm=mmm.replace(/(^\s*)|(\s*)$/g, '')              // 
//alert(mmm)

obj1=obj                                           //
break
}}
//*******************************************************************
//  
if  (obj.lang=="PA")
{
document.getElementById("pa").disabled=false
document.getElementById("htm").readOnly=true
document.getElementById("H").checked=true
document.getElementById("repo").innerHTML="<b style=color:red> Click the 'PA' button to edit.</b>"
}
else
{document.getElementById("pa").disabled=true
document.getElementById("htm").readOnly=false
}
if  (obj.innerHTML.indexOf("linkshtml.htm")>0  || obj.innerHTML.indexOf("links.htm")>0)
{document.getElementById("htm").readOnly=true 
document.getElementById("htmr1").readOnly=true 
document.getElementById("H").checked=true
document.getElementById("htm").value=mmm
document.getElementById("repo").innerHTML="<b style=color:red>Link Tables HTML Code - View Only! </b>"
return
}

if  (obj.innerHTML.indexOf("action=")>0  || obj.innerHTML.indexOf("tc/tc.txt")>0 || 
obj.innerHTML.indexOf(" tg/tg.txt")>0 || obj.innerHTML.indexOf("tq/tq.txt")>0 )
{document.getElementById("htm").readOnly=true 
document.getElementById("htmr1").readOnly=true 
document.getElementById("H").checked=true
document.getElementById("htm").value=mmm
document.getElementById("repo").innerHTML="<b style=color:red>Form HTML Code - View Only! </b>"
return
}

//***************************************************************************************
mobjk= obj.getElementsByTagName("*")                 //
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].tagName=="FORM"  || mobjk[j].id=="cal" || mobjk[j].id=="ifr" || mobjk[j].id=="eva" || mobjk[j].id=="zk" ||
mobjk[j].id=="eg")
{document.getElementById("repo").innerHTML="<b style=color:red>HTML code for gadgets, forms, pictures - preview only! </b>"
break
}}
if (document.getElementById("repo").innerHTML!="")
{document.getElementById("htm").readOnly=true 
document.getElementById("htmr1").readOnly=true 
document.getElementById("H").checked=true

document.getElementById("htm").value=mmm 
return
}
else
{document.getElementById("htm").value=mmm
document.getElementById("delet").value=mmm 
htm=true
document.getElementById("H").checked=true
return
}}                    //
if (t.tagName=="A")   //
{return}
//********************************************************************************************************************************************
//
document.getElementById("sfil").innerHTML="OBJ"  
t2=t
if (t2.id!="s")                     // 
{for(var j = 0; j <9999 ; j++)  
{t2=t2.parentNode
if (t2.id=="s")
{break}
}}
obj1=t                                //
obj=t2                                // 
mmm=obj.outerHTML.replace(/></g,">\r\n<")
mmm=mmm.replace(/(^\s*)|(\s*)$/g, '')  
if  (obj.innerHTML.indexOf("linkshtml.htm")>0  || obj.innerHTML.indexOf("links.htm")>0
|| obj.innerHTML.indexOf("tc/tc.txt")>0
|| obj.innerHTML.indexOf("tg/tg.txt")>0
|| obj.innerHTML.indexOf("tq/tq.txt")>0
)
{document.getElementById("htm").readOnly=true 
document.getElementById("htmr1").readOnly=true 
document.getElementById("htm").value=mmm
document.getElementById("repo").innerHTML="<b style=color:red>View only!</b>"
return
}
if  (obj.lang=="PA" && obj1.tagName!="IMG")
{document.getElementById("pa").disabled=false
document.getElementById("htm").value=mmm
document.getElementById("htmr1").readOnly=true 
document.getElementById("htm").readOnly=true
document.getElementById("H").checked=true
document.getElementById("repo").innerHTML="<b style=color:red> Click the 'PA' button to edit.</b>"

}
document.getElementById("row").value=t2.title      //
// 
if (obj6!="" && obj6.tagName!="IMG" )
{if (obj6.outerHTML.indexOf("``")>=0)
{if (window.getSelection)                    // 
{window.getSelection().removeAllRanges()
} 
else 
{document.selection.empty()               // 
}
if (obj1.id=="lin")                      // 
{if (obj6=="")                           // 
{return}
if (obj6.id=="lin")                      // 
{obj6.innerHTML=obj6.innerHTML.replace(/``/g,"")
document.getElementById("repo").innerHTML="<b style=color:red>You cannot link to a link!</b>"
document.getElementById("htm").value=""
obj6=""
return
}
obj20=obj1.outerHTML.split(">")[0]+">"   // 
mmm=obj6.innerHTML
mmm=mmm.replace("``",obj20)
mmm=mmm.replace("``","</u>")             //
obj6.innerHTML=mmm                       //
obj7=obj6                                //
if (obj7.id!="s")                        //
{for(var j = 0; j <9999 ; j++)  
{obj7=obj7.parentNode
if (obj7.id=="s")
{break}
}}
mid=obj7.id
mtitle=obj7.title
obj7.click()
document.getElementById("htm").readOnly=false
w=obj7.outerHTML.replace(/(^\s*)|(\s*)$/g, '')  

//w=w.replace('"mid"','mid')
//w=w.replace('"title"','title')


document.getElementById("htm").value=w
document.getElementById("H").checked=true
finf()
return
}
else
{obj6.innerHTML=obj6.innerHTML.replace(/``/g,"")
document.getElementById("repo").innerHTML="<b style=color:red>Re-selection cancels selection!</b>"
document.getElementById("htm").value=""
obj6=""
return
}}
else
{document.getElementById("htm").value=""
obj6=""
return
}}
//*************************************** 
if (document.selection)  // IE
{var sel = document.selection.createRange();
vte=sel.text.length
if (vte>0)                                                  // 
{if (sel.htmlText.indexOf("<")<0)                           // 
{document.getElementById("htm").value=sel.text              // 
document.getElementById("htm").readOnly=false  
document.getElementById("H").checked=false
sel.text="``"+sel.text+"``"                                 // 
document.getElementById("repo").innerHTML="<b>The edited text fragment is indicated by the symbols ``. The use of this pair of characters in the text of the object is FORBIDDEN!<br>Re-selection in the same text will cancel the selection!</b>"
document.selection.empty()
obj2=obj
obj6=obj1

return
}}
}
//************************************************************
else       // 
{obj6=obj1
var selection = window.getSelection();
if (selection!="")                           //
{var selRange = selection.getRangeAt(0);
var tt7 = selRange.startContainer.data,
	start = selRange.startOffset,
	end = selRange.endOffset;
if (start!=end)                             //
{selRange.startContainer.data=tt7.substr( 0, start )+"``"+tt7.substr(start,end-start)+"``"+tt7.substr(end)
document.getElementById("htm").value=tt7.substr(start,end-start)
document.getElementById("H").checked=false
window.getSelection().removeAllRanges()
obj2=obj
obj6=obj1
document.getElementById("htm").readOnly=false  
return
}
else
{window.getSelection().removeAllRanges()
document.getElementById("htm").value=""
obj6=""
}
}}

if  (obj1.innerHTML.indexOf(">")>=0 && obj6=="")
{
document.getElementById("htm").readOnly=true 
document.getElementById("htmr1").readOnly=true 
document.getElementById("htm").value=mmm 
document.getElementById("repo").innerHTML="<b style=color:red>There are tags - view only! </b>"
return
}







//*****************************************************
if (obj1.tagName=="IMG")
//*************************************************************************
{if (obj1.alt=="")               //
{document.getElementById("repo").innerHTML="<b style=color:red>Pictures of gadgets and lists are not editable.</b>"
document.getElementById("htm").value=""
return
}
ev.cancelBubble = true           //
ev.returnValue = false
document.getElementById("htm").value=t.parentNode.parentNode.parentNode.title 
document.getElementById("col").value= t.alt
 if  (t.parentNode.tagName=="A")
{document.getElementById("kor").innerHTML=t.parentNode.outerHTML}
 else
{document.getElementById("kor").innerHTML=t.outerHTML}
document.getElementById("podp").value=t.title
document.getElementById("ppp").style.visibility="visible"
document.getElementById("imgopen").style.display=""
}
//*****************************************************
else if (obj1.tagName=="TD" || obj1.tagName=="TH" )
//*************************************************************************
{
if (obj.innerHTML.indexOf('name="nv"')>0)
{return
}

document.getElementById("H").checked=false
mobj= obj.getElementsByTagName("TABLE") 
if (mobj.length>0)
{if  (mobj[0].id=="eg" || mobj[0].id=="cal")   //
{document.getElementById("repo").innerHTML="<b style=color:red>Gadget tables are not editable.</b>"
return
}}
else
{objt=t
document.getElementById("rta").disabled=false
}}

//*****************************************************************************************
else if (obj1.tagName=="LI" || obj1.tagName=="OL" || obj1.tagName=="UL")
//*************************************************************************************************************
{if (obj1.outerHTML.indexOf("minus.gif")>0)
{document.getElementById("repo").innerHTML="<b style=color:red>Internal tags are not editable! <br> Use selection to edit!</b>"
return
}
if (obj1.tagName=="LI" &&  obj1.outerHTML.indexOf("minus.gif")<0)
 {document.getElementById("rli").disabled=false}
 else
   {document.getElementById("rli").disabled=true}
}
//****************************************************************************************************************
else if (obj1.innerHTML.indexOf("<")>0 || obj1.tagName=="INPUT" || obj1.tagName=="TEXTAREA" || obj1.tagName=="BUTTON")
{document.getElementById("repo").innerHTML="<b style=color:red>Inside tags or input fields, click different!</b>"
document.getElementById("htm").value=""
return
}
document.getElementById("htm").readOnly=false          //
document.getElementById("htm").value=obj1.innerHTML
}

//*****************************************************************************
function for_kar() // 
//*****************************************************************************
{if (obj1.parentNode.tagName=="A")
{otex=obj1.parentNode.href
motex=otex.split("img=")[1].split("&p")[0]
document.getElementById("im").src=motex
}
else if (obj1.id!="")
{document.getElementById("im").src=obj1.id
}
else
{alert("Big picture not installed!")
return
}
document.getElementById("kar").style.display=""
}
</script>

<body id=bod  leftMargin=0 topMargin=0   background="d~e~f/bkg4.gif" style="visibility:hidden" onkeydown=kc(event.keyCode)> 
<div id=ppp style="z-index:2;opacity:0.3;visibility:hidden;height:100%;width:100%;position:absolute;top:0;left:0;background:black;filter:alpha(opacity=30)">&#160;&#160;&#160;</div>
<div  id=kp2  
style="z-index:7;OVERFLOW: auto;position:absolute;width:400px;height:300px;
top:0px;left:0px;background:#fffacd;display:none;border:brown 2px solid ">
<table width=100%><tr><td width=99% align=center>
<h3>Briefly</h3>
</td>
<td>
<button style=width:30 onclick="kp2.style.display='none'">X</button> 
</td></tr></table>
<li> <b> Changing text: </b> - mouse cursor on it and click, or select a part of the text with the left mouse button pressed.
or click number and click 'TXT' </li>
<li> <b> Change HTML code </b> - mouse cursor to number and click. </li>
<li> <b> To save </b> click 'SAVE'. </li>
<li> <b> Working with a picture </b> - click on it.
<li> <b> Text - link: </b> using the "Links", "LL", "L" buttons place links near the object with the text, select the text with the mouse and click the link.
<li> <b> Filter </b> - click a number or object. In the filter field, enter the filter text. Click 'select'.</div>

<div  onclick="kar.style.display='none'"   id=kar title="Click me to close" style="z-index:7;OVERFLOW: auto;position:absolute;width:50%;height:50%;
top:0px;left:0px;display:none;background:silver"><h3 style="text-align:center">Big picture</h3>
<img id=im border=2   src="">
</div>
<!---       -->
<table border=0 bordercolor=red HEIGHT=100% width=100% style="position:absolute;top:0;left:0">
<tbody>
<tr>
<td colspan=2>
<b style="color:red;font-family:tahoma;font-size:12px;font-weight:bold;">WEBSITE:</b> 
<b style="color:#316290;font-family:tahoma;font-size:12px;font-weight:bold;" id=sname2>
<?php
include "plan/name.txt";
?>
</b>

</td>

</tr>
<tr>
<td valign=top>
<center><b style="color:#316290">PAGE OBJECTS</b></center>
<div id=div style="background:silver;position:absolute;top:0;left:15;visibility:hidden;  HEIGHT:80% ;border:darkblue thin solid">
<textarea name=red ></textarea>
</div>
<?php
if (isset ($_REQUEST['from']))     // 
{$from=trim($_REQUEST['from']);}
else
{$from=""; 
} 
if (isset($_GET['utf8']))
{$utf8=$_GET['utf8'];}
else
{$utf8="";}
if (isset ($_REQUEST['utf8']))    //
{$utf8=$_REQUEST['utf8'];}
//
if (isset ($_REQUEST['scroll'])) 
{$scroll=$_REQUEST['scroll'];}
else
{$scroll=0;}
if (isset ($_REQUEST['tex'])) 
{$tex=stripslashes ($_REQUEST['tex']);
 $tex=htmlspecialchars($tex, ENT_QUOTES);}
else
{$tex="";}
if (isset ($_REQUEST['zag'])) 
{$zag=stripslashes ($_REQUEST['zag']);
 $zag=htmlspecialchars($zag, ENT_QUOTES);}
else
{$zag="";}
if (isset ($_REQUEST['p'])) 
{$p=stripslashes ($_REQUEST['p']);
 $p=htmlspecialchars($p, ENT_QUOTES);}
else
{$p="";}
$_REQUEST['index']=1;            // 
$ps=false;                       // 
$os=""; 						 // 
if (isset ($_REQUEST['nam']))
{$nam=$_REQUEST['nam'];}
else
{$nam=$_GET['nam'];} 
if (isset ($_REQUEST['fol']))
{$fol=$_REQUEST['fol'];}
else
{ $fol=$_GET['fol'];} 
if (isset ($_REQUEST['site']))
{$site=$_REQUEST['site'];}
else
{$site=$_GET['site'];} 
$nam1=str_replace(".htm","",$site);
$priz=false;                        //
$prizg=false;                       //
if (strpos($site,"/contents/")>0)   //
{$f='/pages/'.$site;                //
list($s1, $s2,$s3,$s4,$s5) = explode("/",$site);
$nam=str_replace(".htm","",$s5);
//*****************************************************************************************
//  
//*****************************************************************************************
//
$_fohtm=getcwd ( ).'/pages/'.$s1."/". $s2."/".$s3."/".$s5;
//
$_fohtm_='pages/'.$s1."/". $s2."/".$s3."/".str_replace(".htm",".php",$s5);
//
$_fophp=getcwd ( ).'/pages/'.$s1."/". $s2."/".$s3."/".$s5;
//
$_frhtm=getcwd ( ).'/pages/'.$s1."/". $s2."/".$s3."/".$s4."/".$s5;
//
$_pohtm=getcwd ( ).'/pages/'.$s1."/". $s2."/".$s3;
if (strpos($s3,"_0")>0)                       // 
{if (strpos($s3,"v")==0)                      // 
{$fhelp=$_pohtm."/help.php";
if (!file_exists($fhelp))                     // 
{$ww1=  fopen($fhelp, 'w') or exit;
$sfh='<?php 
list($abs1, $s2) = explode("pages",getcwd( ));
include $abs1."abegin.php";
echo "tmp";
include $abs1."abegin1.php";
$os="";
$ff=getcwd( )."/'.$s5.'";
include $abs1."time.php";
include $abs1."aend.php";
?>';
fwrite($ww1,$sfh);                          // 
fclose($ww1);                               // 
}}}
//
$_prhtm=getcwd ( ).'/pages/'.$s1."/". $s2."/".$s3."/".$s4;
//
$imf=$s5;
}
else if (strpos(" ".$site,"plan/")>0)   //
{
//***************************************************************************************
// 
//***************************************************************************************
list($s1, $s2,$s3,$s4) = explode("/",$site);
$nam="Main - ".str_replace(".htm","",$s4);
$prizg=true;                             //
//
$_fohtm=getcwd ( )."/".$s1."/". $s2."/".$s4;
//
$_fohtm_="../gidra";
//
$_fophp=getcwd ( )."/".$s1."/". $s2."/".$s4;
//
$_frhtm=getcwd ( )."/".$site;
//
$_pohtm=getcwd ( )."/".$s1."/". $s2;
//
$_prhtm=getcwd ( ).'/'.$s1."/". $s2."/".$s3;
//
$imf=$s4;
$im=str_replace(".htm","",$s4);
}
else                                // 
{list($im, $ext) = explode(".",$site);
$im1=$im;
$priz=true;                         // 
//*************************************************************************
// 
//*************************************************************************
//
$_fohtm=getcwd ( ).'/pages/'.$im.'/'.$site;
//
$_fohtm_='pages/'.str_replace(".htm",".php",$site);
//
$_fophp=getcwd ( ).'/pages/'.$im.'/'.str_replace(".htm",".php",$site);
//
$_frhtm=getcwd ( ).'/pages/'.$im.'/'.$im.'/'.$site;
//
$_pohtm=getcwd ( ).'/pages/'.$im;
//
$_prhtm=getcwd ( ).'/pages/'.$im.'/'.$im;
//
$imf=$site;
}
$div='<div id=k onclick=sf(event) style="border:grey 2px solid;OVERFLOW: scroll; background:white';
$div1="";
if (file_exists($_prhtm.'/'.'_begin.txt'))   //
{$zz=true;}
else
{$zz=false;}
//include "zsite2/1.php";
//#***************************************************************************
 if (isset ($_REQUEST['pas']))              //
//****************************************************************************
{$pas=$_REQUEST['htm'];
$fpas=$_pohtm.'/p.txt';
if ($_REQUEST['htm']=="*"  )                //
{if  (file_exists($fpas))  
  {unlink ($fpas);
  }
  $os=$os. '<b style="color:red">Password CANCELED! </b>';
}
else                                       // 
{ $ww1=  fopen($fpas, 'w') or exit;        // 
 fwrite($ww1,md5($pas,false));             // 
 fclose($ww1);
 $os=$os. '<b style="color:red">Password ENTERED OR CHANGED! </b>';
}
}
//include "zsite2/2.php";
//#************************************************************************************************************************
 if (isset ($_REQUEST['buf']))                   //
//************************************************************************************************************************
{$nus=" ".$_REQUEST['htm'];
 $ff=$_frhtm;
 $l = file($ff); 					             //
 $ww1=  fopen($_prhtm.'/_del.txt', 'w') or exit; //
 foreach ($l as $li => $lin)                     //
  {if (strpos($nus,",u".$li.",")>0)              //
   {fwrite($ww1,$lin);
   }                                             // 
 }
 fclose($ww1);
$os=$os. '<b style="color:green">Objects '.str_replace("u","",substr($nus,2)).' in the buffer! !</b>';
}
//include "zsite2/3.php";
//#*****************************************************************************************************************************
 if (isset ($_REQUEST['del1']) or isset ($_REQUEST['del2']))   //
//*****************************************************************************************************************************
{// del1 - 
 // del2 - 
 $nus=" ".$_REQUEST['htm'];                       //
//echo  htmlspecialchars($nus, ENT_QUOTES);  
if (isset ($_REQUEST['del1']))
{$bbuf=true;}
else
{$bbuf=false;}
$i=-1;
 $ff=$_frhtm;
 $l = file($ff); 					              // 
 $w = fopen($ff, 'w') or exit;  	              // 
 if ($bbuf)
 {$ww1=  fopen($_prhtm.'/_del.txt', 'w') or exit; // 
 }
 foreach ($l as $li => $lin)                      // 
  {// 
  if (strpos($nus,",u".$li.",")>0) 
   {if ($bbuf)
   {fwrite($ww1,$lin);}
   }
   else                    
    {$poz=strpos($lin,">");			               // 
    $tag=explode(" ",substr($lin,0,$poz));         // 
     $tagw="";						               // 
     foreach ($tag as $k => $z)                    // 
     {if (substr($z,0,6)=="title=")                // 
      {$tagw=$tagw.'title='.++$i." ";
	  }
	 else
	 {$tagw=$tagw.$z." ";
	 }} 
   fwrite($w,trim($tagw).substr($lin,$poz));
   }
 } //
 fclose($w);
 if ($bbuf)
 {fclose($ww1);}
$os=$os. '<b style="color:green">Objects: '.str_replace("u","",substr($nus,2)).'removed!</b>';
 }  //
include "zsite2/4.php";
//include "zsite2/5.php";
//#**************************************************************************************************************************
if (isset ($_REQUEST['og']))    //
//***************************************************************************************************************************
{$nus=0;                       // 
 $zzz=trim($_REQUEST['html']); // 
$zzz=str_replace('http://'.trim($_SERVER['SERVER_NAME']).'/gidra/','',$zzz);
 $zzz= stripslashes($zzz);
//echo  htmlspecialchars($zzz, ENT_QUOTES);  
 $ff=$_frhtm;
   $ka=1;                                        //
   $i=0; 							             //
   $l = file(wu($ff,$utf8)); 					 //
   $w = fopen(wu($ff,$utf8), 'w') or exit;  	 //
   fwrite($w,$zzz."\r\n");                       //
   foreach ($l as $li => $lin)                   //
   {

if ($li==0 and strpos($lin,"Contents")>0)      //
	 {}
	 else
	 {$za=$lin;
$za=str_replace("<A ","<a ",$za);
$za=str_replace("</A>","</a> ",$za);
//echo $za."<br>";
 //echo  htmlspecialchars($za, ENT_QUOTES)."<hr>";

	  $p1=strpos($za,"<a name=");
	  if ($p1>0 )                                 //
	  {
$p2=strrpos($za,"</a>");                    //
	    if ($p2>0)   // and $p2-$p1<20)
		{$za=substr($za,0,$p1).substr($za,$p2+4);}
	  }
$za=str_replace("</H2>","</h2>",$za);
$za=str_replace("</H3>","</h3>",$za);
if (strstr($za,"</h2") or strstr($za,"</h3>"))                  //
{
$mza=explode(">", $za);	
$mza[1]="<a name=s00".$ka++."></a>".$mza[1];
$za=implode(">", $mza);
}
	  $poz=strpos($za,">");			              //
      $tag=explode(" ",substr($za,0,$poz));       //
      $tagw="";						              //
      foreach ($tag as $k => $z)                  //
      {if (substr($z,0,6)=="title=")              //
       {$tagw=$tagw.'title="'.(++$i).'" ';
	   }
	   else
	   {$tagw=$tagw.$z." ";
	   }
      } 
      fwrite($w,stripslashes($tagw.substr($za,$poz)));
     }} // 
    fclose($w);
	$os=$os.'<b style="color:green">Contents formed!</b>';
}
//include "zsite2/6.php";
//#*********************************************************************************************************************
 if (isset($_REQUEST['t_ins']))      // 
//*********************************************************************************************************************
 { $nus=$_REQUEST['row']; 					 // 
   if ($nus!="")                             // 
   { $ff=$_frhtm;
     $l = file(wu($ff,$utf8)); 				 // 
     $w = fopen(wu($ff,$utf8), 'w') or exit; // 
     foreach ($l as $li => $lin)             // 
     {if ($li==$nus)  					     // 
      {fwrite($w,trim(  stripslashes($_REQUEST['htm']))."\r\n");
	   } //
     else {fwrite($w,  stripslashes($lin));} //
    } 
    fclose($w);
	$os=$os.'<b style="color:green">Parameters for temporary display of objects are accepted!</b>';
}
else
{$os=$os. '<b style="color:red">Object for display parameters is not selected!</b>';
}}
//include "zsite2/7.php";
//#************************************************************************************************************************
 if (isset($_REQUEST['vvv']))          // 
//***********************************************************************************************************************
 {if (isset ($_REQUEST['html']))      
  {$nus=$_REQUEST['row'];              // 
   $zzz=trim($_REQUEST['html']);       // 
   $zzz=str_replace("\r",'',$zzz);
   $zzz=str_replace("\n",'',$zzz);
   $zzz=str_replace('http://'.trim($_SERVER['SERVER_NAME']).'/gidra/','',$zzz);
   $zzz=stripslashes($zzz);            // 
 //  echo  htmlspecialchars($zzz, ENT_QUOTES);
   $nus=trim($_REQUEST['row']); 		//
   if ($nus!="")                        //
   {$ff=$_frhtm;
     $l = file(wu($ff,$utf8)); 					 // 
     $w = fopen(wu($ff,$utf8), 'w') or exit;  	 // 
     foreach ($l as $li => $lin)                //  
     {if ($li==$nus)  					        // 
      {fwrite($w,$zzz."\r\n");}
      else 
	  { fwrite($w,$lin); }                     // 
    } 
    fclose($w);
	$os=$os. '<b style="color:green">Replacement in the object completed!</b>';
   }
else
{$os=$os. '<b style="color:red">No object selected!</b>';
}}}

include "zsite2/8.php";
//include "zsite2/9.php";
//#*********************************************************************************************************************** 
 if (isset ($_REQUEST['p_ins']))       // 
//***********************************************************************************************************************
{$l = file($_frhtm); 				    //
$w = fopen($_frhtm, 'w') or exit;  	    //
$is=0;
foreach ($l as $li => $lin)             //
 {fwrite($w,$lin);$is++;}               //
  $z='<div id=s title='.$is.' time="0">&#160;&#160;&#160;&#160;&#160;Enter text and/or html code.</div>'; //
  fwrite($w,$z."\r\n"); 
  fclose($w);
$os=$os. '<b style="color:green">Text is inserted at the end!</b>';
$scroll=999999;
} 
include "zsite2/10.php";
include "zsite2/11.php";
include "zsite2/12.php";
include "zsite2/13.php";
include "zsite2/14.php";
include "zsite2/15.php";
include "zsite2/16.php";
include "zsite2/17.php";
include "zsite2/18.php";
//include "zsite2/19.php";
//#**************************************************************************************************************************************
if (isset ($_REQUEST['imgm']) or isset ($_REQUEST['pimg'])  or isset ($_REQUEST['imgb']))  //
//**************************************************************************************************************************************
{
if ($_FILES['new']['name']!="") 
 {if (is_uploaded_file($_FILES['new']['tmp_name']))
{ $mti=array("GIF" =>1,"JPG" =>2,"JPEG" =>2,"PNG" =>3,"SWF" =>4,"PSD" =>5,"BMP" =>6,"TIFF_II" =>7,"TIFF_MM" =>8,"JPC" =>9,
 "JP2" =>10,"JPX" =>11,"JB2" =>12,"SWC" =>13,"IFF" =>14,"WBMP" =>15,"XBM" =>16); 
$mpi=getimagesize($_FILES['new']['tmp_name']);          //
list($nad1,$exp)=explode('.',$_FILES['new']['name']);   //
     $izf2=tr($nad1).".".$exp;                          //
	 $izf2=strtolower($izf2);                           //
	 $izf2=str_replace(" ","_",$izf2);

if (file_exists($_prhtm.'/'.$izf2))                     // 
{$fcod=file_get_contents ($_frhtm);                     //  
if (strstr($fcod,$izf2))                                // 
{$os= "<b style=color:red>Cancel, file ".$_prhtm.'/'.$izf2." already loaded! </b>"; 
}
else                                                    // 
{unlink ($_prhtm.'/'.$izf2);	
}}	 
if ($os!="")
{}
else
{$exp=strtoupper ($exp);                                 //
// 
if ($mti[$exp]!=$mpi[2])
{$os= "<b style=color:red>Mismatch in picture extension ".$exp.",  type.". array_search($mpi[2], $mti)."</b>"; 
}
else
{$size_img=GetImageSize($_FILES["new"]["tmp_name"]);
 $width=$size_img[0] ;                  // 
 $height=$size_img[1] ;                 // 
 $nus=$_REQUEST['row']; 			    // 
 $col=$_REQUEST['col'];				    // 
 if ($col!="")  					    // 
 {$l = file($_frhtm); 				    // 
//echo  htmlspecialchars($_frhtm, ENT_QUOTES);  

  $w = fopen($_frhtm, 'w') or exit;     // 
   foreach ($l as $li => $lin)          // 
    {if ($li==$nus)  				    // 
     {$mtag = explode("<", $lin);	
	 foreach ($mtag as $ti => $tag)      //
{
//echo  htmlspecialchars($tag, ENT_QUOTES);  
if (strstr($tag,"alt=".trim($col)." ") or  strstr($tag,'alt="'.trim($col))) 
{$timg=trim($_REQUEST['html']);   		  //
 $timg=str_replace('http://'.trim($_SERVER['SERVER_NAME']).'/gidra/','',$timg);
	 if (isset ($_REQUEST['imgm']))       // 
     {$timg=str_replace("<img ","<img height=".$height." width=".$width." ",$timg);  //
     } 
  if (strtoupper(substr($mtag[$ti-1],0,2))=="A ")   // 
     {$mtag[$ti-1]="*";
     $mtag[$ti+1]="*";
	 }
	 list($nad1,$exd1)=explode('.',$_FILES['new']['name']);   //
     $izf=tr($nad1).".".$exd1;                                //
	 $izf=strtolower($izf);                                   //
	 $izf=str_replace(" ","_",$izf);
     $izfo=$_FILES['new']['name'];
	 $izfo=str_replace(" ","_",$izfo);
	 $timg=str_replace($izfo,$izf,$timg);       //
     $mtag[$ti]=substr($timg,1);                //
//
	 $fk=$_prhtm.'/'.$izf;   //
      if (copy($_FILES["new"]["tmp_name"],$fk)) // 
     {}
 	 else
	 {$os=$os. "<b>Copy error</b>";fwrite($w,$sw);
	 }}}
	$tn="";                                      //
foreach ($mtag as $ti => $tag)                   //
{if ($tag=="*")
{}
else
{$tn=$tn."<".$tag;}
}	
$tn=substr($tn,1);                               // 
fwrite($w,stripslashes($tn));                    // 
	}
    else {fwrite($w,stripslashes($lin));}        // 
    } 
    fclose($w);
	if (isset ($_REQUEST['imgm'])) 
	{$os=$os. '<b style="color:green">Small picture uploaded and inserted into the page!</b>';
	}
	if (isset ($_REQUEST['pimg']))  
	{$os=$os. '<b style="color:green">The big picture, which opens by clicking in the current window, is loaded and inserted into the page!</b>';
	}
	if (isset ($_REQUEST['imgb']))
	{$os=$os. '<b style="color:green">The big picture, which opens by clicking in a separate window, is loaded and inserted into the page!</b>';
	}}
	else
{$os=$os. '<b style="color:red">No picture selected! Click to select and repeat!</b>';
}}}}
else
{$os=$os. '<b style="color:red">The size of the selected picture file is more than 2 MB! Make it smaller and repeat!</b>';
}}
else
{$os=$os. '<b style="color:red">No picture selected by review! Click "Browse ...", select the picture file and repeat!</b>';
}} 




include "zsite2/20.php";
include "zsite2/201.php";
include "zsite2/21.php";
//#**************************************************************************************************************************
//  
//**************************************************************************************************************************
$l = file($_frhtm);            // 
if ($zz) {echo "<b style='color:red'>This page has been loaded and cannot be edited by the designer! <br>
To delete the loaded page and create it with the designer, click -> + and click Refresh in the browser bar.! 
</b><hr>";}

//
foreach ($l as $li => $lin)
{
if  ((strpos($_frhtm,'/pages/')==0 and strpos(" ".$_frhtm,'plan/')==0)  or (strpos($_frhtm,'a-p-x-.htm')>0 and rtr($nam)<>"apx") or (strpos($_frhtm,'t-m-p-.htm')>0 and rtr($nam)<>"tmp")  )
  //
   {if  ((strpos($_frhtm,'a-p-x-.htm')>0 and rtr($nam)<>"apx") or (strpos($_frhtm,'t-m-p-.htm')>0 and rtr($nam)<>"tmp") )
   {echo "<hr style='color:green'>"; }
   echo $lin;
  }   
  else                              //
  {echo '<br><input id=u'.$li.' type=checkbox><b style="background:#a9a9a9;color:white" >&nbsp;&nbsp;&nbsp;'.$li;
   if  (strpos($lin,'time="~~')>0)  //
  {echo ' - show on time!'; }
   echo "&nbsp;&nbsp;&nbsp;</b><br>".$lin;
//echo  "<hr>".htmlspecialchars($lin, ENT_QUOTES);    
  
  }
 }
?>
</div>
<form id="f"  method="POST" enctype="multipart/form-data" action="zsite2.php">
<b style="background:green;color:white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGES:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>
<b >SELECTED N
<input rows=2 style="background:yellow;width:35" readonly   name="row" id=row type="text"  value="" >
/<b id=all2><?php echo $li+1;?></b>

picture N
<input style="background:yellow;width:35" rows=2 readonly   name="col" id=col type="text"  value="" >
</b>
<div id=repo style="OVERFLOW: scroll; HEIGHT: 65;width:100%;background:#fff8dc">
<?php
if ($os=="")
{}
else
{echo '<b style="color:red">'.$os.'</b>';
}
?>
</div>
<!--HTML --> <input  style="visibility:hidden"  type="checkbox" value="2" name="H" id=H 
disabled <?php if ($ps) {echo " disabled ";}?>
<br>
<div id=kor style="display:none;hight:0"></div>  <!----- ------>
</td>
<td width=400px valign=center >
<?php
$pvs=false;                                     //
if ($priz)                                      //
{echo '<center><b style="background:green;color:white;width:100%">INTERNAL PAGE DESIGNER</b></center>';
}
else if ($prizg)                               //
{echo '<center><b style="background:red;color:white;width:100%">MAIN PAGE SECTION DESIGNER</b></center>';
$pvs=true;
}
else 
{echo '<center><b style="background:blue;color:white;width:100%">EXTERNAL PAGE DESIGNER</b></center>';
$pvs=true;
}
?>
<center style="color:brown;background:transparent">
<?php echo "<b>NAME</b>&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;".rtr($nam)."<br><b>FILE</b>&nbsp;&nbsp;&nbsp;";
if (strlen($site)>50) {echo "...";
echo substr($site, 50);} 
else
{echo $site;}
?>
</center>
<center>
<button form="" style=width:30 title="To begin" onclick="topp()">&#8593;</button>
<button form="" style=width:30 title="To end" onclick="bopp()">&#8595;</button>&nbsp;&nbsp;
<button form="" style="width:30;background:silver" title="To the next object" onclick="next()">&#8595;</button>
<button form="" style="width:30;background:silver" title="To the previous object" onclick="prev()">&#8593;</button>
Cancel&nbsp; 
<button style=width:30 form="" 
title="Cancel the selection set on the text, the link.
Click the link or tag text and click me." id=otr2 onclick="otr(1)">F</button>&nbsp;&nbsp;
<button form="" title="Help briefly" onclick=document.getElementById("kp2").style.display="" 
style="background:white;width:30 ">?</button>&nbsp;&nbsp;
<a  href="help/6.htm" target=_blank>Help</a><br>
<b>filter</b>&nbsp;<b id=sfil style=width:30></b>&nbsp;
<input type="text" id=goto size="25" title="One or more contexts, with a separator
with / to filter by the selected column.">
<button form="" onclick=gotf(0) id=got
title="Show only those lines that contain numbers in the number (NUM), or the context in the object text (OBJ).">
select</button>
<button form="" onclick=gotf(2) style=width:30  id=got2
title="Cancel selection">X</button>
<hr>
<button form="" id=rta  disabled  onclick=rtab(1)  
title="Deleting, adding rows, columns." >Table</button>
&nbsp;
<button form=""  id=rli  disabled  onclick=rlist(1)  
title="Deleting, adding lines, nested lists." >List</button>
&nbsp;
<button form=""  onclick=pred(3) id=pred3   title="Edit text in a large window."
<?php if ($ps) {echo " disabled ";}?>>
TXT</button>
<button form="" id=hred2 onclick=hred(0)   title="Edit HTML code in a large window. "
<?php if ($ps) {echo " disabled ";}?>>
HTML</button>&nbsp;&nbsp;&nbsp;
<button form=""  id=fin onclick=finf()   
title="Finish editing in the edit field with saving changes. " 
<?php if ($ps) {echo " disabled ";}?>>
SAVE</button>
</center>
<center>Editing field:
</center>
<textarea  name="htm" id=htm  style="width:100%;height:100px"  value="" readOnly ></textarea><br>
<?php
if ($prizg)
{echo '<!---';}
?>
<b>MODERATION:</b>
<a href="modtc.php<?php echo '?site='.$site.'&utf8='.$utf8.'&nam='.$nam;?>" target=_blank title="For comments: view, display permission, delete.">Comments</a>
<a href="modtg.php<?php echo '?site='.$site.'&utf8='.$utf8.'&nam='.$nam;?>" target=_blank title="For entries in the guestbook: view, display permission, delete."  >Guest book</a>
<a href="modtq.php<?php echo '?site='.$site.'&utf8='.$utf8.'&nam='.$nam;?>" target=_blank  title="For asked questions: viewing, entering answers, permission to display, delete."  >Questions</a>
<a href="modtv.php<?php echo '?site='.$site.'&utf8='.$utf8.'&nam='.$nam;?>" target=_blank title="To vote: view, display permission, delete.">Vote</a>
</b><hr>
<?php
if ($prizg)
{echo '--->';}
?>
<b>TEMPLATE:&nbsp;
<input type="button" form="" onclick=tt2("tt") value="Text" name="tt" id=tt style="width:50px;background:transparent" 
title="Show templates of texts or lists, etc., select a template.">

<input type="button" form="" value="Images" onclick=tt2("ti") name="ti" id=ti 
style="width:70px;background:transparent" 
title="Show picture templates to choose a template.">

<input type="button" form="" value="Tables" onclick=tt2("tb") name="tb" id=tb style="width:70px;background:transparent" 
title="Show table templates for select template.">

<input type="button" form="" value="Links" onclick=tt2("tLink") name="tl" id=tl style="width:60px;background:transparent" 
title="Show templates of tables-links to files (documents, pages, videos, music) of the site to select a template."
>

<input  onclick=tt2("tmp") form="" type="button" value="MY" name="ms" id=ms style="width:45px;background:silver" 
<?php if ($nam=="a-p-x-" or $nam=="t-m-p-" ){echo " disabled ";}?>
title="Show templates from table MY TEMPLATES." >
<?php
if ($prizg)
{echo '<!---';}
?>
<br>
<input type="button" form="" value="Comments" onclick=tt2("tc") name="tc" id=tc style="width:100px;background:transparent" 
title="Show templates page comment for select template."
></b>
<input type="button" form="" value="Guest book" onclick=tt2("tg") name="tg" id=tg style="font-size:smaller;width:70px;background:transparent" 
title="Show guestbook templates for choose template."
>
<input type="button" form="" value="Questions" onclick=tt2("tq") name="tq" id=tq style="font-size:smaller;width:65px;background:transparent" 
title="Show question-answer templates for select a template.">
&#160;at once

<input type="checkbox" value="0" name="pu" id=pu disabled
title="Install me if you want to publish the entered form data (see buttons on the left)
immediately, or they will be published by the moderator. ">

<?php
if ($prizg)
{echo '---><br>';}
?>
content
<input type="checkbox" value="0" name="so" id=so disabled
title="Install me if you want to insert its content on the page instead of a link to the file.">
<?php
if ($prizg)
{echo '<!---';}
?>
<br>
<input type="button" form="" value="Vote" name="tv" onclick=tt2("tv") id=tv 
style="width:50px;background:transparent" 
title="Show voting templates for select template.">

<input type="button" form="" value="Gadget" name="gj" onclick=tt2("gj") id=gj style="font-size:smaller;width:50px;background:transparent" 
title="Show templates for gadgets and choose a template.">

<input onclick=tt2("apx") type="button" form="" value="Archive" name="apx" id=apx style="font-size:smaller;width:47px;background:silver"
<?php if ($nam=="a-p-x-" or $nam=="t-m-p-" ){echo " disabled ";}?>
title="Show templates from archive.">

<input type="button" form="" value="Modules" name="modu" onclick=tt2("md") id=modu style="width:60px" 
title="Show modules.">
<?php
if ($prizg)
{echo '--->';}
?>

<input type="button" value=PA name="pa" id=pa  onclick=michael()  style="width:30px;background:transparent" 
title='Open "PA" constructor' disabled 
<?php if ($ps) {echo " disabled ";}?>>
&#160;Lines:


<input value="3"  name="kol" id=kol  style="width:30px" disabled 
title="Enter the number of lines for tables or voting forms or lists.">
<?php
if ($prizg)
{echo '<!---';}
?>

Result:
<input type="checkbox" value="2" name="rez" id=rez disabled
title="Click if the voting results are shown in the voting form.">

<?php
if ($prizg)
{echo '--->';}
?>
<input  name="from" id=from type="text" style="display:none"  value="<?php echo $from;?>">
<input type="submit" value="v" name="vvv" id=vvv  onclick=sto() 
style="display:none; width:35px;background:transparent" 
title="Remember changes in the selected object."> 
<hr><b>OBJECT:&nbsp;</b>

<input type="submit"  name="tmp1" id=tmp1 style="display:none">

<input type="button" id=tmp3 value="v" disabled  form="" onclick=tmp2()  
style="width:25px;color:red;background:transparent" 
title="Remember your choice of the template object and load the page or close templates.">&#160;&#160;

<input type="submit" value="+" name="add" id=add style="width:25px;background:transparent" 
title="Adding the remembered template object to the end.">&#160

<input type="submit" value="->" name="ins" id=ins style="width:25px;background:transparent" 
title="Inserts the remembered template object before the selected object.">&#160

<input form="" type="button" onclick=for_sel(1) id=s5 value="S"  
style="width:25px;color:blue;background:transparent" title="Mark all objects.">&#160

<input form="" type="button" onclick=for_sel(2) id=xs5 value="XS" 
style="width:30px;color:blue;background:transparent" title="Reset mark all objects.">&#160

<button form="" onclick=for_del2("del1") id=del3  style="width:25px;color:red"
title="Deleting marked objects with storing in the buffer.">
X</button>

<input type="submit" value="X" name="del1" id=del1 style="display:none"> 

<button form="" onclick=for_del2("del2") id=del4  style="width:35px;color:red"
title="Deleting marked objects.">
XX</button>

<input type="submit"  value="XX" name="del2" id=del2 style="display:none">

<button form="" onclick="inkont()" id=ikont  style="width:25px;color:brown"
title="Add marked objects to the container.">K</button>

<input type="submit" value="B" name="buf" id=buf style="display:none">

<button form=""  onclick=for_del2("buf") id=buf2 style="width:25px;color:green"
title="Save checked items in the buffer.">B</button>

<input type="submit" value="<-" name="res" id=res  style="width:25px;color:green" 
title="Box-restoring objects from the buffer to the selected object.">

<input type="submit" value="A" name="res1" id=res1 style="width:25px;color:green" 
title="Add objects from the buffer to the end.">

<input type="submit" value="V" name="p_ins" id=p_ins style="width:25px" 
title="Append a text object to the end.">
<?php

if ($prizg)
{echo '<!---';}
else
{
echo '<input type="submit" value="in MY" name="sz" id=sz style="display:none">
<button form=""  onclick=for_apx("sz","templates") id=sz2';
if ($nam=="apx" or $nam=="tmp" )
{echo " disabled ";}

echo ' title="Remember the selected object as a template in MY TEMPLATES.">
to MY</button>
<input type="submit" value="to Archive" name="mt" id=mt style="display:none">
<button form=""  onclick=for_apx("mt","archive") id=mt2';
if ($nam=="apx" or $nam=="tmp" )
{echo " disabled ";}
echo ' title="Move the marked objects to the end of the archive.">
to archive</button>';
}
?>

<input  onclick=timeb(1) type="button" value="T" style="width:35px;background:transparent" 
name="time" id=time 
title="Set or cancel the display period for the selected object.
An object is selected by clicking on its text or number.
Has no effect on the object to insert link content." >&#160;

<button form="" onclick="ogl()" id=ogl5  style="width:25px" 
title="Create a page table of contents based on headings and subheadings and place at the top of the page.">G</button>&#160;

<button form="" onclick="vs1()" id=vs10  style="width:25px" 
title="Insert the contents of the link file before the selected link.">R</button>&#160;

<?php
if ($prizg)
{echo '--->';}
?>
<input type="submit" value="Related links" name="slink" id=slink style="display:none">
<button form="" onclick="vs2()" id=vs20 style="width:25px" 
title="Get a list of related links for the selected link.">L</button>&#160;

<input type="button" form="" value="LL" onclick=tt2("slink")  id=LL style="width:25px" 
title="Related links.">




<input type="submit" value="" name="og" id=og style="display:none">

<input type="submit" value="" name="vs" id=vs style="display:none">

<input type="submit" value="" name="t_ins" id=t_ins style="display:none">

<hr>

<input   type="submit" value="PUBLISH" name="pub" id=pub style="background:transparent;color:green" 
title="Replace the site page with a new one, make it visible on the site">&#160

<button form="" id=show style="background:transparent;color:blue"  
onclick=q11("<?php echo $_fohtm_; ?>") 
title="Click me to view the published page!">LOOK</button>
&nbsp;

<button form="" id=for_del5 
onclick=for_del() style="color:red" title="Delete the page to create a new one. The page on the site is not deleted! ">
DELETE</button>
<?php
if (!$prizg)
{
echo '<button form="" id=pas2 onclick=for_pass()  
style="color:green" title="Set, change, remove password to view the page!">PASSWORD</button>';
}
?>
<input  type="submit" value="PASSWORD" name="pas" id=pas style="display:none"> 

<input  type="submit" value="DELETE" name="cr" id=cr style="display:none">

<hr>
<center><b>NOTES: The numbers on the left are the object numbers. Refresh on the browser repeats the last command!</b></center>

<input type="hidden" value="" name="row1" id=row1 size="20" rows="4"><!--- ----> 

<input type="hidden" value="" name="col1" id=col1 size="20" rows="4"><!- -> 

<input type="hidden" value="" name="oldt" id=oldt size="20" rows="4"><!- -> 

<input type="hidden" value="1" name="index" id=index size="20" rows="4"><!- -> 

<input type="hidden" value="<?php echo $scroll; ?>" name="scroll" id=scroll size="20" rows="4"><!-  -> 

<input type="hidden" value="<?php echo $site; ?>" name="site" id=site  size="20" rows="4"><!-  -> 

<input type="hidden" value="<?php echo $nam; ?>" name="nam" id=nam  size="20" rows="4"><!- -> 

<input type=hidden name="sd" id=sd value="<?php include "otd/img.txt";?>">

<input type="hidden" value="<?php echo $utf8; ?>" name="utf8" id=utf8>

<input type="hidden" value="<?php echo $fol; ?>" name="fol" id=fol>

<input type="hidden" value="" name="html" id=html>

<input type="hidden" value="" name="delet" id=delet>
</td></tr></tbody></table>
<div id=time1 style="z-index:2;opacity:0.3;visibility:hidden;height:100%;width:100%;position:absolute;top:0;left:10;background:black;filter:alpha(opacity=30)">&#160;&#160;&#160;</div>
<!---  ---->
<table id=time2 border=0 width=100% height=100% style="z-index:3;position:absolute;top:0px;left:0px;display:none" ><tbody>
<tr><td width=10%>&#160;</td><td><table border=7  bordercolor="orange">
<tbody><tr width=100%>
<td align=center  style="background:white"><b>
<h4><nobr>&#160;&#160;&#160;&#160;Display periods on the page of the selected object&#160;&#160;&#160;&#160;</nobr></h4>
<hr>Select to enter: day
<input name="d" id=d  size=1  disabled>
month
<input size="1" name="m" id=m disabled>
year,
<input size="2" name="y" id=y disabled>
clicking the calendar and clicking the arrow next to the corresponding field.
<hr>
Show every year <br>
from the date&#160;
<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=ssd()>
&#160;
<input style="width:20px" disabled name="db" id=db value="0">
&#160;month&#160;
<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=sm()>
&#160;
<input style="width:20px" disabled name="mb" id=mb value="0"><br>
&#160;by day&#160;
<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=pd()>
&#160;
<input style="width:20px" disabled name="de" id=de value="0">&#160;month
&#160;
<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=pm()>
&#160;
<input style="width:20px" disabled name="me" id=me value="0">
<hr>
and/or show once with date&#160;&#160; 
<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=sdat()>
&#160;&#160;
<input style="width:80px" disabled id=dat name=dat value="0">
&#160;&#160;to date
&#160;&#160;<img src="d~e~f/arrow-rj.gif" border=1 width=15px onclick=pdat()>
&#160;&#160;<input style="width:80px" disabled id=dat1 name=dat1  value="0">
<hr><nobr>
and/or show by day of week&#160;&#160; 
<input type="checkbox" id=week1 name="1" value="2" value=1>Mon&#160;&#160; 
<input type="checkbox" id=week2 name="2" value="2" value=1>Tue&#160;&#160; 
<input type="checkbox" id=week3 name="3" value="2" value=1>Wed&#160;&#160; 
<input type="checkbox" id=week4 name="4" value="2" value=1>Thu&#160;&#160; 
<input type="checkbox" id=week5 name="5" value="2" value=1>Fri&#160;&#160; 
<input type="checkbox" id=week6 name="6" value="2" value=1>Sat&#160;&#160; 
<input type="checkbox" id=week7 name="7" value="2" value=1>Sun</nobr>
Show on weekdays during the show dates and/or during the annual show. If periods are not set
show weekdays runs all the time. Clicking <img src = "d~e~f/arrow-rj.gif"> again resets the value.
<hr>
<center>
<button form="" onclick=ctime()  title="Set,change the display period of the selected object"
>Accept</button>
&#160;&#160;&#160;
<button form="" onclick=ztime() title="Cancel the display period of the selected object">Cancel</button>
&#160;&#160;&#160;
<button form="" onclick=clos() title="Close the show parameters input window and return
to page design">Close</button>
</center>
</td></tr></tbody></table>&#160;</td><td width=70%>

<TABLE  border=2 style="BACKGROUND: white">
<CAPTION style="BACKGROUND: #808080; COLOR: white">
<B>THE CALENDAR</B>
</CAPTION>
<THEAD>
<TR style="BACKGROUND: silver; COLOR: white">
<TH onclick="cal3(2)">
<B>
<BUTTON form="" style="WIDTH: 40px; BACKGROUND: #808080; COLOR: white">«y</BUTTON>
</B>
</TH>
<TH onclick="cal3(4)">
<BUTTON form="" style="WIDTH: 40px; BACKGROUND: #808080; COLOR: white">«m</BUTTON>
</TH>
<TH style="WIDTH: 180px; BACKGROUND: #808080; COLOR: white" id=cal2_td colSpan=3 onclick="cal3(0)">
</TH>
<TH onclick="cal3(3)">
<BUTTON form="" style="WIDTH: 40px; BACKGROUND: #808080; COLOR: white">m»</BUTTON>
</TH>
<TH onclick="cal3(1)">
<BUTTON form="" style="WIDTH: 40px; BACKGROUND: #808080; COLOR: white">y»</BUTTON>
</TH>
</TR>
<TR style="BACKGROUND: silver; COLOR: black">
<TH style="WIDTH: 40px">Mon.</TH>
<TH style="WIDTH: 40px">Tue.</TH>
<TH style="WIDTH: 40px">Wed.</TH>
<TH style="WIDTH: 40px">Thu.</TH>
<TH style="WIDTH: 40px">Fri.</TH>
<TH style="WIDTH: 25px; BACKGROUND: #ffdead; COLOR: red;WIDTH: 40px">Sat.</TH>
<TH style="WIDTH: 25px; BACKGROUND: #ffdead; COLOR: red;WIDTH: 40px">San.</TH>
</TR>
</THEAD>
<TBODY id=cal2 onclick=zint(event)>
<TR>
<TD style="WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red;WIDTH: 40px">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red;WIDTH: 40px">&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD>&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red">&nbsp;&nbsp;</TD>
<TD style="BACKGROUND: #ffdead; COLOR: red" id=cal2_td1>&nbsp;&nbsp;</TD>
</TR>
</TBODY>
</TABLE><SCRIPT type="text/javascript">
//*********************************************************************
function zint(event) // 
//*********************************************************************
{ev = event || window.event
var t5 = ev.target || ev.srcElement
if (t5.tagName=="TD")
{document.getElementById("d").value=t5.innerHTML.replace(/&nbsp;/g,"") 
mda5=document.getElementById("cal2_td").innerHTML.split(".")
document.getElementById("m").value=mda5[1]
document.getElementById("y").value=mda5[2]
}}
//***************************************************************************
function cal3(p)  // 
//***************************************************************************
{dat=new Date();
if (p==1)
{my=document.getElementById("cal2_td1").title.split(".");dat.setYear(parseInt(my[2])+1);}
if (p==2)
{my=document.getElementById("cal2_td1").title.split(".");dat.setYear(parseInt(my[2])-1);}
if (p==3)
{my=document.getElementById("cal2_td1").title.split(".");dat.setDate(1);
dat.setYear(parseInt(my[2]));
dat.setMonth(parseInt(my[1]));}
if (p==4)
{my=document.getElementById("cal2_td1").title.split(".");
dat.setDate(1);
dat.setYear(parseInt(my[2]));
dat.setMonth(parseInt(my[1])-2);}
if (p!=0)
{dat.setDate(1)}
var y="";
y=dat.getFullYear();
var m="";
m=dat.getMonth()+1;
var c="";
c=dat.getDate();
var d="";
d=dat.getDay();
var dp="";
dp=y+"-"+m+"-"+c+"-"+d;
dp1=c+"."+m+"."+y;
cc=c;mm=m;
if (parseInt(c)<10)
 {cc="0"+cc;}
if (parseInt(m)<10)
 {mm="0"+mm;}
dp11=cc+"."+mm+"."+y;
document.getElementById("cal2_td").innerHTML=dp11;
document.getElementById("cal2_td1").title=dp1;
dat.setDate(1);
na=dat.getDay()-1;
if (na<0) 
{na=6;}
mt5= document.getElementById("cal2").getElementsByTagName("TD")
k8=1;
lb="q,5,6,12,13,19,20,26,27,33,34,40,41,";
for(var ii=0; ii<mt5.length-4; ii++) 
{if (lb.indexOf(","+ii+",",0)>0)
{mt5[ii].style.background="#ffdead";
mt5[ii].style.color="red";
}
else
{mt5[ii].style.background="";
}
if (ii<na)
{mt5[ii].innerHTML="&nbsp;&nbsp;";}
else
{dat.setDate(k8);
if (m==dat.getMonth()+1)
{if (ii-na+1==c && p==0) 
{mt5[ii].style.background="red";
mt5[ii].style.color="black";}
if (k8<10)
{mk8="&nbsp;0"+k8}
else
{mk8="&nbsp;&nbsp;"+k8}
k8++
mt5[ii].innerHTML=mk8;}
else
{mt5[ii].innerHTML="&nbsp;&nbsp;";}
}}}
cal3(0)    //
</SCRIPT>
</CENTER>
</td></tr></tbody></table>

 <script type="text/javascript">
//**********************************************************
function zklist(par)  // 
//**********************************************************
{if (par=="0")
{obj1.innerHTML=obj1.innerHTML.replace("¶" ,"")
document.getElementById("rrlist").style.display="none"
}
upar=obj1.parentNode
if (par=="1")           //
{obj1.outerHTML="<Li>"+document.getElementById("news").value+obj1.outerHTML
}
else if (par=="5")      //
{obj1.outerHTML=obj1.outerHTML+"<Li>"+document.getElementById("news").value}
else if (par=="3")      //
{obj1.outerHTML=""}
else if (par=="6")     // 
{if (obj1.parentNode.parentNode.id=="s")
{document.getElementById("repo").innerHTML="<b style=color:red>You cannot delete the top-level list!</b>"
return
}
else
{if (obj1.parentNode.parentNode.parentNode.parentNode.id=="s")
{tna=obj1.parentNode.tagName
mi=obj1.parentNode.parentNode.parentNode.getElementsByTagName(tna) 
if (mi.length>0)
{for(var j = 0; j <mi.length ; j++)
{if (mi[j].id!="listd")
{mi[j].outerHTML=""
}}
mi=obj.getElementsByTagName("LI") 
tex5="<"+tna+">"
for(var j = 0; j <mi.length ; j++)
{if (mi[j].innerHTML.indexOf("<IMG")<0) 
{tex5=tex5+mi[j].outerHTML
}}}
obj.innerHTML=tex5+"</"+tna+">"
}
else
{mOL=obj1.parentNode.parentNode.getElementsByTagName("*") 
mOL[1].outerHTML=""
mOL[0].outerHTML=""
}}}
else if (par=="7" || par=="8")   //
{if (obj1.parentNode.id=="listd")
{document.getElementById("repo").innerHTML="<b style=color:red>There is NO parent!</b>"
return
}
obj1.innerHTML=obj1.innerHTML.replace("¶" ,"")
if (par=="8")
{mmm=obj1.parentNode.parentNode.outerHTML+"<LI>"+document.getElementById("news").value}
else
{mmm="<LI>"+document.getElementById("news").value+obj1.parentNode.parentNode.outerHTML}
obj1.parentNode.parentNode.outerHTML=mmm
}
else if (par=="4")             // 
{nnn=obj1.parentNode.tagName
obj1t=obj1.innerHTML.replace("¶","")
mmm="<LI><IMG border=0 src=d~e~f/minus.gif lang=onclick=list_z(this,'"+nnn+"')>&nbsp;"+obj1t+'<'+nnn+'><LI>'+document.getElementById("news").value+'</LI></'+nnn+'>'
obj1.outerHTML=mmm
}
if (par=="5" || par=="1" )
{mi=upar.getElementsByTagName("LI") 
for(var j = 0; j <mi.length ; j++)
{if (mi[j].innerHTML.indexOf("¶")>0)
{obj1=mi[j]
}}}
else
{document.getElementById("rrlist").style.display="none"
document.getElementById("html").value=obj.outerHTML
obj1.innerHTML=obj1.innerHTML.replace("¶" ,"")
document.getElementById("vvv").click()  
}}
//****************************************************************
function zktab(par)   //
//****************************************************************
{mthead=obj.getElementsByTagName("THEAD")[0]
mtbody=obj.getElementsByTagName("TBODY")[0]
row=0
// 
mtr5=obj.getElementsByTagName("TR") 
if (mtr5.length==2 && par==3)
{alert("The only line is not deleted!")
return
}
for(var j = 0; j <mtr5.length ; j++)
{if (mtr5[j].innerHTML.indexOf("¶")>0)   //
{str5=j-1                                //
mtd5=mtr5[j].getElementsByTagName("TD")
if (mtd5.length==1 && par==6)
{alert("The single column is not deleted!")
return
}
nstr5="<TR>"
for(var jj = 0; jj <mtd5.length ; jj++)
{if (mtd5[jj].innerHTML.indexOf("¶")>0)   //
{sto5=jj}
nstr5=nstr5+"<TD>?</TD>"
}
break
}}
nstr5=nstr5+"</TR>"
if (par==0)
{objt.innerHTML=objt.innerHTML.replace(/¶/g ,"")
document.getElementById("rrtab").style.display="none"
return
}
//-----------------------------------------------------------------------------------------------------------------------------------
else if (par==1 || par==5 || par==3)    // 
//-----------------------------------------------------------------------------------------------------------------------------------
{mtbody5=mtbody.getElementsByTagName("TR")
mnew=""
for(var jj = 0; jj <mtbody5.length ; jj++)
{if (jj!=str5)
{mnew=mnew+mtbody5[jj].outerHTML
}
else
{if (par==1)
{mnew=mnew+nstr5+mtbody5[jj].outerHTML
}
else if (par==5)
{mnew=mnew+mtbody5[jj].outerHTML+nstr5
}
else if (par==3)
{}
}}
newobj=""
mtb=obj.outerHTML.replace(/TBODY/g,"tbody")
mtb=mtb.split("tbody")
newobj=mtb[0]+"tbody>"+mnew+"</tbody"+mtb[2]
newobj=newobj.replace("¶","")
document.getElementById("H").checked=true
document.getElementById("htm").value=newobj.replace(/\r\n/g,"")  //
finf()                                                           //
}
//-----------------------------------------------------------------------------------------------------------------------------
else if (par==2 || par==4 || par==6)    // 
//-----------------------------------------------------------------------------------------------------------------------------
{mthead5=obj.getElementsByTagName("TR")
mnew="<TR>"
mnew2=""
for(var jj = 0; jj <mthead5.length ; jj++)
{if (jj==0)
{//
mtd=mthead5[jj].getElementsByTagName("TH")
for(var jjj = 0; jjj <mtd.length ; jjj++)
{if (jjj==sto5)                             // 
{if  (par==2)                               // 
{mnew=mnew+"<TH>?</TH>"+mtd[jjj].outerHTML
}
else if (par==4)                            // 
{mnew=mnew+mtd[jjj].outerHTML+"<TH>?</TH>"
}
else if (par==6)                           //
{}
}
else
{mnew=mnew+mtd[jjj].outerHTML
}}
mnew=mnew+"</TR>"
}
else
{//
mtd=mthead5[jj].getElementsByTagName("TD")
mnew2=mnew2+"<TR>"
for(var jjj = 0; jjj <mtd.length ; jjj++)
{if (jjj==sto5)                                  //
{if  (par==2)                                    //
{mnew2=mnew2+"<TD>?</TD>"+mtd[jjj].outerHTML
}
else if (par==4)                                 //
{mnew2=mnew2+mtd[jjj].outerHTML+"<TD>?</TD>"
}
else if (par==6)                                 //
{}
}
else
{mnew2=mnew2+mtd[jjj].outerHTML
}}
mnew2=mnew2+"</TR>"
}}
newobj=""
mtb2=obj.outerHTML.replace(/THEAD/g,"thead")
mtb=mtb2.split("thead")
newobj=mtb[0]+"thead>"+mnew+"</thead"+mtb[2]
mtb3=newobj.replace(/TBODY/g,"tbody")
mtb=mtb3.split("tbody")
mnew2=mnew2.replace("¶","")
newobj2=mtb[0]+"tbody>"+mnew2+"</tbody"+mtb[2]
document.getElementById("H").checked=true
document.getElementById("htm").value=newobj2.replace(/\r\n/g,"")  // 
finf()                                                            // 
}}
</script>

<!---   ---->
<table border=0 height=100% width=100% id=rrtab valign=center align=center style="position:absolute;top:0;left:0;background:transparenr;display:none;z-index:3">
<tr><td align=center valign=center>
<TABLE  title=0 border=1 style="background:silver" >
<TBODY>
<CAPTION  style="TEXT-ALIGN: center;background:#708090;color:white">
Changing the rows and columns of the table.
</CAPTION>
<THEAD>
<TR>
<TH>¹</TH>
<TH>1</TH>
<TH>2</TH></TR></THEAD>
<TBODY>
<!-ss->
<tr>
<td>&nbsp;</td>
<TD onclick=zktab(3) style="background:brown;color:white">X  (Delete line.)</TD>
<td>&nbsp;</td>
</tr>

<TR>
<TD>&nbsp;</TD>
<TD style="background:yellow" onclick=zktab(1)>+  (Insert line)</TD>
<TD>&nbsp;</TD></TR>
<TR style="background:yellow">
<TD  onclick=zktab(2)>+ (Insert Column)</TD>
<TD  style="background:white;color:red"><b id=vibor>&nbsp;</b></TD>
<TD onclick=zktab(4) style="background:yellow">+  (Insert Column)</TD></TR>
<TR>
<TD>&nbsp;</TD>
<TD style="background:yellow" onclick=zktab(5)>+  (Insert line)</TD>
<TD>&nbsp;</TD></TR>
<TR>
<TD>&nbsp;</TD>
<TD style="background:brown;color:white" onclick=zktab(6)>X  (Delete column)</TD>
<TD>&nbsp;</TD></TR>
<tr>
<td colspan=2>
<b style="color:brown">Red is a clicked cell!</b>
</td>
<td><b onclick=zktab(0) style="background:green;color:white">Close</b></td>
</tr>
</TBODY></TABLE>
</tr></td></table>

<!---   ---->
<table border=0 height=100% width=100% id=rrlist valign=center align=center style="display:none;position:absolute;top:0;left:0;background:transparenr;display1:none;z-index:3">
<tr><td align=center valign=center>
<TABLE  title=0 border=1 style="background:silver" >
<TBODY>
<CAPTION style="TEXT-ALIGN: right" style="background:silver">
<center   style="background:green;color:white">Change the list</center>
</CAPTION>
<TBODY>
<!--ss-->
<tr>
<td onclick=zklist(7) style="background:yellow" title="Parent insert line before.">+ Insert line</td>
<TD onclick=zklist(3) style="background:brown;color:white">X  Delete line</TD>
<td></td>
</tr>

<TR>
<td></td>
<TD style="background:yellow" onclick=zklist(1)>+  Insert line</TD>
<TD>
</TD>
</TR>

<TR>
<td>Selected:</td>
<TD  style="background:white;color:red"><b id=vibor2>&nbsp;</b></TD>
<TD onclick=zklist(4) title="Create a descendant list of 1 line."  style="background:yellow">+ Add list</TD>
</TR>

<TR>
<td ></td>
<TD style="background:yellow" onclick=zklist(5)>+ Insert line</TD>
<TD  onclick=zklist(6) title="Delete descendant list." style="background:brown;color:white">X Delete list</TD>
</TR>

<tr>
<td onclick=zklist(8) style="background:yellow" title="The parent insert a line after.">+ Insert line</td>
<td >
</td>
<td style="background:green;color:white"><b onclick=zklist(0)>Close</b></td>
</tr>

<tr>
<td>Enter newline text</td>
<td colspan=2>
<textarea id=news>???</textarea>
</td>
</tr>

</TBODY></TABLE></td>
</tr></table>

<!---   ---->
<table id=izm1 border=0 height=100% width=100%  style="position:absolute;top:0;left:0;background:transparenr;display:none;z-index:3">
<tr><td height=80%>&nbsp;</td></tr>
<tr><td align=center>
<table  border=1  style="background:white" >
<tbody>
<tr><td style="background:brown;color:white" align=right><b id=red_zag>Editing HTML code</b>
&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick=ptab() title="Show in a separate window, for printing, the object and its code." style=width=30>P</button>
&nbsp;&nbsp;<button form="" onclick=clos() style=width:30 title="Close the editing window without saving.">X</button>

</td></tr>
<tr><td>
<!---   ---->
<textarea  id=htmr1 name="htmr1"    rows=27 cols=100 value="" >12345</textarea><br>
</td></tr>
<tr><td>
<center >
<button form="" onclick=hred(1)  title="Save editing.">Save</button>
&#160;&#160;&#160;
<button form="" onclick=clos() title="Close the editing window without saving.">Cancel</button>
</center>
</td></tr>
</tbody></table>
</td></tr>
<tr><td height=30%>&nbsp;</td></tr>
</table>
<!---   ---->
<table id=izm border=0 height=100% width=100%  
style="position:absolute;top:0;left:0;background:transparenr;display:none;z-index:3">
<tr><td align=center valign=top>
<table     border=1 width=50% height=50% style="background:white;border:2px brown solid"  >
<tbody>
<tr><td style="background:brown;color:white" align=center><b>Editing text.</b>
&nbsp;&nbsp;&nbsp;&nbsp;<button title="Close the editing window without saving" onclick=clos()>&nbsp;X&nbsp;</button>
</td></tr>
<tr><td width=50% >
<!--- --->
<b id=tteg style="visibility:hidden">
<table onclick=btr(event) width=100% border=1><tr>
<td style="background:brown;color:white">
THE CHANGE:
</td>
<td>
<b lang=b title="To bold, click me and select the text.">o&nbsp;</b>
<td>
<i  lang=i title="To italicize, click me and select the text.">o&nbsp;</i>
</td><td>
<small  lang=small title="To select small, click me and select the text.">&nbsp;o&nbsp;</small>
</td><td>
<strike  lang=strike title="For strikethrough selection, click me and select the text.">&nbsp;o&nbsp;</strike>
</td><td>
<sub lang=sub title="To select up, click me and select the text.">&nbsp;o&nbsp;</sub>
</td><td>
<sup lang=sup  title="To select down, click me and select the text.">&nbsp;o&nbsp;</sup>
</td>
<td>
<b lang=A  title="To convert uppercase Click me and Mark Text.">&nbsp;A&nbsp;</b>
</td><td>
<b lang=a title="To convert to lowercase, click me and select the text.">&nbsp;a&nbsp;</b>
</td>
<td>
<b lang=«A» title="For quotation marks, click me and select the text.">&nbsp;«A»&nbsp;</b>
</td>
<td>
<b lang=color title="For color placement, select color background, click me and select the text.">Color</b>
</td>

<td style="background:brown;color:white">
INSERT:
</td><td>
<b lang="." title="To insert . click me and click insert place.">&nbsp;.&nbsp;</b>
</td><td>
<b lang="," title="To insert , click me and click the insertion point.">&nbsp;,&nbsp;</b>
</td><td>
<b  lang=";"title="For insertion ; click me and click insert place.">&nbsp;;&nbsp;</b>
</td>
<td>
<b lang=":" title="To insert : click me and click the insertion point.">&nbsp;:&nbsp;</b>
</td>
<td>
<b lang="!" title="To insert ! click me and click insert place.">&nbsp;!&nbsp;</b>
</td>
<td>
<b lang="?" title="To insert ? click me and click insert place.">&nbsp;?&nbsp;</b>
</td>
<td>
<b lang="<br>" title="For a newline insert, click me and click the insertion point.">&nbsp;&lt;br&gt;&nbsp;</b>
</td>
<td>
<b lang="nbsp" title="To insert a space, click me and click the insertion point.">&nbsp;_&nbsp;</b>
</td>


<td>
<b lang="dat"  title="To insert the current date, click me and click the insertion point.">date</b>
<td>
<b  lang="tim" title="To insert the current time, click me and click the insertion point.">time</b>
</td>
</b>
<td>
<b lang="var" title="To insert the value of a variable, click it, click me, and click the insertion point.">variable</b>
</td>
<td onclick=btr3() style="background:brown;color:white" 
title="Canceling insertion or selection objects returns normal editing mode. ">
Cancel
</td>
</tr>
</table>
<b id=tteg1 style="display:none">
<div id=pal style="background:silver" onclick=colv(event) 
title="TO SELECT COLOR: for text, click on the palette, for underlays, press Alt
  click the palette. Select the text and click Sample." >
<B style="border:black 1px solid;BACKGROUND: none transparent scroll repeat 0% 0%">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: white;white" title="white,#ffffff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #e6e6fa">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #dcdcdc">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #f5f5dc">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #faebd7">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #d3d3d3">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #d8bfd8">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #c0c0c0">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #a9a9a9">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #708090">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #808080">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #696969">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #000000">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #dda0dd">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #da70d6">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ba55d3">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #db7093">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #9370db">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #8a2be2">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #9932cc">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #9400d3">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #800080">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #8b008b">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ee82ee">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff69b4">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff00ff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff1493">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #c71585">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff4500">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: red;red">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #dc143c">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #e0ffff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #afeeee">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #7fffd4">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00ced1">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #48d1cc">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #40e0d0">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00bfff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #87ceeb">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #b0c4de">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #87cefa">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #add8e6">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #b0e0e6">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #6495ed">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #1e90ff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #4682b4">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #6a5acd">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #7b68ee">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #4169e1">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #0000ff">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #0000cd">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #483d8b">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #4b0082">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #000080">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00008b">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #191970">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #2e8b57">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #6b8e23">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #228b22">&nbsp;&nbsp;&nbsp;</B>

<B style="border:black 1px solid;BACKGROUND: #008000">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #006400">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #808000">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #556b2f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #2f4f4f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #98fb98">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #90ee90">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00ff7f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00fa9a">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #adff2f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #00ff00">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #7cfc00">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #7fff00">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #3cb371">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #32cd32">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #9acd32">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #8fbc8f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #66cdaa">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #10b2aa">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #5f9ea0">&nbsp;&nbsp;&nbsp;</B>

<B style="border:black 1px solid;BACKGROUND: #008080">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #fffacd">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #fff8dc">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffefd5">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffebcd">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #f0e68c">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #eee8aa">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffff00">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffd700">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #bdb76b">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #deb887">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #d2b48c">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #cd853f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #b8860b">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #daa520">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffa500">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #e9967a">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff8c00">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #f4a460">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffdead">&nbsp;&nbsp;&nbsp;</B>

<B style="border:black 1px solid;BACKGROUND: #800000">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #8b0000">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #b22222">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #8b4513">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #a52a2a">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #a52a2a">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #a0522d">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #d2691e">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #cd5c5c">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff6347">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ff7f50">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #fa8072">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #f08080">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #bc8f8f">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffb6c1">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffc0cb">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffdab9">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffe4c4">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #f5deb3">&nbsp;&nbsp;&nbsp;</B>
<B style="border:black 1px solid;BACKGROUND: #ffe4b5">&nbsp;&nbsp;&nbsp;</B>
</div>
<table border=0><tr>
<td width=25%>
<b id=kodc>&nbsp;&nbsp;&nbsp;&nbsp;</b> 
</td>
<td width=15%>
Color&nbsp;&nbsp;<b id=vcol style="border:black 1px solid" title="Color choice made.">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b> 
</td>
<td width=35%>
install:&nbsp; 
<button form="" onclick=colv2("col")>color</button>
&nbsp;&nbsp;<button form="" onclick=colv2("bac")>
background</button>
</td>
<td width=25%>
&nbsp;&nbsp;&nbsp;
<button form=""  title=""   size=5 
 id=obr >SAMPLE</button>&nbsp;&nbsp;&nbsp;
</td><tr>
</table>

</td></tr>
<tr><td HEIGHT= 50px >
<table width=100% style="background:silver;color:yellow"><tr><td width=30%>
<b title="To select a text variable, click it.">Text variables</b></td><td width=30%>selected:&nbsp;
<b id=ctext style="background:brown;color:white"></b></td><td width=30%>Click to select:</td></table>
<!---
DevBoolean=
DevBoolean=
--->
<div  onclick=vgp(event)    style="WIDTH: 100%; HEIGHT: 50px; OVERFLOW: scroll;background:#f5f5dc">
<?php
$_pohtm=getcwd ( ). '/ctext/';
$l =scandir($_pohtm, 1);	    // 
//
foreach ($l as $li => $lin)
{if ($lin != "." && $lin != "..")  // 
{echo "<i>".rtr(str_replace (".txt","",$lin)).'</i>,  ';
}}
?>
</div>
</td></tr>

<tr><td HEIGHT= 100px>
<center style="background:silver;"><b>Object (view) </b></center>
<div id=pok   style="WIDTH: 100%; HEIGHT: 80px; OVERFLOW: scroll;background:#f5f5dc">

</div>
</td></tr>
<tr><td align=center valign=center>
<center><b  style="color:red">Text separator ¶ do not delete!</b>
&nbsp;&nbsp;Select with the mouse.</center>
</b>
<!---   ---->
<center style="background:silver;"><b>Object texts (editing)</b></center>
<textarea   onclick=btr2(event)  id=htmr   name="htmr"   cols=100 rows=9 value="" >12345</textarea><br>
<center >
<button form=""  onclick=pred(1)  title="Save editing.">Save</button>
&#160;&#160;&#160;
<button form="" onclick=clos() title="Close the editing window without saving.">Cancel</button>
</center>
<input type="submit" value="v" name="link"  id=link  style="display:none; width:35px;background:transparent"> 
</td></tr></tbody></table>
</td></tr>
<tr><td height=30%>&nbsp;</td></tr>
</table>

<!---   ---->
<table id=imgopen  border=4 width=600 height=50% 
style="background:#b0c4de;display:none;z-index:3;position:absolute;top:20px;left:280px;" >
<tbody>
<tr><td align=center style="background:brown;color:white">
<b>Working with pictures</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button onclick=clos()   title="Close without saving">&nbsp;X&nbsp;</button>
</td><tr>
<tr><td width=50% align=center>

<table border=0><tbody>
<td>
</td>
<td>
<ol>
<li><?php include "otd/img.txt";?><br> to change this list edit the directory in administrator mode.
<li>
<input style="display:none"  type="submit" value="" name="imgd" id=imgd >
<button form="" style="width:30;background:red" title="Click me" onclick=del_img()>
></button> &nbsp;&nbsp;delete pictures and their files</li>
<li>select picture file
<input type="file" onchange=ff() name="new" id=new 
title="Click 'Browse ..' to select to upload big or small image" size=50 
<?php if ($ps) {echo " disabled ";}?>>
</li>
<li>
<input style="display:none"  type="submit" value="" name="imgm" id=imgm >
<button form="" style=width:30 title="click me " onclick=for_img()>
></button> &nbsp;&nbsp;download the selected file and insert it into the page (small picture)
<li>
<input style="display:none"  type="submit" value="" name="pimg" id=pimg >
<button form=""  style=width:30 title="click me " 
onclick=for_img1() >></button>
&nbsp;&nbsp;the selected file load and show the picture (big) on click
by the selected picture in the current window
<li>
<input style="display:none"  type="submit" value="" name="imgb" id=imgb >
<button form="" style=width:30  title="click me " 
onclick=for_img2() >></button>
load the selected file and show the image (big) when you click on the selected image in a separate window
<li>
<button form="" style=width:30 title="click me " 
onclick=for_kar() >></button>&nbsp;watch the big picture
<li>
<input style="display:none"  type="submit" value="" name="imgu" id=imgu >
<button form="" style=width:30  title="click me" 
onclick=for_imgu() >></button>&nbsp;delete big picture
<li>
Entering and / or editing tooltips (labels in big picture windows), enter
<li><textarea rows=5 cols=65   name="podp" id=podp type="text"  value=""></textarea>
<li> and save &nbsp;&nbsp;&nbsp;
<button form=""  style=width:30  title="click me" 
onclick=for_podp() >></button>
</ol>
</td>
</tr></tbody></table>
</td></tr>
<tr><td align=center valign=center>
<center >
<button form="" style=width:60 onclick=clos()  title="Close edit window ">
Close</button>
</center>
</td></tr></tbody></table>

</form>
<a id=per target=_blank style="visibility:hidden" href=#>+++</a>
<!---  ---->
<b id=pv> 
<?php
if (isset ($_REQUEST['apx']) or isset ($_REQUEST['ms']))  
{echo $_REQUEST['htm'];}
?>
  </b>

 <script type="text/javascript">
//**********************************************************************
function rtab(par)   // // 
//**********************************************************************
{
if (objt.parentNode.parentNode.parentNode.id!="s")
{alert("I cannot change this table! Use the 'PA' constructor.")
 return
}
ttab=objt.parentNode.parentNode.parentNode.outerHTML   //
if (ttab.indexOf("id=cal ")>0 || ttab.indexOf("id=eg ")>0 || ttab.indexOf("id=eva ")>0) 
{alert("Gadget tables are not editable!")
}
else
{objt.innerHTML=objt.innerHTML.replace(/~/g,"") + "¶" 
texzz=objt.innerHTML 
texx=objt.parentNode.parentNode.parentNode.outerHTML
texz=objt.outerHTML
document.getElementById("rrtab").style.display=""
if (texzz.length>40)
{vibor.innerHTML=objt.innerHTML.substr(0,40) + "..."
}
else
{vibor.innerHTML=objt.innerHTML
}
}
}

//****************************************************************************
function rlist(par)  // //
//***************************************************************************
{obj1.innerHTML=obj1.innerHTML.replace(/~/g,"") + "¶" 
document.getElementById("rrlist").style.display=""
if (obj1.innerHTML.length>40)
{vibor2.innerHTML=left(obj1.innerHTML,40) + "..."
}
 else
 {vibor2.innerHTML=obj1.innerHTML
 }}

//************************************************************************
function otr(p) // 
//***********************************************************************
{if  (obj1.lang=="$" )
  {document.getElementById("H").checked=false
   obj1.outerHTML=obj1.innerHTML
   document.getElementById("htm").value =obj1.outerHTML
   document.getElementById("fin").click()
}
  else
  { alert("This selection cannot be canceled!")  

document.getElementById("htm").readOnly=false 
document.getElementById("H").checked=true
}}

tags=""
//*********************************************************************************************************
function pred(par)  //
//*********************************************************************************************************
{document.getElementById("tteg").style.visibility="visible"
document.getElementById("tteg1").style.display=""
//--------------------------------------------------------------------------------------
if (par==1)  // 
//--------------------------------------------------------------------------------------
{
if  (document.getElementById("htmr").value=="")     // 
{alert("No text! Enter and repeat.")	
return
}
else
{	
if  (document.getElementById("htmr").value.indexOf("¶")>=0)     //
{
if (tags.split("¶").length!=document.getElementById("htmr").value.split("¶").length) 
 {alert("Invalid number of delimiters! \r\nThere were delimiters removed and/or added! \r\nAccept NOT POSSIBLE! Click 'Cancel'. ") 
return
}
mass=tags.split("¶") 
ott=document.getElementById("htmr").value.replace(/(^\s*)|(\s*)$/g, '')             // 
mass1=ott.split("¶") 
if (mass1[mass1.length-1]!="")
{alert("Entering after the last separator is not allowed! \r\n Delete everything after the last ¶ and repeat!")
 return
}
mass2=ott.split("<") 
for(var j = 1; j <= mass2.length-1; j++)    //
{if (mass2[j].indexOf(">")<0)
{alert("Incorrect tag insertion! \r\n Remove tags inside tag heads or tails and repeat!")
return}
}

 koro=""
  for(var j = 0; j <= mass1.length-1; j++)   //
  {koro=koro + mass[j] +  mass1[j]
  }
  document.getElementById("time1").style.visibility="visible"
  document.getElementById("izm").style.display=""
  document.getElementById("htm").value =koro.replace(/\r\n/g,"")
 document.getElementById("fin").onclick()
 }
 else
 {
 alert("Separators removed! Undo and start over without removing the separators.")
// document.getElementById("htm").value =document.getElementById("htmr").value.replace(/\r\n/g,"")
// document.getElementById("fin").onclick()
 }
}
}
//---------------------------------------------------------------------------------------
else            // 
//---------------------------------------------------------------------------------------
{
if (document.getElementById("htm").readOnly)
{return}
if (document.getElementById("htm").value.indexOf("id=s")<0 && document.getElementById("htm").value.indexOf('id="s"')<0 )
 {alert("Click the number to edit the full text!") 
  return
}
if (document.getElementById("htm").value=="")
{alert("No text selected for editing!") 
return
}
if  (obj.innerHTML.indexOf("<INPUT ")>0 || obj.innerHTML.indexOf("<input ")>0)
{alert("Forms of input cannot be expanded into text") 
return
}
if  (obj.innerHTML.indexOf("<SCRIPT ")>0 || obj.innerHTML.indexOf("<script ")>0)
{alert("Objects with scripts cannot be expanded into text!") 
return
}
if (obj.innerHTML=="")
{alert("No text! Enter and repeat.") 
return	
}

document.getElementById("pok").innerHTML=obj.outerHTML          
ott=obj.outerHTML.replace(/(^\s*)|(\s*)$/g, '')        //
ott=ott.replace(/\r\n/g,"") 
//
if (ott.substr(0,1)=="<" )
{ ott=ott.replace(/></g,"##")
  ott=ott.replace(/>/g,">\r\n") 
  ott=ott.replace(/</g,"\r\n<")
  ott=ott.replace(/##/g,"><")
  mass=ott.split("\r\n") 	
  kkor=""
  tags=""
for(var j = 2; j <= mass.length-2; j++)
{kkor=kkor +  (mass[j]) + "¶" + "\r\n"
tags=tags +  (mass[j-1]) + "¶"
j++
}
tags=tags +  mass[j-1]
document.getElementById("htmr").value=kkor
} 
else
{document.getElementById("htmr").value=document.getElementById("htm").value 
}
document.getElementById("izm").style.display=""
}}

//**********************************************************************************
function ztime() //  
//*********************************************************************************
{document.getElementById("time1").style.visibility="hidden"
 document.getElementById("time2").style.display="none"
if  (obj.outerHTML.indexOf("~~")>0)
{ztime2=obj.outerHTML.split("~~")
document.getElementById("htm").value=(ztime2[0]+"0"+ztime2[2]).replace(/\r\n/g,"")
document.getElementById("t_ins").click()
}
}

//******************************************************************
function ztime0() // 
//*****************************************************************
{document.getElementById("db").value="0"
document.getElementById("mb").value="0"
document.getElementById("de").value="0"
document.getElementById("me").value="0"
document.getElementById("dat").value="0"
document.getElementById("dat1").value="0"
}

//*************************************************************
function ssd()  //
//************************************************************
{if (document.getElementById("db").value!="0")
{document.getElementById("db").value=0}
else
{document.getElementById("db").value=document.getElementById("d").value
}}

//************************************************************
function pd()   // 
//************************************************************
{if (document.getElementById("de").value!="0")
{document.getElementById("de").value=0}
else
{document.getElementById("de").value=document.getElementById("d").value
}}

//**********************************************************
function sm() // 
//**********************************************************
{if (document.getElementById("mb").value!="0")
	{document.getElementById("mb").value=0}
else
	{document.getElementById("mb").value=document.getElementById("m").value
}}

//*******************************************************
function pm()   //
//********************************************************
{if (document.getElementById("me").value!="0")
	{document.getElementById("me").value=0}
else
{document.getElementById("me").value=document.getElementById("m").value
}}

//****************************************
function sdat()  // 
//****************************************
{if  (document.getElementById("dat").value!="0")
{document.getElementById("dat").value=0
}
else
{document.getElementById("dat").value= document.getElementById("d").value+"."+document.getElementById("m").value+"."+document.getElementById("y").value
}
}

//*************************************
function pdat() // 
//*************************************
{if (document.getElementById("dat1").value!="0")
{document.getElementById("dat1").value=0
}
else
{document.getElementById("dat1").value= document.getElementById("d").value+"."+document.getElementById("m").value+"."+document.getElementById("y").value
}
}

//************************************************************************************************
function ctime()  //
//************************************************************************************************
{if (document.getElementById("row").value!="")
{os=""
db=parseInt(document.getElementById("db").value,10)
mb=parseInt(document.getElementById("mb").value,10)
de=parseInt(document.getElementById("de").value,10)
me=parseInt(document.getElementById("me").value,10)
dat=document.getElementById("dat").value
dat1=document.getElementById("dat1").value
mdat=dat.split(".")
mdat1=dat1.split(".")
mmdat=parseInt(mdat[2]+mdat[1]+mdat[0],10)
mmdat1=parseInt(mdat1[2]+mdat1[1]+mdat1[0],10)
td=""
n1=0;n2=0;n3=0;n4=0;n5=0;n6=0;n7=0
if  (document.getElementById("week1").checked)
{n1=1
td=td+"on Mondays,"
}
if  (document.getElementById("week2").checked)
{n2=1
td=td+"on Tuesdays,"
}
if  (document.getElementById("week3").checked)
{n3=1
td=td+"on Wednesdays,"
}
if  (document.getElementById("week4").checked)
{n4=1
td=td+"on Thursdays,"
}
if  (document.getElementById("week5").checked)
{n5=1
td=td+"on Fridays,"
}
if  (document.getElementById("week6").checked)
{n6=1
td=td+"on Saturdays,"
}
if  (document.getElementById("week7").checked)
{n7=1
td=td+"on Sundays,"
}
if (db==0 && mb==0 && de==0 && me==0 && td=="" && mdat==0 && mdat1==0)
{alert("No show interval or days set! \r\n Set the interval and/or days of showing!")	
return	
}
if (mmdat>0 && mmdat1>0 &&  mmdat1<mmdat)
{alert("End date = "+ dat1 +" \r\n is less than start date ="+dat+"\r\n Fix the spacing!")
return
}
if (me>0 && mb>0 &&  me<mb)
{alert("End month = "+ me +" \r\n less than start month ="+mb+"\r\n Fix the spacing!")
return
}
if (de>0 && db>0 &&  de<db)
{alert("End day = "+ de +" \r\n less than start day ="+db+"\r\n Fix the spacing!")
return
}

rew=""
if (db>0 && mb==0 && de==0 && me==0)     //0001	  
{rew="Every year, every month from the day "+db+" until the end of the month  "}
else if (db==0 && mb>0 && de==0 && me==0) //0010
{rew="Every year starting from month "+mb+" until the end of the year "}
else if (db>0 && mb>0 && de==0 && me==0) //0011
{rew="Every year starting from the day "+db+", month "+ mb +" until the end of the year"}
else if (db==0 && mb==0 && de>0 && me==0) //0100
{rew="Every year, every month from the beginning of the month to the day "+de+" "}
else if (db>0 && mb==0 && de>0 && me==0) //0101
{rew="Every year, every month from "+ db +" day to day"+de+" " }
else if (db==0 && mb>0 && de>0 && me==0) //0110
{rew="Every year, starting from the month "+ mb +" until the end of the year, every month from the 1st day, until the day"+de+" "}
else if (db>0 && mb>0 && de>0 && me==0)  // 0111
{rew="Every year, starting from the month "+ mb +" of the day "+ de +", then every month, until the end of the year from the day "+ db +" to the day "&de&" "}
else if (db==0 && mb==0 && de==0 && me>0) //1000
{rew="Every year, from the beginning of the year to the end of the month "+me+" "}
else if (db>0 && mb==0 && de==0 && me>0) //1001
{rew="Every year, from the beginning of the year to the month "+ me +", every month from the day "+ db + "to the end of the month "}
else if (db==0 && mb>0 && de==0 && me>0) //1010
{rew="Every year, from month "+mb+" to month "+me+" "}
else if (db>0 && mb>0 && de==0 && me>0)  //1011
{rew="Every year from day" + db + ", month" + mb + ", until the end of the month "+me+" "}
else if (db==0 && mb==0 && de>0 && me>0)  //1100
{rew="Every year, from the beginning of the year to the day" + to +", the month" + me+" "}
else if (db>0 && mb==0 && de>0 && me>0) //1101
{rew="Every year, from the beginning of the year every month from the day "+ db +" to the day = "+ de +", until the month "+me+" "}
else if (db==0 && mb>0 && de>0 && me>0) //1110
{rew="Every year, from month="+ mb +" to day = "+ de +", month="+me+" "}
else if (db>0 && mb>0 && de>0 && me>0)  //1111
{rew=" Every year, from day "+ db +", month "+ mb +", to day "+ de +", month "+me+" "}
rew2="Show object:"
if (rew!="")
{rew2=rew+" "}

if (mmdat>0 && mmdat1>0)      // 
{rew2=rew2+" from date "+ dat +" to date "+dat1
}
else if (dat==0 && dat1!="0")
{
rew2=rew2+" to date "+dat1	
}	
else if (dat!="0" && dat1=="0")
{
rew2=rew2+" from the date "+dat	
}	

if (td!="")
{rew2=rew2+" "+td}
if (!confirm(rew2+ "\r\n Click 'Cancel' to cancel."))
{return}
else
{
ztime="~~"+db+","+mb+","+de+","+me+","+dat+","+dat1+","+n1+","+n2+","+n3+","+n4+","+n5+","+n6+","+n7+"~~"

document.getElementById("htm").value=obj.outerHTML.replace(/\r\n/g,"")
mmm=document.getElementById("htm").value
if (mmm.indexOf('time="0"')>0)
{document.getElementById("htm").value=mmm.replace('time="0"','time="'+ztime+'"')
}
else
{mtime=document.getElementById("htm").value.split("~~")
document.getElementById("htm").value=mtime[0]+ztime+mtime[2]
}
document.getElementById("t_ins").click()
}}
else
{alert( "No object selected, click to select the object and repeat!")
 document.getElementById("time1").style.visibility="hidden"
 document.getElementById("time2").style.display="none"
 document.getElementById("imgopen").style.display="none"
 document.getElementById("izm").style.display="none" 
}}

//*******************************
window.onload=function ()
//******************************
{
devdate=new Date();
// 
dy=devdate.getFullYear()
//
dm=devdate.getMonth()+1
if (dm<10)
{dm="0"+dm}
//
dc=devdate.getDate();
if (dc<10)
{dc="0"+dc}
document.getElementById("bod").style.visibility="visible"

document.getElementById("d").value=dc
document.getElementById("m").value=dm
document.getElementById("y").value=dy
obj9= document.getElementById("imgopen")
obj9.style.left=(document.getElementById("ppp").offsetWidth-600)/2

obj9= document.getElementById("k")
obj9.style.width=document.getElementById("ppp").offsetWidth-400-20
obj9.style.height=document.getElementById("ppp").offsetHeight-170
obj9.scrollLeft=0
obj9.scrollTop=<?php if ($ps){echo "0";}else{echo $scroll;}?>

document.getElementById("k20").style.height=obj9.offsetHeight+5
document.getElementById("k20").style.width=obj9.offsetWidth+5
document.getElementById("repo").style.width=obj9.offsetWidth+5

obj9= document.getElementById("kp2")
obj9.style.left=(document.getElementById("ppp").offsetWidth-400)/2
obj9.style.top=(document.getElementById("ppp").offsetHeight-300)/2

document.getElementById("sfil").innerHTML=window.top.document.getElementById("sfil").innerHTML
document.getElementById("goto").value=window.top.document.getElementById("goto").innerHTML

if (document.getElementById("site").value.indexOf('/contents/')>0)   // 
{if (document.getElementById("ms")!=undefined)
{document.getElementById("ms").disabled=true}
if (document.getElementById("sz2")!=undefined)
{document.getElementById("sz2").disabled=true}
if (document.getElementById("mt2")!=undefined)
{document.getElementById("mt2").disabled=true}
if (document.getElementById("apx")!=undefined)
{document.getElementById("apx").disabled=true}
}
}

//******************************************************
function clos()    // 
//******************************************************
{document.getElementById("time1").style.visibility="hidden"
document.getElementById("time2").style.display="none"
document.getElementById("imgopen").style.display="none"
document.getElementById("izm1").style.display="none" 
document.getElementById("izm").style.display="none" 
document.getElementById("kar").style.display="none" 
document.getElementById("ppp").style.visibility="hidden"; //
}

//****************************************************************************************************
function timeb(ppp)  //
//***************************************************************************************************
{if (document.getElementById("row").value!="")
{
if (ppp==1)                                // 
{if  (obj.id=="so") 	
{alert("You cannot set the display time to insert the file content!")
 return
}
if (obj.outerHTML.indexOf('time="~~')>0) //
{mobj= obj.outerHTML.split("~~")
mas=mobj[1].split(",")
   document.getElementById("db").value=mas[0]
   document.getElementById("mb").value=mas[1]
   document.getElementById("de").value=mas[2]
   document.getElementById("me").value=mas[3]
   document.getElementById("dat").value=mas[4]
   document.getElementById("dat1").value=mas[5]
   if (mas[6]==1)
   {document.getElementById("week1").checked=true
}
   else
   {document.getElementById("week1").checked=false}

   if (mas[7]==1)
   {document.getElementById("week2").checked=true}
   else
   {document.getElementById("week2").checked=false}
   if (mas[8]==1)
   {document.getElementById("week3").checked=true}
   else
   {document.getElementById("week3").checked=false}
   if (mas[9]==1)
   {document.getElementById("week4").checked=true}
   else
   {document.getElementById("week4").checked=false}
   if (mas[10]==1)
   {document.getElementById("week5").checked=true}
   else
   {document.getElementById("week5").checked=false}
   if (mas[11]==1)
   {document.getElementById("week6").checked=true}
   else
   {document.getElementById("week6").checked=false}
   if (mas[12]==1)
   {document.getElementById("week7").checked=true}
   else
   {document.getElementById("week7").checked=false}
}
   document.getElementById("time1").style.visibility="visible"
   document.getElementById("time2").style.display=""
}
else if (ppp==2)                               // 
{document.getElementById("time1").style.visibility="visible"
 document.getElementById("imgopen").style.display=""
}}
else
{alert( "No object selected, click to select the object and repeat!")}
}

//*********************************************************************
function ff()                   // 
//*********************************************************************
{document.getElementById("imgb").disabled=false
 document.getElementById("imgm").disabled=false
 document.getElementById("pimg").disabled=false
 str=document.getElementById("new").value     //
 str=str.toLowerCase()           // 
 mext=str.split(".")
 ext=mext[1]
 dop=document.getElementById("sd").value    // 
 if  (dop.indexOf(ext)>0) 
 {}
 else
 {alert("Invalid file extension. \r\n Select a file with a valid extension and repeat.")
  document.getElementById("imgb").disabled=true
  document.getElementById("imgm").disabled=true
  document.getElementById("pimg").disabled=true
  document.getElementById("new").value=""
 }
}

//***************************************************
function for_img()  //
//**************************************************
{str=document.getElementById("new").value
 if (str=="")
 {alert("No file selected, select and repeat!")
  return
 }
  mstr=str.split(".")
 if (mstr.length!=2)
 {alert("The file name must have 1 character. ! \r\nRename and repeat.")
 return
 }
str=str.replace(/ /g,"_")
 mpoz=str.split("\\")
 fill=mpoz[mpoz.length-1]                                           // 
  site= document.getElementById("site").value

  src="" 
  if (site.indexOf('/contents/')>0)                                 // 
  {mass=site.split("/")
  src="pages/" + mass[0] + "/" + mass[1] + "/" + mass[2] + "/" + mass[3] + "/" + fill
}
  else if (site.indexOf('plan/')>=0)                                // 
  {mass=site.split("/")
  src=mass[0] + "/" + mass[1] + "/" + mass[2] + "/" + fill
  }
  else                                                              // 
  {site=site.replace(/.htm/g,"")
  src="pages/" + site + "/" + site + "/" + fill
  }
mimg=document.getElementById("kor").getElementsByTagName("IMG")
  mimg[0].src=src 
  mimg[0].title=document.getElementById("podp").value.replace(/"/g,"")                //
  w=document.getElementById("kor").innerHTML
  w=xx2(w,"name")
  w=xx2(w,"id")
  w=xx2(w,"alt")
  w=w.replace(/<IMG /g,"<img ")
  w=w.replace(/ALT=/g,"alt=")
document.getElementById("html").value=w     // 
//document.getElementById("htm").value=w 
document.getElementById("imgm").click()
}
//*********************************************************************************************
function for_img1()  //
//*********************************************************************************************
{str=document.getElementById("new").value
 if (str=="")
 {alert("No file selected, select and repeat!")
  return
 }
  mstr=str.split(".")
 if (mstr.length!=2)
 {alert("The file name must have 1 character. ! \r\nRename and repeat.")
 return
 }
str=str.replace(/ /g,"_")
mpoz=str.split("\\")
fill=mpoz[mpoz.length-1]                                      //
site= document.getElementById("site").value
imm=document.getElementById("fol").value
site= document.getElementById("site").value
src1=""
  if (site.indexOf('/contents/')>0)                           //
  {src1="pages/" + imm + "/" + fill
  }
  else if (site.indexOf('plan/')>=0)                           //
  {mass=site.split("/")
  src1=mass[0] + "/" + mass[1] + "/" + mass[2] + "/" + fill
  }
  else                                                          //
  {src1="pages/" + imm + "/" + imm + "/" + fill 
  }
  mimg=document.getElementById("kor").getElementsByTagName("IMG")
  mimg[0].title=document.getElementById("podp").value.replace(/"/g,"")        //
  ma=document.getElementById("kor").getElementsByTagName("A")
  if (ma.length==1)                                              // 
  {ma[0].outerHTML=ma[0].innerHTML}
  mimg[0].border=2
  if (mimg[0].outerHTML.indexOf("aa(this)")>0)                   // 
  {mimg[0].id=src1}
  else
  {mimg[0].title= document.getElementById("podp").value.replace(/"/g,"")      // 
   mimg[0].id=src1
   mmm= mimg[0].outerHTML

  
mmm2=mmm.replace(">",' lang="onclick=aa(this)">')
   mimg[0].outerHTML=mmm2    //
}
  w=document.getElementById("kor").innerHTML
  w=xx2(w,"name")
  w=xx2(w,"id")
  w=xx2(w,"alt")
  w=xx2(w,"value")
  w=w.replace(/<IMG /g,"<img ")
  w=w.replace(/ALT=/g,"alt=")
 document.getElementById("html").value=w     // 
//document.getElementById("html").value=document.getElementById("kor").innerHTML       //
document.getElementById("pimg").click()
}
  


//***********************************************************************************************
function for_img2()  //
//***********************************************************************************************
{utf8=document.all("utf8").value
 utf8=utf8.toLowerCase()
 str=document.getElementById("new").value
 if (str=="")
 {alert("No file selected, select and repeat!")
  return
 }
  mstr=str.split(".")
 if (mstr.length!=2)
 {alert("The file name must have 1 character. ! \r\nRename and repeat.")
 return
 }
str=str.replace(/ /g,"_")
mpoz=str.split("\\")
fill=mpoz[mpoz.length-1]                                      // 
site= document.getElementById("site").value
imm=document.getElementById("fol").value
site= document.getElementById("site").value
src1=""
if (site.indexOf('/contents/')>0)                            // 
  {src1="pages/" + imm + "/" + fill
  }
  else if (site.indexOf('plan/')>=0)                         //
  {mass=site.split("/")
  src1=mass[0] + "/" + mass[1] + "/" + mass[2] + "/" + fill
  }
  else                                                       //
  {src1="pages/" + imm + "/" + imm + "/" + fill 
  }
  href="pfoto1.php?utf8="+utf8+"&img="+src1+"&pod=*" 
  mimg=document.getElementById("kor").getElementsByTagName("IMG")
  mimg[0].title=document.getElementById("podp").value.replace(/"/g,"")
  ma=document.getElementById("kor").getElementsByTagName("A")
 if (ma.length==1)                                           //
 {ma[0].href=href
 } 
 else
 {mimg[0].outerHTML="<a target=_blank href="+href+">"+mimg[0].outerHTML+"</a>"
 }
 mimg[0].border=2
 mmm=mimg[0].outerHTML


 mimg[0].outerHTML=mmm.replace('lang="onclick=aa(this)"',"")   // 
  w=document.getElementById("kor").innerHTML
  w=xx2(w,"name")
  w=xx2(w,"id")
  w=xx2(w,"alt")
  w=w.replace(/<IMG /g,"<img ")
  w=w.replace(/ALT=/g,"alt=")
 document.getElementById("html").value=w     //
document.getElementById("imgb").click()
}

//**************************************************************************************
function for_imgu()   //
//*************************************************************************************
{mimg=document.getElementById("kor").getElementsByTagName("IMG")
  if (mimg[0].border!=2)
  {
   alert("Big picture NO!")	  
   return	  
  }	  
  ma=document.getElementById("kor").getElementsByTagName("A")
  if (ma.length==1)                                               // 
  {mimg[0].id=""  
   mimg[0].border=0
   ma[0].outerHTML=ma[0].innerHTML
  }

//lang="onclick=konsp(this)"
  
else if  (mimg[0].lang!="")                                  // 
  {mimg[0].lang="" 
   mimg[0].border=0
  }	  
  else
  {return}	  
  w=document.getElementById("kor").innerHTML
  w=xx2(w,"name")
  w=xx2(w,"id")
  w=xx2(w,"alt")
  w=w.replace(/<IMG /g,"<img ")
  w=w.replace(/ALT=/g,"alt=")
 document.getElementById("html").value=w     //
  document.getElementById("imgu").click()
}

//*************************************************************************************
function for_del()   //
//*************************************************************************************
{
if (!confirm("The content of the page will be permanently deleted, \r\n sure you want this?"))
{return}
else
{document.getElementById("cr").click()}}


//********************************************************************************
function for_apx(subm,kuda)       // 
//********************************************************************************
{
if 	(kuda=="archive")
{frep="moved to "+ kuda}	
else
{frep="copid to "+ kuda}	
if (!confirm("Objects will be "+frep +"! \r\n Are you sure you want this? "))
{return}
spu=""
ms2= document.getElementById("k").getElementsByTagName("*") 
minput= document.getElementById("k").getElementsByTagName("INPUT") 
kcal=0
keva=0
keg=0
kzk=0
for(var j = 0; j <ms2.length ; j++)         
{if (ms2[j].id.substr(0,1)=="u" && ms2[j].checked)    //
{mmm=ms2[j+3].outerHTML.replace('id="cal"','id=cal')
mmm=mmm.replace('id="eva_s"','id=eva_s')
//mmm=mmm.replace('name="Q"','name=Q')
if (mmm.indexOf("id=cal")>0)
{kcal++}
if (mmm.indexOf("id=eva_s")>0)
{keva++}
if (mmm.indexOf("eg.html")>0)
{keg++}
if (mmm.indexOf("zk.html")>0)
{kzk++}

if (kcal>1)
{alert("More than 2 marked calendars! It is forbidden.")
return
}
if (keva>1)
{alert("More than 2 marked calculators! It is forbidden.")
return
}
if (keg>1)
{alert("More than 2 marked diaries! It is forbidden.")
return
}
if (kzk>1)
{alert("More than 2 marked notebooks! It is forbidden.")
return
}



spu=spu + "," + ms2[j].id
}}
if (spu=="")
  { alert("No objects marked!")
   return
  } 
  spu=spu + ","
  document.getElementById("htm").value= spu
document.getElementById(subm).click()
}

//*************************************************************************************
function for_del2(p) // 
//**************************************************************************************
{if (p=="del1")         //
 {if (!confirm("The marked objects will be deleted \r\n on the page and stored in the buffer! \r\n Are you sure you want this? "))
 {return}
 }
 else if (p=="del2")    //
 {if (!confirm("The marked objects will be deleted! \r\nSure you want this? \r\nClick 'NO' to cancel deletion!" ))
 {return}
 }
 else if (p=="buf")    // 
 {if (!confirm("The marked objects will replace the objects in the buffer! \r\nSure you want this? \r\nClick 'NO' to cancel the replacement!" ))
 {return}
 }
else
{return}
spu=""
ms2= document.getElementById("k").getElementsByTagName("*") 
minput= document.getElementById("k").getElementsByTagName("INPUT") 
for(var j = 0; j <ms2.length ; j++)         
{
if (ms2[j].id.substr(0,1)=="u" && ms2[j].checked)
{spu=spu + "," + ms2[j].id
}}
if (spu=="")
{alert("No objects marked!")
return
} 
spu=spu + ","
document.getElementById("htm").value= spu
document.getElementById(p).click()
}

//***********************************************************************************************
function btr3()  //
//***********************************************************************************************
{
if (obj3!="")
{obj3.style.background=""}
obj3=""
obj4=""
}

//***********************************************************************************************
function btr2(event)  // 
//***********************************************************************************************
{
if (obj3=="")                                       //
{return
}
if (document.selection)     // IE
{var sel = document.selection.createRange()
selt=sel.text
start=-1
end=-1
}
else                        // 
{start=document.getElementById('htmr').selectionStart 
end=document.getElementById('htmr').selectionEnd
selt=document.getElementById('htmr').value.substr( start, end-start )
}
if (selt.indexOf("<")>0|| selt.indexOf(">")>0 )        // 
{alert("Inside the selection, the tags!")
return
}
if (selt.indexOf("¶")>0)                             // 
{alert("Separator inside selection!")
return
}

vte=selt.length                                     // 
mee=obj3.getElementsByTagName("*")
//alert(mee[0].outerHTML)
prr=mee[0].lang
if (vte>0)                                           // 
{  
if (prr=="b" || prr=="i" || prr=="small" || prr=="strike" || prr=="b" || prr=="sub" || prr=="sup")
{selt="<"+prr+" lang=$>"+selt+"</"+prr+">"  // 
}
else if  (prr=="A")                                 //
{selt=selt.toUpperCase()
}
else if  (prr=="a")                                 // 
{selt=selt.toLowerCase()
}
else if  (prr=="«A»")                               // 
{selt="«"+selt+"»"
}
else if  (prr=="color")                             //
{sty2=""
col2=document.getElementById('obr').title.replace(/"/g,"")
if (col2!="")
{sty2="color:"+col2+";"
}
bac2=document.getElementById('obr').lang
if (bac2!="")
{sty2=sty2+"background:"+bac2
}
if  (sty2!="")
{selt="<FONT lang=$  style='"+sty2+"'>"+selt+"</FONT>"
}
else
{alert("Sample colors not specified!")
return
}
}}
else                                                  //
{
if  (prr=="." || prr=="," || prr==";" || prr==":" || prr=="!" || prr=="?" || prr=="<br>" || prr=="nbsp")
{if (prr=="nbsp")
{prr="&"+prr+";"}
selt=prr                                         // 
}
else if  (prr=="dat")                                 //
{devdate=new Date();
dy=devdate.getFullYear()
dm=devdate.getMonth()+1
if (dm<10)
{dm="0"+dm}
dc=devdate.getDate();
if (dc<10)
{dc="0"+dc}
selt=" "+dc+"."+dm+"."+dy+" "
}
else if  (prr=="tim")                                //
{devdate=new Date();
selt=" "+devdate.getHours()+":"+devdate.getMinutes()+" "
}
else if  (prr=="var")                                // 
{vari=document.getElementById("ctext").innerHTML
if (vari=="")
{alert("Variable not selected!")
return
}
selt="///"+vari+"///"
}}
if (start==-1 && end==-1)    //
{sel.text=selt}
else                       // 
{begt=document.getElementById('htmr').value.substr(0, start)
 endt=document.getElementById('htmr').value.substr(end,9999999999)
 document.getElementById('htmr').value=begt+selt+endt
}
}
obj3=""
//***********************************************************************************************
function btr(event)  // 
//***********************************************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.parentNode.tagName=="TD")
{obj4=t.parentNode}
else if (t.tagName=="TD")
{obj4=t}
else
{return}
if (obj4.style.background=="brown")
{return}
if (obj3!="")
{obj3.style.background=""}
obj4.style.background="yellow"
obj3=obj4
}

//****************************************************************** 
function vs1()  //
//******************************************************************
{om=document.getElementById("htm").value
if  (om.indexOf("q1(")>0 || om.indexOf("/contents/")>0) 
{if (om.indexOf("q1(")>0)              // 
 { mt=om.split("q1(")
   mt1=mt[1].split(".php")
   mmt=mt1[0].replace("'","")
   mmt=mmt.replace('"',"")
   mmt=mmt + "/" + mmt + "/" + mmt + ".htm"
 }
 else
 {if (om.indexOf("href=")>0)          //
  {mt=om.split("href=")
   mt1=mt[1].split(".php")
   mmt=mt1[0].replace("'","")
   mmt=mmt.replace('"',"")
   mt=mmt.split("/")
   mmt= mt[0]+"/"+mt[1]+"/"+mt[2]+"/"+mt[2]+"/"+mt[3]+".htm"
  }} 
  document.getElementById("htm").value=mmt
  document.getElementById("vs").click()      // 
}
else
{alert("The selected object is not a link to an \r\n internal or external page! \r\n Click the link and redo!")
}} 
 
//*****************************************************************************************************
function ogl() // 
//*****************************************************************************************************
{og="<TABLE  id=s title=0 width=100% border=0><TBODY><TR><TD colspan=2 align=center style=BACKGROUND:#dcdcdc><FONT size=4 >Table of contents</FONT></TD></TR>"
og=og + "<TR><TD width=50%>"
mash2=document.getElementById("k").getElementsByTagName("H2")
mash3=document.getElementById("k").getElementsByTagName("H3")
kk=parseInt((mash2.length+mash3.length)/2)
mas=document.getElementById("k").getElementsByTagName("*")     // 
kkk=0                                                          // 
for(var j = 0; j <mas.length ; j++)                            // 
{if (mas[j].tagName=="H2" || mas[j].tagName=="H3")             // 
{msta= mas[j].getElementsByTagName("A")   //
if (msta.length>0)                        //
{sta=msta[0].outerHTML                     //
stw=mas[j].innerHTML.replace(sta,"")       //
}
else                                       //
{stw=mas[j].innerHTML}	

 if (mas[j].tagName=="H3")
  {og=og + "<LI style='MARGIN-LEFT: 6mm; LIST-STYLE-TYPE: circle'><A href=#s00" + (kkk+1) + " onclick=karp("+ kkk + ")>" + stw + "</A>"
  }
  else
  {og=og + "<LI style='MARGIN-LEFT: 3mm;'><A href=#s00" + (kkk+1) + " onclick=karp("+ kkk + ")>" +  stw + "</A>"
  }
  kkk++
  if (kkk==kk)                             //
  {og=og + "</td><td width=50%>"}
}}
og=og + "</TD></TR></TBODY></TABLE>"
document.getElementById("htm").readOnly=false
document.getElementById("htm").value=og
document.getElementById("html").value=og
document.getElementById("og").click()
}

//********************************************************
function vs2() // 
//********************************************************
{om=document.getElementById("htm").value
//alert(om)
if  (om.indexOf("q1(")>0) 
{document.getElementById("htm").value="*"+om
document.getElementById("slink").click()   //
}
else
{alert("The selected object is not a link to an \r\n internal or external page! \r\n Click the link and redo!")  
}}

//*************************************
function topp(j)   //
//************************************
{
if  (document.getElementById("k20").style.display=="none")
{obj=document.getElementById("k")}
else
{obj=document.getElementById("k20")}
obj.scrollTop=0;
document.getElementById("row").value=""
document.getElementById("htm").value=""
document.getElementById("repo").innerHTML="The transition to the beginning is complete!"  
}
//***********************************
function bopp(j)  // 
//************************************
{if  (document.getElementById("k20").style.display=="none")
{obj=document.getElementById("k")}
else
{obj=document.getElementById("k20")}
obj.scrollTop=999999;
document.getElementById("row").value=""
document.getElementById("htm").value=""
document.getElementById("repo").innerHTML="The transition to the end is done!"  
}

// **********************************************************************  
function aa(j)  // 
//***********************************************************************
{}

//**********************************************************************
function q11(jj) //
//**********************************************************************
{devdate=new Date();
var dy="";
// 
dy=devdate.getFullYear()
var dm="";
//
dm=devdate.getMonth()+1
var dc="";
//
dc=devdate.getDate();
var cd="";
//
dd=devdate.getDay();
var dp=""
dp=dy+"-"+dm+"-"+dc+"-"+dd
objper=document.all["per"];

if (jj.indexOf("/contents/")>=0)
{//
mjj=jj.split("/")
if (mjj[mjj.length-2].indexOf('_0')>0)   //
{
if (mjj[mjj.length-2].indexOf('v')<0)
{
jj=""
for(var j = 0; j <mjj.length-1; j++)
{jj=jj+mjj[j]+"/"}
jj=jj+"help.php"
}
}
objper.href=jj+"?td="+ dp 
}
else
{if (jj=='../gidra')
{objper.href='../gidra/'}
else
{objper.href=jj+"?td="+ dp
}}
objper.click()
}
 




//***************************************************
function sto()  // 
//***************************************************
{document.getElementById("ppp").style.visibility="visible"}


//*****************************************************************
function hred(y2)   // 
//******************************************************************
{if (y2==0)                                        //
{if (document.getElementById("htm").value=="")
{alert("No object for editing is selected! \r\n Click the number to select! ") 
 return
}
rt=document.getElementById("htm").value   //.replace(/></g,">\r\n<")
if (!document.getElementById("H").checked) 
{alert("Selected for editing is not HTML code! \r\n Click the number to select!") 
  return
}
document.getElementById("htmr1").value=rt
document.getElementById("htmr1").readOnly=document.getElementById("htm").readOnly
document.getElementById("time1").style.visibility="visible"

if (document.getElementById("htmr1").readOnly)
{
document.getElementById("red_zag").innerHTML="View HTML code."	
}	
else
{
document.getElementById("red_zag").innerHTML="Editing HTML code."
}
document.getElementById("izm1").style.display=""
}
else                                                //
{if (document.getElementById("htmr1").readOnly)
{
alert("No change!") 
document.getElementById("time1").style.visibility="hidden"
document.getElementById("izm1").style.display="none"
}
else
{
document.getElementById("htm").value=document.getElementById("htmr1").value
document.getElementById("time1").style.visibility="hidden"
document.getElementById("izm1").style.display="none"
finf()

}
}}

//****************************************************************
function colv2(p)  //
//****************************************************************
{
if (document.getElementById("kodc").innerHTML.indexOf("&nbsp;&nbsp;")>=0)
{
alert("No color selected! Click the color!")
return
}
if (p=="col")     //
{document.getElementById('obr').style.color=document.getElementById("kodc").innerHTML
document.getElementById('obr').title='"'+document.getElementById("kodc").innerHTML+'"'
}
else              //
{document.getElementById('obr').style.background=document.getElementById("kodc").innerHTML
document.getElementById('obr').lang=document.getElementById("kodc").innerHTML
}}
//***********************************************************************
function colv(event)   //
//**********************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.parentNode.id!="pal") return
if (t.style.background.indexOf("transparent")>=0)
{col='black'
}
else
{col=t.style.background.split("none")[0]
}
document.getElementById("vcol").style.background=col
document.getElementById("kodc").innerHTML=col
}

//*****************************************************************************
function for_sel(p)  //
//******************************************************************************
{minput= document.getElementById("k").getElementsByTagName("INPUT") 
if (p==2)         // 
for(var j = 0; j <minput.length ; j++)         
{if (minput[j].id.substr(0,1)=="u" && minput[j].checked)
	{minput[j].checked=false}
} 
 else              //
{for(var j = 0; j <minput.length ; j++)
{if (minput[j].id.substr(0,1)=="u" && !minput[j].checked)
{minput[j].checked=true}	
}}}
//************************************************************************************************************************
function vk(p)  //  
//************************************************************************************************************************
{document.getElementById("htm").value=p}
//*****************************************************************
function for_pass()  // 
//*****************************************************************
{devi=prompt("To change enter a new password and click 'OK', to cancel the password enter * and click 'OK', to cancel 'Cancel'!")
if (devi=="" || devi==null)        // 
{return}
document.getElementById("htm").value=devi
document.getElementById("pas").click()
}
wpa=""
//**************************************************************************************
function michael()  // 
//**************************************************************************************
{
/*
if (navigator.appName!="Microsoft Internet Explorer") 
{alert( )
return
}
if (document.getElementById("utf8").value!="2")
{alert(  )
return
}
*/
if (obj1.lang!="PA")
{
alert("Click the object number and repeat!")
return
}
if (wpa=="")
{ wpa=window.open("pgdrw57_1/start2.php","wpa")
}
if (wpa.closed)
{wpa=window.open("pgdrw57_1/start2.php","wpa")
}
 wpa.focus
//********************************************************
// top.opener.document.all("htm").value=www1  
//********************************************************
}

//*************************************************************************
function inkont()  //
//*************************************************************************
{ww=document.getElementById("htm").value
if (ww=="")
{alert("No container selected!")
return
}
if (!confirm("The marked objects will be added to the container! \r\nSure you want this? "))
{return}
if (obj.lang!="ko")
{alert("The selected object is not a container!")
return
}
spu=""
ms2= document.getElementById("k").getElementsByTagName("*") 
minput= document.getElementById("k").getElementsByTagName("INPUT") 
for(var j = 0; j <ms2.length ; j++)         
{if (ms2[j].id.substr(0,1)=="u" && ms2[j].checked)
{mtag2=ms2[j+3].outerHTML
if (mtag2.indexOf("submit")>0 || mtag2.indexOf("SUBMIT")>0 || mtag2.indexOf("<SCRIPT")>0 || 
mtag2.indexOf("<script")>0 || mtag2.indexOf("id=func")>0 || 
mtag2.indexOf("tg/tg.txt")>0 || mtag2.indexOf("tc/tc.txt")>0 || mtag2.indexOf("tq/tq.txt")>0 || mtag2.indexOf("- content")>0   )
{alert("Marked object "+ms2[j].id.replace("u","")+" will not be added, it is: function, active, gadget, content!")
return
}
mmtag22=mtag2.split(">")
mmtag222=mmtag22[0].split(" ")
newt=""
for(var jj = 0; jj <mmtag222.length ; jj++) 
{m5=mmtag222[jj]
if (m5.indexOf("id=")>=0 || m5.indexOf("title=")>=0 || m5.indexOf("time=")>=0)
{}
else
{newt=newt+m5+" "
}}
mmtag22[0]=newt
spu=spu+mmtag22.join('>')
}}

if (spu.indexOf('lang="ko"')>0 || spu.indexOf('lang=ko')>0)
{alert("One of the objects marked for insertion is a container! It is forbidden !")
return
}

if (spu.indexOf('id=kart"')>0 || spu.indexOf('id=kart')>0)
{alert("One of the objects marked for insertion contains a map! It is forbidden !")
return
}








if (spu=="")
{alert("No objects marked!")
return
}
mvalue=document.getElementById("htm").value.replace(/\r/g,"")
mvalue=mvalue.replace(/\n/g,"")
mvalue=mvalue.replace(/(^\s*)|(\s*)$/g, '')        // 
if (mvalue.indexOf("konsp(this)")>0)                 // 
{mobj=mvalue.substr(0,mvalue.length-38)
document.getElementById("htm").value=mobj+spu+"</div></td></tr></tbody></table></div>"
}
else                                               // 
{mobj=mvalue.substr(0,mvalue.length-6)
document.getElementById("htm").value=mobj+spu+"</div>"
}
document.getElementById("kor").innerHTML=document.getElementById("htm").value
 mimg3=document.getElementById("kor").getElementsByTagName("IMG") 
j7=0
for(var j = 0; j <mimg3.length ; j++)
 {
if (mimg3[j].src.indexOf("konsp(this)")<0)
//if (mimg3[j].src.indexOf("minus.gif")<0)
{mimg3[j].alt=j7++
}}
  w=document.getElementById("kor").innerHTML
  w=xx2(w,"name")
  w=xx2(w,"id")
  w=xx2(w,"title")
  w=xx2(w,"alt")
  w=w.replace(/<IMG /g,"<img ")
  w=w.replace(/ALT=/g,"alt=")
document.getElementById("htm").value=w.replace(/\r\n/g,"")
document.getElementById("htm").readOnly=false 
document.getElementById("H").checked=true
finf()
}
//*************************************************************************************************************
 function vgp(event) //
//*************************************************************************************************************
{ev = event || window.event
 var t = ev.target || ev.srcElement
if (t.tagName=='I' || t.tagName=='i')
{document.getElementById("ctext").innerHTML=t.innerHTML
}}
//*****************************************************************
function karp(j)  //
//*****************************************************************
{}

//************************************************************************************
function kc(p)   // 
//************************************************************************************
{if (document.activeElement.tagName=="INPUT"|| document.activeElement.tagName=="TEXTAREA" ) 
{return}
//alert(p)
if (p==13)       // Enter
{if (document.getElementById("tmp1").disabled)  // 
{}
else                                         //
{document.getElementById("tmp1").click()}
}
return
if (p==46)
{document.getElementById("46").click()}
else if (p==49 || p==97)   // st1
{document.getElementById("49").click()}
else if (p==50 || p==98)   // st2
{document.getElementById("50").click()}
else if (p==51 || p==99)   // st3
{document.getElementById("51").click()}
else if (p==52 || p==100)   // help
{document.getElementById("52").click()}
else if (p==53 || p==101)   // 
{document.getElementById("53").click()}
else if (p==54 || p==102)   // 
{document.getElementById("54").click()}
else if (p==55 || p==103)   // 
{document.getElementById("55").click()}
else if (p==56 || p==104)   //
{document.getElementById("56").click()}
else if (p==57 || p==105)   // s
{document.getElementById("57").click()}
}

num2=0
//*************************************************
function next()    // 
//*************************************************
{if (document.getElementById("row").value=="")
{alert("No object selected!")
return
}
if (mdivs!="")
{alert("Doesn't work with filter!")
return
}
num2=parseInt(document.getElementById("row").value)+1
if (parseInt(document.getElementById("all2").innerHTML)<num2)
{num2=0}

mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].title==num2 && mobjk[j].id=="s" )       //
{document.getElementById("k").scrollTop=mobjk[j].offsetTop-40
mobjk[j-2].click()
document.getElementById("repo").innerHTML="The transition to the next object is complete."  
break
}}
}

//*************************************************
function  prev()   // 
//*************************************************
{if (document.getElementById("row").value=="")
{
alert("No object selected!")
return
}
if (mdivs!="")
{alert("Doesn't work with filter!")
return
}
num2=parseInt(document.getElementById("row").value)-1
if (num2<0)
{
num2=parseInt(document.getElementById("all2").innerHTML)}
mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{

if (mobjk[j].title==num2 && mobjk[j].id=="s" )       // 
{document.getElementById("k").scrollTop=mobjk[j-3].offsetTop -40  
//alert(mobjk[j-3].outerHTML)
mobjk[j-2].click()
document.getElementById("repo").innerHTML="The transition to the previous object is completed."  
break
}}
}
mdivs = ""
//********************************************************************************************************
function gotf(p)                                   //
//********************************************************************************************************
{if (p==2)                                         //
{if (mdivs=="")
{alert("There was no filtering!")
return
}
nbj=""
for(var j = 0; j <mdivs.length ; j++)              //
{if  (mdivs[j].indexOf('time="~~')>0)              //
{ppt=" - show by time"}
else
{ppt=""}
nbj=nbj+"<br><input id=u"+j+" type=checkbox><b style='background:#a9a9a9;color:white'>&nbsp;&nbsp;&nbsp;"+j+"&nbsp;&nbsp;&nbsp;"+ppt+"</b>"+mdivs[j]
}
document.getElementById("k").innerHTML=nbj
//var mdivs = new Array();    //
document.getElementById("repo").innerHTML="Filter canceled!"
mdivs = ""
}
//**********************************************************************************
else                                              // 
{if (document.getElementById("sfil").innerHTML=="")
{alert("No filtering object selected! \r\n Click 'Number' or Object!")
return
}
window.top.document.getElementById("sfil").innerHTML=document.getElementById("sfil").innerHTML
window.top.document.getElementById("goto").innerHTML=document.getElementById("goto").value
kont=document.getElementById("goto").value
if (kont=="")
{return}
mkont=kont.split("/")                            //  
for(var jj = 0; jj <= mkont.length-1; jj++)
{if (mkont[jj]=="")
{alert("Empty context in filter list!")
return
}}
if (mdivs == "")
{mdivs = new Array();                             // 
mdiv= document.getElementById("k").getElementsByTagName("*")
k7=0
for(var j = 0; j <mdiv.length ; j++)               // 
{if (mdiv[j].id=="s")
{mdivs[k7++]=mdiv[j].outerHTML             
}}}
if (document.getElementById("sfil").innerHTML=="NUM")  //
{for(var jj = 0; jj <= mkont.length-1; jj++)
{if (isNaN(mkont[jj]))
{alert("For N, the filter is only a number!")
return
}}}
nbj=""
//********************************************************************************************
if (document.getElementById("sfil").innerHTML=="NUM")   // 
{for(var j = 0; j <mdivs.length ; j++)             // 
{for(var jj = 0; jj <= mkont.length-1; jj++)
{if  (parseInt(mkont[jj],10)==(j))                // 
{if  (mdivs[j].indexOf('time="~~')>0)             // 
{ppt=" - show by time"}
else
{ppt=""}
nbj=nbj+"<br><input id=u"+j+" type=checkbox><b style='background:#a9a9a9;color:white'>&nbsp;&nbsp;&nbsp;"+j+"&nbsp;&nbsp;&nbsp;"+ppt+"</b>"+mdivs[j]}
}}
}
//*****************************************************************************************
else                                            //
{for(var j = 0; j <mdivs.length ; j++)             // 
{ott=mdivs[j].replace(/(^\s*)|(\s*)$/g, '')        // 
ott=ott.replace(/\r\n/g,"") 
// 
if (ott.substr(0,1)=="<" )
{ ott=ott.replace(/></g,"##")
  ott=ott.replace(/>/g,">\r\n") 
  ott=ott.replace(/</g,"\r\n<")
  ott=ott.replace(/##/g,"><")
  mass=ott.split("\r\n") 	
  kkor=""
  tags=""
for(var jj = 2; jj <= mass.length-2; jj++)
{kkor=kkor +  (mass[jj])
jj++
}}
for(var jj = 0; jj <= mkont.length-1; jj++)
{if (kkor.indexOf(mkont[jj])>=0)                   //
{if  (mdivs[j].indexOf('time="~~')>0)             //
{ppt=" - show by time"}
else
{ppt=""}
nbj=nbj+"<br><input id=u"+j+" type=checkbox><b style='background:#a9a9a9;color:white'>&nbsp;&nbsp;&nbsp;"+j+"&nbsp;&nbsp;&nbsp;"+ppt+"</b>"+mdivs[j]
break
}}}}
document.getElementById("repo").innerHTML="Filtering!"
document.getElementById("k").innerHTML=nbj
}}
//***************************************************************************************************************
// 
todisab="add,ins,s5,xs5,del2,del4,ikont,buf2,res,res1,p_ins,sz2,mt2,time,ogl5,vs10,vs20,pub,pas2,for_del5,show,"+
"fin,hred2,otr2,got,got2,del3,pred3,LL"
mtodis=todisab.split(",")
//*****************************************************************************************************************
function tt2(p)                                    //
//*****************************************************************************************************************
{document.getElementById("from").value=p
document.getElementById("k20").innerHTML=window.top.document.getElementById(p).innerHTML
document.getElementById("k20").style.display=""
document.getElementById("tmp3").disabled=false
if (p=="tc" || p=="tg" || p=="tq")
{document.getElementById("pu").disabled=false}
if (p=="tLink")
{document.getElementById("so").disabled=false}
if (p=="tv")
{document.getElementById("rez").disabled=false}
if (p=="tv" || p=="tb" || p=="tt" )
{document.getElementById("kol").disabled=false}
for(var j = 0; j <mtodis.length ; j++)  
{if (document.getElementById(mtodis[j])!=undefined)
{document.getElementById(mtodis[j]).disabled=true
}
}}
//********************************************************************************************************************
function tmpclick(event)                    // 
//********************************************************************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.id=="k20")                             //
{document.getElementById("repo").innerHTML="<b style=color:red>Slip! Click an object!</b>"
document.getElementById("htm").value=""
return}
if (t.tagName=="A")                        //  
{document.getElementById("htm").value=""
document.getElementById("repo").innerHTML="Transition "
return}
if (t.id=="sss")                          // 
{sdiv='<DIV  id=s  class=normal title="0" time="0">'
mdiv=t.parentNode.getElementsByTagName("U")
if (mdiv.length==0)                       // 
{document.getElementById("repo").innerHTML="<b style=color:red>No links! Click 'V' to continue.</b>"
return
}
for(var j = 0; j <mdiv.length ; j++) 
{sdiv=sdiv+(j+1)+"&nbsp;&nbsp;"+mdiv[j].outerHTML+"<br>"
}
sdiv=sdiv+"</div>"
document.getElementById("htm").value=sdiv
return
}
if (t.id!="s")                             //
{t2=t
for(var j = 0; j <9999 ; j++)  
{if (t2.id=="s")
{break}
t2=t2.parentNode
if (t2.id=="k20")
{document.getElementById("repo").innerHTML="<b style=color:red>Past! Click an object!</b>"
document.getElementById("htm").value=""
return
}}



if (document.getElementById("from").value=="apx" || document.getElementById("from").value=="tmp" )
{
w=t2.outerHTML
if (w.indexOf("id=eg")>0 || w.indexOf('id="eg"')>0) 
{mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].id=="s" )                              //
{ww=mobjk[j].outerHTML
if (ww.indexOf("id=eg")>0 || ww.indexOf('id="eg"')>0)
{alert("The page already has a diary! Pasting from archive or mine is prohibited!")
return
}}}}

if (w.indexOf("id=zk")>0 || w.indexOf('id="zk"')>0) 
{mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].id=="s" )                              //
{ww=mobjk[j].outerHTML
if (ww.indexOf("id=zk")>0 || ww.indexOf('id="zk"')>0)
{alert("The page already has a notebook! Pasting from archive or mine is prohibited!")
return
}}}}

if (w.indexOf("id=cal")>0 || w.indexOf('id="cal"')>0) 
{mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].id=="s" )                              //
{ww=mobjk[j].outerHTML
if (ww.indexOf("id=cal")>0 || ww.indexOf('id="cal"')>0)
{alert("The page already has a calendar! Pasting from archive or mine is prohibited!")
return
}}}}


if (w.indexOf("id=eva")>0 || w.indexOf('id="eva"')>0) 
{mobjk= document.getElementById("k").getElementsByTagName("*") 
for(var j = 0; j <mobjk.length ; j++)                //
{if (mobjk[j].id=="s" )                              //
{ww=mobjk[j].outerHTML
if (ww.indexOf("id=eva")>0 || ww.indexOf('id="eva"')>0)
{alert("The page already has a calculator! Pasting from archive or mine is prohibited!")
return
}}}}
}






document.getElementById("htm").value=t2.outerHTML.replace(/\r\n/g,"")
document.getElementById("repo").innerHTML="Template selected!"
}
else                                       //
{document.getElementById("htm").value=t.outerHTML.replace(/\r\n/g,"")}
document.getElementById("htm").readOnly=true
document.getElementById("repo").innerHTML="Template selected!"
}

//****************************************************************************************************
function tmp2()     // 
//*****************************************************************************************************
{for(var j = 0; j <mtodis.length ; j++)  
{if (document.getElementById(mtodis[j])!=undefined)
{document.getElementById(mtodis[j]).disabled=false
}}
if (document.getElementById("k20").style.display=="none")
{return}
if (document.getElementById("htm").value=="")
{document.getElementById("k20").style.display="none"
return
}
w=document.getElementById("htm").value
//w=xx2(w,"name")
//w=xx2(w,"id")
//w=xx2(w,"title")
//w=xx2(w,"alt")
document.getElementById("htm").value=w
document.getElementById("tmp1").click()
}

//*****************************************************************************
function for_podp() // 
//*****************************************************************************
{obj1.title=document.getElementById("podp").value.replace(/"/g,"")
w=obj.outerHTML
w=xx2(w,"name")
w=xx2(w,"id")
//w=xx2(w,"title")
w=xx2(w,"alt")
document.getElementById("html").value=w       //
document.getElementById("vvv").click()
}






//**************************************************************************************************************************
function xx2(htmltext,context)   //
//**************************************************************************************************************************
{
context=context.toLowerCase()
context2=context.toUpperCase()
htmltext=htmltext.replace(new RegExp(context2, 'g'), context)
htmltext=htmltext.replace(context+'=""', "")
htmltext=htmltext.replace(/context2/g,context)
mmm=context+'=""'
htmltext=htmltext.replace(/mmm/g,"")
if (htmltext.indexOf(context+'="')<0)
{return htmltext}
if (htmltext.indexOf(context+'=""')>0)
{return htmltext}
mre=htmltext.split(context+'="')
for(var j = 0; j <mre.length ; j++)
{if (j==0)
{re2=mre[j]}
else
{re2=re2+context+"="+mre[j].replace('"',"")
}}
return re2
}

//********************************************************************
function ptab() //
//********************************************************************
{
newstr2="<b>Website: </b>"+document.getElementById("sname2").innerHTML
newstr2=newstr2+"<h2 style='text-align:center'>Page <?php echo rtr($nam);?>, object and its code</h2>"
mmm=document.getElementById("htm").value.replace(/href=/g,"href2=")
mmm=mmm.replace(/onclick/g,"onclick2")
newstr2=newstr2+mmm+"<hr>"
mmm=document.getElementById("htm").value
mmm=mmm.replace(/\r/g,"")
mmm=mmm.replace(/\n/g,"")
mmm2=mmm.split("><")
mmm3=""
for(var j = 0; j <mmm2.length ; j++)
{mmm4=mmm2[j].replace(/</g,"&lt;")
mmm4=mmm4.replace(/>/g,"&gt;")
mmm3=mmm3+mmm4
if (j!=(mmm2.length-1))
{mmm3=mmm3+"&gt;<br>&lt;"
}}
newstr2=newstr2+mmm3
dop=window.open("","","");
tnap="<HTML><HEAD><META http-equiv=Content-Type content='text/html; charset=windows-1251'></head>"
tnap=tnap+newstr2+"</html>"
dop.document.write(tnap)
}
//****************************************************************
function del_img()   // 
//****************************************************************
{malt=obj1.alt
mimg1=""                                       // 
mimg=document.getElementById("kor").getElementsByTagName("IMG")   // 
if (mimg[0].src.indexOf("tables_8.gif")>=0)
{alert("This picture is not deleted!")
return	
}	
if (obj1.parentNode.tagName=="A")              // 
{href_arr=obj1.parentNode.href.split("&")      // 
mimg1="/pages"+href_arr[1].split("pages")[1]
obj1.parentNode.outerHTML='<img alt='+malt+' src="../gidra/d~e~f/tables_8.gif"  style="float:left">';
}
else
{obj1.outerHTML='<img alt='+malt+' src="../gidra/d~e~f/tables_8.gif"  style="float:left">';	
}	
if (mimg[0].id!="")                              //
{mimg1="/pages"+mimg[0].id.split("pages")[1]     //
}
mimg2="/pages"+mimg[0].src.split("/pages")[1]
document.getElementById("html").value=obj.outerHTML+"<!>"+mimg1+"<!>"+mimg2
document.getElementById("imgd").click()	
}



</script>

<div id=k20 onclick=tmpclick(event) 
style="border:black 2px double;display:none;OVERFLOW: scroll; background:#f5f5dc; HEIGHT: 79%;position:absolute;top:20;left:0">
</div>
 <script language="VBS">
document.getElementById("utf8").value="2"
</script>

</body></html>