function select(level) {
	var targetElement,imgEl;
	targetElement = document.all(level);
	imgEl=document.all("img_"+level);
	if (targetElement.style.display == "none") {
		targetElement.style.display = "";
		imgEl.src="..\\images\\ddrop.gif";  }
	else {
		targetElement.style.display = "none";
		imgEl.src="..\\images\\drop.gif";
	}
}
function Go(url)
{
	self.location=url;
}
function openwin(url)
{
	open(url,"_blank","height=500,left=0,location=no,menubar=yes,status=yes,scrollbars=yes,resizable=1,top=0,width=800");
}
function AddFSep() {
	document.write('<tr><td><img src="..\\images\\spacer.gif" height="8" width="214"></td></tr>');
}
function AddFLink(text,url,id) {
	AddFSep();
	document.write('<tr><td class="nav" onclick="javascript:Go(\''+url+'\')"><a href="' +url+ '" class="h1" id="'+id+'">&nbsp;' +text+ '</a></td></tr>');
}
function AddFSubLink(text,id)
{
	AddFSep();
	document.write('<tr><td class="subnav" onclick="javascript:select(\''+"sub1_"+id+'\')">');
	document.write('<img id="img_sub1_'+id+'" border="0" src="..\\images\\drop.gif" align="right" width="15" height="13">');
	document.write('<p class="h1">&nbsp;' +text+ '</p></td></tr>');
}
function AddSLink(text,url,id) {
	document.write('<tr><td class="nav"><a href="' +url+ '" class="h2" id="'+id+'">&nbsp;' +text+ '</a></td></tr>');
	document.write('<tr><td><img src="..\\images\\spacer.gif" height="14" width="1"></td></tr>');
}
function AddTLink(text,url,id) {
	document.write('<tr><td class="nav"><a href="' +url+ '" class="h3" id="'+id+'">&nbsp;' +text+ '</a></td></tr>');
	document.write('<tr><td><img src="..\\images\\spacer.gif" height="14" width="1"></td></tr>');
}
function AddSSubLink(text,id)
{
	document.write('<tr><td class="subnav" onclick="javascript:select(\''+"sub2_"+id+'\')"><div class="nav">');
	document.write('<img id="img_sub2_'+id+'" border="0" src="..\\images\\drop.gif" align="right" width="15" height="13">');
	document.write('&nbsp;' +text+ '</div></td></tr>');
	document.write('<tr><td><img src="..\\images\\spacer.gif" height="14" width="1"></td></tr>');
}
function BeginFSubLink(id,sections,subs)
{
	EndTable();
	document.write('<div style="display:none" id="sub1_'+id+'">');
	document.write('<table cols="3" cellpadding="0" cellspacing="0" border="0" width="220">');
	document.write('<tr><td colspan="3"><img src="..\\images\\spacer.gif" height="14" width="1"></td></tr>');
	document.write('<tr><td rowspan="'+(sections*2+2+subs)+'" bgcolor="#669999"><img src="..\\images\\spacer.gif" width="2" height="1"></td>');
	document.write('<td rowspan="'+(sections*2+subs)+'"><img src="..\\images\\spacer.gif" width="10" height="1"></td>');
	document.write('<td><img src="..\\images\\spacer.gif" width="208" height="1"></td></tr>');
}
function EndFSubLink()
{
	document.write('<tr><td colspan="2" bgcolor="#669999"><img src="..\\images\\spacer.gif" height="2" width="1"></td></tr>');
	document.write('</table>');
	document.write('</div>');
	BeginTable();
}
function BeginTSubLink(id,sections)
{
	document.write('<tr><td><div style="display:none" id="sub2_'+id+'">');
	document.write('<table cols="3" cellpadding="0" cellspacing="0" border="0" width="208">');
	document.write('<tr><td rowspan="'+(sections*2+2)+'" bgcolor="#669999"><img src="..\\images\\spacer.gif" width="2" height="1"></td>');
	document.write('<td rowspan="'+(sections*2)+'"><img src="..\\images\\spacer.gif" width="10" height="1"></td>');
	document.write('<td><img src="..\\images\\spacer.gif" width="196" height="1"></td></tr>');
}
function EndTSubLink()
{
	document.write('<tr><td colspan="2" bgcolor="#669999"><img src="..\\images\\spacer.gif" height="2" width="1"></td></tr>');
	document.write('<tr><td colspan="3"><img src="..\\images\\spacer.gif" height="14" width="208"></td></tr>');
	document.write('</table>');
	document.write('</div></td></tr>');
}
function BeginTable() {
	document.write('<table cellpadding="3" cellspacing="0" border="0" style="position:relative">');
}
function EndTable() {
	document.write('</table>');
}
function WriteFHeader(text,talign)
{
document.write('<br><div align="'+talign+'"><table border="0" cellpadding="3"><tr><td class="nav"><p class="PageHead1">');
document.write(text+'</p></td></tr></table></div><br>');
}
function WriteSHeader(text)
{
document.write('<br><div align="right"><p class="PageHead1">'+text+'</p></div><br>');
}
function WriteTHeader(text)
{
document.write('<br><div align="left"><p class="PageHead2">'+text+'</p></div><br>');
}
function Mark(id)
{
document.all(id).style.color="#cc0000";
}
function Foot(id)
{
	var i,elem;
 	document.write('<br><br><br><br><br>');
 	document.write('<table border="0" cellpadding="0" cellspacing="0" width="468"><tr>'); 
 	document.write('<td height="24" width="46">');
 	document.write('<a href="#ptop">');
	document.write('<img align="absmiddle" src="../images/up.gif" border="0" width="46" height="24"></a></td>');
 	document.write('<td align="right" valign="middle"><div class="PageFootLink">');
	document.write('Раздел:&nbsp;<a class="PageFootLink" href="intro.asp" id="prog_intro">Введение</a>&nbsp;');
	for(i=1;i<=18;i++) {
		document.write('<a class="PageFootLink" href="chapter'+i+'.asp" id="prog_c'+i+'">'+i+'</a>&nbsp;');
	}
	document.write('</div></td></tr></table><br>');
	elem=document.all(id);
	elem.style.color="#cc0000";
	elem.style.font="14px bold";
}

