<?php header('Content-Type: text/html; charset=windows-1251'); ?>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>List of internal pages</title>
<style>
td {color:#316290;font-family:tahoma;font-size:12px;font-weight:normal;}
th {color:#316290;font-family:tahoma;font-size:12px;font-weight:bold;}
b {color:#316290;font-family:tahoma;font-size:12px;font-weight:bold;}
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}
</style>
</head>
<body  onclick=va(event)  background="../d~e~f/bkg4.gif" leftMargin=0 id=bod topMargin=0 
style="overflow:hidden;visibility:hidden;" width=100% height=100% >
<table id=h style="z-index:2;opacity:0.3;visibility:hidden;height:110%;width:110%;position:absolute;top:0;left:0;background:black;filter:alpha(opacity=30)"><tr><td>&nbsp;&nbsp;&nbsp;</td><tr></table> 
<b style="display:none" id=eg_td1 title=""></b>
<?php
//--------------
include "../f.php";   //  
//--------------
if (isset ($_REQUEST['nam']))       //
{$nam=trim($_REQUEST['nam']);}
else
{$nam=trim($_GET['nam']);}
if (isset ($_REQUEST['pag']))       //
{$pag=trim($_REQUEST['pag']);}
else
{$pag=trim($_GET['pag']);}

if (isset ($_REQUEST['utf8']))      // 
{$utf8=trim($_REQUEST['utf8']);}
else
{$utf8=trim($_GET['utf8']);}

if (isset ($_REQUEST['pas']))       // 
{$pa=trim($_REQUEST['pas']);}
else
{$pa=trim($_GET['pas']);}


if (isset ($_REQUEST['gpas']))      // 
{$gpas=trim($_REQUEST['gpas']);}
else
{$gpas=trim($_GET['gpas']);}

if (isset ($_REQUEST['spv']))      // 
{$spv=trim($_REQUEST['spv']);}
else
{$spv=trim($_GET['spv']);}

if (isset ($_REQUEST['add']))      // 
{$add=trim($_REQUEST['add']);}
else
{$add=trim($_GET['add']);}
$kat=getcwd ( );		 		// 
//*************************************************************************************************
if (isset ($_REQUEST['pr']))  // 
//*************************************************************************************************
{$l = file($kat."/page.txt");
// 
$t=";";
foreach ($_REQUEST as $i => $z)
 { $poz=strpos($i,";");
 if ($poz>0)                                    // 
  {$t=$t.$i;}
  }
if ($t==";")                                    // 
{}
$filename = $kat.'/otd.txt';	              	// 
$filenamew = $kat.'/otdw.txt';	            	//
$ll = file($filename);	                        // 
$h=array();                                     // 
$i=0;
foreach ($ll as $li => $linn)
{if (strlen($linn)>2) {$h[$i++]=c($linn,0);}}
$hw = fopen($filenamew, 'w') or exit;             //
foreach ($h as $li => $lin)
{if (substr_count($lin,$nam)>0)
 {$stt=explode("/", $lin);                        //
  if (isset ($_REQUEST['pasn'])) 
  {$pasn=$_REQUEST['pasn'];
  if ($pasn=="") {$pasn=$stt[2];} 
  } 
  else
  {$pasn="qwerty";}
  $w=$stt[0].'/'.$stt[1].'/'.$pasn.'/'.$t;
  fwrite($hw,trim(c($w,1))."\r\n");
 }
 else
 {fwrite($hw,trim(c($lin,1))."\r\n");
 }
}
fclose($hw);
if (!copy($filenamew, $filename)) {echo "failed to copy $file...\n";}
if  ($gpas==$pa)                             // если администратор зададим стартовую страницу (пароль субъекта равен паролю админа)
{$ll= file($kat."/otd.txt");                  // субъекты
foreach ($ll as $li => $linn)
{if ($li==1)                                  // если строка администратора  выберем последнюю страницу  и сделаем ее стартовой
{$str=explode(";",$linn);                     // объект
$str1=c($str[1],0);
//echo $str1;
$hw = fopen("../start_page.txt", 'w') or exit;    //файл  стартовой страницы для расширения HTM
fwrite($hw,$str1.".php");
fclose($hw);
}
}
}
$soob="Password and access accepted! ";
}
//*********************************************************************************************
$ll= file($kat."/otd.txt");            // 
//**********************************************************************************************
$stro=array();  
$i=0;
foreach ($ll as $li => $linn)
{if (strlen($linn)>2) {$stro[$i++]=c($linn,0);}}
$str=explode("/",$stro[$pag]);        //
$spi=$str[3];                         //
$l = file($kat."/page.txt");
echo '<b style=color:red>WEBSITE:&nbsp;&nbsp;&nbsp;</b><b id=sname2>';
include "../plan/name.txt";
echo '</b>';
echo '<table border="0" width=100% HEIGHT=100%><tbody><TR><td valign=top width=75%>'."\n";
echo '<table border="0" HEIGHT=100% width=100%><tbody>
<tr><td colspan=4 align=center valign=top>
<b><big>OBJECTS</big> 
&nbsp;ascending</b>&nbsp;<img id=ksort onclick=izs(this) src="../d~e~f/yes.gif" 
title="Sort ascending: Mark me, click the title in the header;
Sort Descending: reset me, click the title in the header;
Undo sort: click again">
&nbsp;&nbsp;&nbsp;<button title="To begin" onclick=tnd(event,0) style="background:white">&nbsp;&#8593;&nbsp;</button>&nbsp;&nbsp;
<button style="background:white" onclick=tnd(event,9999999) title="To end">&nbsp;&#8595;&nbsp;</button>
&nbsp;&nbsp;&nbsp;<button  title="In a separate window for printing" onclick=ptab()>&nbsp;P&nbsp;</button>&nbsp;&nbsp;&nbsp;
<br>
<b>filter in <b id=zs>?</b> and by </b>
<input type="text" id=goto size="30" title="One or more contexts, with a separator
with / to filter by the selected column. The column is selected by clicking past the text.">
<button form="" onclick=got(0) 
title="Show only those rows that contain context anywhere in the text that is clicked on the column number.">
select</button>
<button form="" onclick=got(2) 
title="Cancel selection">cancel</button>';
echo '<center><b id=soob style=color:brown>';
echo "&nbsp;".$soob;
echo'</center>
</td></tr>
<TR><td valign=top>';
$stt=explode("/", $l[0]);                  //
echo '<table id=zag border="1" width=100% onclick=clz(this,event) style="background:#eee8aa">
<THEAD><TR id=sort>'."\n";
echo '<TH width=1% title="Click me to view the page in the corresponding row." lang=0>&nbsp;&nbsp;N&nbsp;&nbsp;&nbsp;&nbsp;
</TH>'."\n"; 
foreach ($stt as $lli => $llin)
{if ($lli==0)                              //
{ echo '<TH width=48% title="To create a standalone page, database tables or upload to a docs page
select a line and click it." lang=1>'.$llin.'&nbsp;(loading documents)</</TH>'."\n";
}
else                                       //
{echo '<TH width=48% title="To edit an internal page created by an administrator,
click the desired line." lang=2>'.$llin.'&nbsp;(page editing)</TH>'."\n";
}}                                          //
echo '<TH width=1% title="To set the start page or
providing access to edit pages install or reset me." lang=3>Access</TH>'."\n"; 
echo "</TR><TR id=sel title='Click me to filter'><TH>1</TH><TH>2</TH><TH>3</TH><TH>4</TH></TR>
</THEAD></TBODY></table>\n";    //
// 
echo '<DIV id=k onclick=v(event) style="OVERFLOW: scroll; HEIGHT: 90%;" align=left>'."\n";
if ($utf8!="")
{echo '
<form id=f method="POST" enctype="multipart/form-data" action="otd1.php?pag='.$pag.'">';
$da=false;
if  ($gpas==$pa)
{$da=true;}
//
foreach ($l as $li => $lin)
{ if ($li==0)                                  //
 {echo '<table border="1px" id=tab2 width=100%>'."\n";
  echo "<TBODY>\n";
  }
 else                                          //
 {if($da)                                      //
   {echo '<tr>'."\n";
     $stt=explode("/", $lin);                  //
     $ops=str_repeat("", 4-strlen($li)).$li;
      echo '<td width=2% >&nbsp;<a  target=_blank href="../pages/'.str_replace(".htm",".php",trim($stt[1])).$td.'">'.$ops.'</a>&nbsp;&nbsp;</td>'."\n";    
     foreach ($stt as $lli => $llin)            // 
      {$ss=trim($stt[1]);
       $cont=str_replace(".htm","",trim($stt[1]));	
	   if ($lli==0)                            // 
       {echo '<td width=48%><a target=_blank href="../reddoc.php?&utf8='.$utf8.'&im='.$cont.'&tip=new'.'&fol='.$cont.'">'.str_replace("_"," ",trim($llin))."</a></td>\n";
       } 
       else                                     //
       {$ss=trim($llin); 
	   echo '<td width=48%><a target=_blank href="../zsite.php?site='.trim($llin).'&utf8='.$utf8.'&nam='.tr(trim($stt[0])).'&fol='.$cont.'">'.str_replace("_"," ",trim($llin))."</a></td>\n";
	   }
      }
	  $name=trim($stt[1]);                      //
	  $poz=strpos($name,'.htm');
	  if ($poz>0) {$name=substr($name,0,$poz).";";}
      if (substr_count($spi, ";".$name)>0)       // 
     {echo '<td width=2% bgcolor="green" align="center" width=10><input type="checkbox"   name="'.$name.'" checked></td>'."\n"; } 
     else                                       // 
    {echo '<td  width=2% align="center"><input width=10  type="checkbox" name="'.$name.'" value="OFF"></td>'."\n";  } 
     $ky= "fu('".str_replace(" ","_", trim($stt[0]))."/".trim($stt[1])."')";
   } 
//****************************************************************************************** 
 else                                         // 
 {$stt=explode("/", $lin);                    // 
 $ops= str_repeat("&nbsp;", 5-strlen($li)).$li;
	  $name=trim($stt[1]);
	  $poz=strpos($name,'.htm');
	  if ($poz>0) {$name=substr($name,0,$poz).";";}
  if (substr_count($spi, ";".$name)>0)        // 
    {
	echo '<tr>'."\n";
     echo '<td width=40px><a  target=_blank href="../pages/'.str_replace(".htm",".php",trim($stt[1])).$td.'">'.$ops.'</a></td>'."\n";    
     foreach ($stt as $lli => $llin)          // 
      {$ss=trim($stt[1]);
       $cont=str_replace(".htm","",trim($stt[1]));	
	   if ($lli==0)                          //
       {  echo '<td width=50%><a target=_blank href="../reddoc.php?&utf8='.$utf8.'&im='.$cont.'&tip=new'.'&fol='.$cont.'">'.trim($llin)."</a></td>\n";
  } 
       else 
       {$ss=trim($llin); 
	   echo '<td width=50%><a target=_blank href="../zsite.php?site='.trim($llin).'&utf8='.$utf8.'&nam='.tr(trim($stt[0])).'&fol='.$cont.'">'.str_replace("_"," ",trim($llin))."</a></td>\n";
	   }
      }
	  $name=trim($stt[1]);
	  $poz=strpos($name,'.htm');
	  if ($poz>0) {$name=substr($name,0,$poz).";";}
    if (substr_count($spi, ";".$name)>0)         //
  {echo '<td  width=20px bgcolor="green" align="center"><input type="checkbox" disabled  name="'.$name.'" checked></td>'."\n"; } 
  else                                           //
  { echo '<td width=20px align="center"><input  type="checkbox" name="'.$name.'" value="OFF"></td>'."\n";  } 
   $ky= "fu('".str_replace(" ","_", trim($stt[0]))."/".trim($stt[1])."')";
    }
}}}
}
else
{echo '<font color=red size="4">Wrong start! Access is possible only through the main admin form!</font>';}
echo '
</tbody></table></div>';
?>
</td>
</tr>
</tbody></table>
</td><td  width=400px>
<nobr>
<b>WEBSITE:</b>&nbsp;&nbsp;&nbsp;<button form="" style="background:white" onclick=pokaz() title="Open the site to select a page for editing by opening this page.
Click me, on the site go to the page you want to edit, click 'Internal Pages List' click 'Edit'.">Open</button>&nbsp;&nbsp;
<button form="" id=sE style="background:white;display:none" onclick=pokaz2(0) title="Open the INNER PAGE CONSTRUCTOR form for a page on the site."  >Edit</button>&nbsp;&nbsp;
<button form="" id=sL style="background:white;display:none" onclick=pokaz2(2) title="Open the PAGE OBJECTS form for a page on the site."  >Load</button>
</nobr>

<input id=pr style="display:none" title="Accept entered and/or changed data." name=pr type="submit" value="Accept" >

<?php
if ($utf8!="")
{
echo '<hr><center><big><b>Subject rights "'. $nam. '"</b></big></center>'."\n";
if  ($gpas==$pa)
{
echo '<li> To change the password and / or access, enter a new password, and / or click in the line to set or reset access, click "Accept"';
echo '<li> To define the page as the start page, in administrator mode, set access in the required line, and click "Accept"';
echo '<br><br><nobr>Password&nbsp&nbsp<input id=pasn type="text" name="pasn" value="" size=8>';
echo '&nbsp;<input style="background:white" title="Reset entered data" type="reset" value="Reset" name="B2">'."\n";
?>
<button onclick=pr2(event)  form=""  
title="Accept entered and/or changed data.">&nbsp;Accept&nbsp;&nbsp;</button>
<?php
echo '&nbsp;<input type="hidden" value="'.$nam.'" name="nam"></nobr>'."\n";
if ($pag==1 and file_exists(getcwd ( )."/2.txt")) 
{

echo '<hr>Archiving:&nbsp;<button style="background:green;color:white" onclick=save(event,0) style="background:white" title="Create archive of selected pages. Mark in the column Access those in the archive and click me!">Save</button>';
echo '&nbsp;&nbsp;&nbsp;<button style="background:green;color:white" onclick=save(event,2) style="background:white" title="Add or replace the marked pages to the archive of the selected pages. Mark in the column Access those in the archive and click me!">Add</button>';
echo '<a style=visibility:hidden id=save2 target=_blank href=saveall.php?add=0&spv=1;2;3>Save</a>';
//echo '<a id=add2 target=_blank href=saveall.php?add=2&spv=1;2;3>Add</a>';
}}}
?>
<input type="hidden" id=nam value="<?php echo $nam;?>" name="nam">
<input type="hidden"  value="<?php echo $pag;?>" name="pag">
<input type="hidden"  value="<?php echo $pa;?>" name="pas">
<input type="hidden"  value="<?php echo $gpas;?>" name="gpas">
<input type="hidden"  value="<?php echo $utf8;?>" name="utf8">
</form>
<form id=f2 method="POST" enctype="multipart/form-data" target=_blank action="saveall.php">
<input id=pr3 type="submit" name=pr3 style=display:none>
<input type="hidden"  value="" id=spv name="spv">
<input type="hidden"  value="" id=add name="add">
</form>
<b>
<br><ol><b>Notes:</b><br><br>
<DIV style="OVERFLOW: scroll;height:250;width:340">
<li><a  href="../help/4.htm#47" target=_blank>&nbsp;Help&nbsp;</a>
<li> To view the page, select the required page in the "N" column and click the link. <br>
<li> To upload files to the page or create independent pages on the page, select the required page in the "Page name" column and click the link. <br>
<li> To edit using the Inner Page Builder, click in the Page File column. <br>
<li> To create internal pages in admin mode, click "structure" <br>
<li> After changing the structure, click F5 to update
<li> We recommend that you close all windows except the password window before updating the structure
<li> If the page table is empty - no access to the pages. Contact your administrator for access.
<li> To create a custom archive, close access to the site, mark in the column
 "Access" the desired pages, cancel the start page and click "Save".
 <li><b style=color:red>The control for entering an existing password is not performed. To control in administrator mode, click "Subjects" and use standard tools to find a repeated password and change one of the repeated passwords.</b>
</ol>
</div>
</td></tr>
</b>


<SCRIPT type="text/javascript">
//*********************************************************
window.onload=function () // 
//********************************************************
{
obj= document.getElementById("k")
obj.style.height=document.getElementById("h").offsetHeight-220
obj.scrollLeft=0
document.getElementById("bod").style.visibility="visible"
}

//************************************************************
function pr2(event)     //
//***********************************************************
{ev = event || window.event
ev.cancelBubble = true
ev.returnValue = false
try 
{ev.preventDefault()} 
catch (err) {}

kol=0
kold=0
mas=document.getElementById("k").getElementsByTagName("INPUT")
for(var j = 0; j <mas.length ; j++)
{if (mas[j].checked)
{kold++
 break	
}	
  kol++
}
if (kold==0 )
{ alert("No start page or access pages!")
return
}
if (document.getElementById("pasn").value=="" )
{ alert("Password not entered! The old password will be saved.")
}
document.getElementById("pr").click()
}
obj2=""   // 
//************************************************************
function v(event)  //
//***********************************************************
{event = event || window.event
var t = event.target || event.srcElement
if (t.outerHTML.indexOf('checkbox')>0)
{return}	
if (t.tagName=="TD" )                                   // 
{if (obj2!="")
{obj2.style.background=""
}
t.style.background="yellow"                  // 
obj2=t
}}
//*******************************************************
function tnd(event,p)  // 
//******************************************************
{ev = event || window.event
ev.cancelBubble = true
ev.returnValue = false
try 
{ev.preventDefault()} 
catch (err) {}
document.getElementById('k').scrollTop=p
}
//*******************************************************
function izs(p)  //  
//******************************************************
{if (p.src.indexOf('no.gif')>0) 
{p.src='../d~e~f/yes.gif'}
else
{p.src='../d~e~f/no.gif' }}
objsort=""
objselect=""
isort="no"
//********************************************************************************************************
function clz(p,event)  //
//********************************************************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.tagName!="TH") return
if (t.parentNode.id=="sort")                       //
{if (objsort!="")                                  //
{if (t.style.background.indexOf("yellow")>=0)      //
{sort2(3)
return
}
objsort.style.background=""
objsort.style.color=""
}
isort=t.lang
t.style.background="yellow"
t.style.color="brown"
objsort=t
if (document.getElementById("ksort").src.indexOf('no.gif')>0)
{sort2(2)}
else
{sort2(1)}
objsort=t
}
else if (t.parentNode.id=="sel")            // 
{
if  (t.innerHTML==4) return                // 
if (objselect!="")                         // 
{objselect.style.background=""
objselect.style.color=""}
t.style.background="yellow"
t.style.color="brown"
document.getElementById("zs").innerHTML=t.innerHTML
objselect=t
document.getElementById("soob").innerHTML="Column "+ t.innerHTML +" for filter is selected"
}
else
{return}
}
//********************************************************
function sort2(p)  // 
//********************************************************
{if (p==1 || p==2 || p==3)
{if (obj2!="")                //
{obj2.style.background=""
}
// 
var mss = new Array();                //
is=parseInt(isort,10)                 //
mas=document.getElementById("tab2").getElementsByTagName("TR")

if (p==3)
{p=1
is=0
objsort.style.background=""
objsort.style.color=""
document.getElementById("soob").innerHTML="Sorting canceled"
}
else if (p==1)
{
document.getElementById("soob").innerHTML="Sort ascending, column "+(is+1)+" !"
}
else if (p==2)
{
document.getElementById("soob").innerHTML="Sort Descending, Column "+(is+1)+" !"
}


if (is==3)   // 
{for(var j = 0; j <mas.length ; j++)
{mas2=mas[j].getElementsByTagName("INPUT")
if (mas2[0].checked)
{mss[j]="0#"+(j)}
else
{mss[j]="1#"+(j)}
}}
else         // 
{for(var j = 0; j <mas.length ; j++)
{mas2=mas[j].getElementsByTagName("A")
oper= mas2[is].innerHTML
oper2=oper.length
if (oper2==10)
{}
else if (oper2>10)
{oper=oper.substr(0,10)}
else if (oper2<10)
{if (is!=0)
{for(var jj = 1; jj <10-oper2 ; jj++)
{oper=oper+"0"}
}
else
{for(var jj = 1; jj <10-oper2 ; jj++)
{oper="0"+oper}
}}
mss[j]=oper+"#"+(j)
}}


mss=mss.sort()
mtr="<table border=1 id=tab2 width=100%>"
if (p==1)
{
for(var j = 0; j < mas.length; j++)
{sss=mss[j].split("#")
iii=parseInt(sss[1])
mtr=mtr+mas[iii].outerHTML
}}
else
{for(var j = mas.length-1; j>=0; j--)
{sss=mss[j].split("#")
iii=parseInt(sss[1])
mtr=mtr+mas[iii].outerHTML
}}
document.getElementById("tab2").outerHTML=mtr+"</table>"
}
}
objwin=""
//***********************************************************
function pokaz()   //
//***********************************************************
{mas=document.getElementById("tab2").getElementsByTagName("A")
if  (mas.length==0) return
mas2=mas[0].href.split("pages")
sss="../pages"+mas2[1]
if  (objwin=="")
{objwin=window.open(sss,"objwin")
document.getElementById("sE").style.display=""
document.getElementById("sL").style.display=""
return
}
if (objwin.closed )
{objwin=window.open(sss,"objwin")
return
}
alert("The site is already open! Click it!")
return
if (document.getElementById("ifr").style.visibility=="visible")
{mloc5=" "+document.getElementById("ifr").contentWindow.document.location
mloc2=mloc5.split("/pages/")
mmloc=mloc2[1].split(".php")
imaf=mmloc[0]+".htm"
imaf=imaf.replace(/%5E/,'^')
mas=document.getElementById("tab2").getElementsByTagName("TR")
kkk=-1                                   //
for(var j = 0; j <mas.length ; j++)
{mas2=mas[j].getElementsByTagName("A")
imaf2=mas2[2].innerHTML
imaf2=imaf2.replace(/ /g,"_")
if (imaf2==imaf)
{kkk=j
break
}}
if (kkk>=0)
{alert("Found "+kkk)
}
else
{alert("You are not allowed to edit this page!")
}}
else
{document.getElementById("ifr").style.visibility="visible"
}}
//***************************************************************
function pokaz2(p)                 //
//***************************************************************
{if (objwin.closed )
{alert("The site has been closed! Open it with a click Open.")
return
}
mloc5=" "+objwin.location
mloc2=mloc5.split("/pages/")
mmloc=mloc2[1].split(".php")
imaf=mmloc[0]+".htm"
imaf=imaf.replace(/%5E/,'^')
mas=document.getElementById("tab2").getElementsByTagName("TR")
kkk=-1   //
for(var j = 0; j <mas.length ; j++)
{mas2=mas[j].getElementsByTagName("A")
imaf2=mas2[2].innerHTML
imaf2=imaf2.replace(/ /g,"_")
if (imaf2==imaf)
{kkk=j;break}
}
if (kkk>=0)
{}
else
{alert("You are not allowed to edit this page!")
return
}
document.getElementById("k").scrollTop=mas2[2].parentNode.offsetTop
if (p==0)    //
{mas2[2].click()
}
if (p==2)    //
{mas2[1].click()}
}
//*******************************************************************
function save(event,p) // 
//*******************************************************************
{ev = event || window.event
ev.cancelBubble = true
ev.returnValue = false
try 
{ev.preventDefault()} 
catch (err) {}
spv=""
mas=document.getElementById("tab2").getElementsByTagName("TR")
for(var j = 0; j <mas.length ; j++)
{mas2=mas[j].getElementsByTagName("INPUT")
if (mas2[0].checked)
{spv=spv+mas2[0].name
}}
document.getElementById("save2").href="saveall.php?add="+p+"&spv="+spv
document.getElementById("save2").click()
}
fi2=false     //
//****************************************************************************************
function got(p)   //
//****************************************************************************************
{if (p==2 &&  !fi2)
{return	}	
mtr2=document.getElementById("k").getElementsByTagName("TR")  //
if (p==2)
{for(var j = 0; j <= mtr2.length-1; j++)                        //
{mmtr2=mtr2[j].getElementsByTagName("TD")
mtr2[j].style.display=""
document.getElementById("soob").innerHTML="Filter canceled"
}
fi2=false	
return
}
if (document.getElementById("goto").value=="" && p==0)
{alert("Enter the filter context!")	
return}
if (document.getElementById("zs").innerHTML=="?")
{alert("No column selection! Click the desired column in the table!")
return}
kont=document.getElementById("goto").value
mkont=kont.split("/")
for(var jj = 0; jj <= mkont.length-1; jj++)
{if (mkont[jj]=="")
{alert("Empty context in filter list!")
return
}}
                         
// 
fi=parseInt(document.getElementById("zs").innerHTML,10)-1
// 
if (obj2!="")
{obj2.style.background=""
obj2=""
}

for(var j = 0; j <= mtr2.length-1; j++)
{mmtr2=mtr2[j].getElementsByTagName("A")
text2=mmtr2[fi].innerHTML	
fi2=true
for(var jj = 0; jj <= mkont.length-1; jj++)
{
if (fi!=0)
{
if (text2.indexOf(mkont[jj])>=0)
{mtr2[j].style.display="";break}
else
{mtr2[j].style.display="none"
}
}
else
{
if (text2.replace(/&nbsp;/g,"")==mkont[jj])
{mtr2[j].style.display="";break}
else
{mtr2[j].style.display="none"
}


}



}}
document.getElementById("soob").innerHTML="Filtering!"
}

//********************************************************************
function ptab() // 
//********************************************************************
{
newstr2="<b>WEBSITE: </b>"+document.getElementById("sname2").innerHTML
newstr2=newstr2+"<h2 style='text-align:center'>"+document.getElementById("nam").value+"<br>List of internal pages of the site</h2>"
is=""
if (isort!="no")
{if (document.getElementById("ksort").src.indexOf("yes.gif")>0)
{is="  Sort by column N "+(parseInt(isort,10)+1)+ " ascending "
}
else
{is=" Sort by column N "+(parseInt(isort,10)+1)+" descending"
}}
if (fi2)
{newstr2=newstr2+ "Filter by '"+
document.getElementById("goto").value+"' in "+document.getElementById("zs").innerHTML+ is 
}
else
{newstr2=newstr2+is
}
newstr2=newstr2+ '<table border="1" width=100% ><THEAD><TR>'+"\n";
newstr2=newstr2+ '<TH><b title=0>&nbsp;&nbsp;N&nbsp;&nbsp;&nbsp;&nbsp;</b></TH>'+"\n"; 
newstr2=newstr2+'<TH><b title=1>Page name </b></TH>'+"\n";
newstr2=newstr2+'<TH>Page file</TH>'+"\n";
newstr2=newstr2+'<TH>Access</TH><TR><TR><TH>1</TH><TH>2</TH><TH>3</TH><TH>4</TH></TR></thead>'+"\n"; 
//newstr=""
mstr=document.getElementById("k").getElementsByTagName("TR")
for(var j = 0; j <mstr.length; j++)  
{if (mstr[j].style.display!="none")
{
mstrtd=mstr[j].getElementsByTagName("TD")
mstrtd2=mstr[j].getElementsByTagName("A")
newstr="<tr><td>"+mstrtd2[0].innerHTML+"</td>"
newstr=newstr+"<td>"+mstrtd2[1].innerHTML+"</td>"
newstr=newstr+"<td>"+mstrtd2[2].innerHTML+"</td>"
newstr=newstr+"<td>"+mstrtd[3].innerHTML+"</td></tr>"
newstr2=newstr2+newstr
}}
newstr2=newstr2+"</table>"
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 va(event)   //
//**********************************************************************
{ev = event || window.event
var t = ev.target || ev.srcElement
if (t.tagName!="A" || t.href.indexOf("help")>=0) return
if (obj2!="")
{obj2.style.background=""
}
t.parentNode.style.background="yellow"                  // 
obj2=t.parentNode
}


</script>
</body></html>