function Footer(id, count, name, link)
{
	var i,elem;
 	document.write('<br><br><br><br><br>');
 	document.write('<table border="0" cellpadding="0" cellspacing="0" width="468"><tr>'); 
 	document.write('<td height="24" width="46">');
 	document.write('<a href="#ptop">');
	document.write('<img align="absmiddle" src="../images/up.gif" border="0" width="46" height="24"></a></td>');
 	document.write('<td align="right" valign="middle"><div class="PageFootLink">');
	document.write(name+':&nbsp;');
	for(i=1;i<=count;i++) {
		document.write('<a class="PageFootLink" href="'+link+i+'.asp" id="footer_'+i+'">'+i+'</a>&nbsp;');
	}
	document.write('</div></td></tr></table><br>');
	elem=document.all(id);
	elem.style.color="#cc0000";
	elem.style.font="14px bold";
}

function Metodika(id)
{
	var i,elem;
 	document.write('<br><br>');
 	document.write('<table border="0" cellpadding="0" cellspacing="0" width="468"><tr>'); 
 	document.write('<td height="24" width="46">');
 	document.write('<a href="#ptop">');
	document.write('<img align="absmiddle" src="../images/up.gif" border="0" width="46" height="24"></a></td>');
 	document.write('<td align="right" valign="middle"><div class="PageFootLink">');
	document.write('Страница :&nbsp;');

	document.write('<a class="PageFootLink" href="metodika_1.asp" id="footer_1">1</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_1.asp" id="footer_2_1">2</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_2.asp" id="footer_2_2">3</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_3.asp" id="footer_2_3">4</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_4.asp" id="footer_2_4">5</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_5.asp" id="footer_2_5">6</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_6.asp" id="footer_2_6">7</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_7.asp" id="footer_2_7">8</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_8.asp" id="footer_2_8">9</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_9.asp" id="footer_2_9">10</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_10.asp" id="footer_2_10">11</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_11.asp" id="footer_2_11">12</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_12.asp" id="footer_2_12">13</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_13.asp" id="footer_2_13">14</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_14.asp" id="footer_2_14">15</a>&nbsp;');
	document.write('<a class="PageFootLink" href="metodika_2_15.asp" id="footer_2_15">16</a>&nbsp;');

	document.write('</div></td></tr></table><br>');
	elem=document.all(id);
	elem.style.color="#cc0000";
	elem.style.font="14px bold";
}