<?php header('Content-Type: text/html; charset=windows-1251'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<head>
</head>
<title>Charts</title>
<body width=100% height=100% >

<?php
if (isset ($_REQUEST['col']))          //
{$col=$_REQUEST['col'];}             
else
{$col="";}

if (col!="")
{echo '<b id=tg style="display:none;z-index:10">'.$col.'</b>';}
else
{echo '<b id=tg style="display:none;z-index:10">0</b>';}
?>


<table width=100% height=100%  border=0 id=m style="z-index:0;position:absolute;top:0;left:0;background:none transparent fixed no-repeat 0% 0%">
<tr><td colspan=3 id=zz></td></tr>
<tr>
<td style="background:silver" width=1></td>
<td  height=30 style="background:silver">
<nobr>
<img src=../../d~e~f/arrow-up.gif height=17 title="Y-axis grid step 10%">
<b id=yz style="background:yellow"></b>&nbsp;&nbsp;&nbsp;
<button title="After entering a value, to show the opening, click me" id=y0 onclick=wtemp() 
src=arrow-rj.gif border=1 style="background:#e6e6fa" >Y=</button>
<textarea  id=temp_in style="background:white;overflow:hidden;color:red;width:60;height:20" ></textarea>
<button onclick=mmc() style="width:100">min, max, wed</button> 
</nobr>
</td>
<td style="background:silver" width=1></td>
</tr>
<tr>
<td style="background:silver" width=1></td>
<td  width=100% height=100%   border=1 style="position:relative;background:white">
<img id=pic src=../../d~e~f/7.gif border=1 style="display:none;position:absolute;top:0;left:0" width=100% height=100%>
<hr  style="color:silver;position:absolute;top:0;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:10%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:20%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:30%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:40%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:50%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:60%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:70%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:80%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:90%;left:0;heigth:1px;width:100%">
<hr  style="color:silver;position:absolute;top:100%;left:0;heigth:1px;width:100%">

<i  style="position:absolute;top:0;left:0;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:10%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:20%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:30%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:40%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:50%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:60%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:70%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:80%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:90%;heigth:100%;width:2;background:silver"></i>
<i  style="position:absolute;top:0;left:100%;heigth:100%;width:2;background:silver"></i>

<div id=inn  onclick=qw(this,event) style=" overflow-x: scroll;overflow-y: hidden;    position:absolute;top:0;left:0;height:100%;width:100%" >
<b id=x onclick=qw(this,event) 
style="background-Color:transparent;visibility:hidden;position:absolute;top:0;left:0; 
BORDER-RIGHT: red thin solid; WIDTH: 1px; HEIGHT:1 %"></b>
</div>
</td>
<td width=1></td>
</tr>
<tr>
<td style="background:silver" width=1></td>
<td  style="background:silver" valign=top>
<nobr>
<img src=../../d~e~f/arrow-rj.gif height=17 title="X-axis grid step 10%" >
<b id=xz style="background:yellow"></b>
&nbsp;&nbsp;&nbsp;
<button id=x0 style="background: #e6e6fa" onclick=wtime() title="After entering the value, to show the opening, click me and then 'Y ='"  
src=arrow-up.gif border=1>X=</button>
<textarea title="X value input field" id=time_in style="background: white;overflow:hidden;color:red;width:60;height:20" ></textarea>
<button id=can style="background: #e6e6fa;height:23;width:30" onclick=can() title="Hide straight lines"  border=1>H</button>
&nbsp;&nbsp;&nbsp;&nbsp;
<img src=../../d~e~f/arrow-up.gif style="background: #e6e6fa;height:23;width:23"   border=1 title="to the table" onclick=totabl()>
&nbsp;&nbsp;&nbsp;&nbsp;Points =<b id=izm></b>&nbsp;&nbsp;

<button onclick=stopr() style=width:30>P</button>
</nobr>
</td>
<td style="background:silver"  width=1></td>
</tr>
</table>
<hr id=yyy color=red height=1 style="visibility:hidden;position:absolute;top:50;left:0;color:red;heigth:1px;width:100%">
<div id=y onclick=qw(this,event) style="background-Color:transparent;visibility:hidden;position:absolute;top:0;left:7; BORDER-TOP: red thin solid; WIDTH: 1%; HEIGHT:1px "></div>
</body>
 <script type="text/javascript">
 //
var tek='<img src=../../d~e~f/3.gif alt="" style="z-index:5;position:absolute;top:0;left:0;height:7px;width:7px;background:none transparent fixed no-repeat 0% 0%" title="">'
var tek2='<img src=../../d~e~f/1.gif style="position:absolute;top:0;left:0;color:black;height:2px;width:2px;background:none transparent fixed no-repeat 0% 0%">'
var kx=0                //
var ky=0				//
// 
var mk = new Array()    
var sy=1   
var krow=0 
var tgg=0
var tx=""
var ty=""
minmy=0
maxmy=0
maxmx=0
minmx=0
ss=0.00
//***************************************
window.onload = function() 
//***************************************
{graf(1)}

//*****************************************************
function qw(pp,event) // 
//*****************************************************
{e = event || window.event
event = event || window.event
var t = event.target || event.srcElement
if (t.tagName=="IMG" && t.title!="")
{mnn=t.title.split("\r\n")
ncc=parseInt(mnn[0])
t.border=1
ws="DATA:\r\n------------------\r\n"
for(var i = 0; i < window.top.ist.length-1; i++) 
{ws=ws+(i+1)+"  "+window.top.ist[i]+"="+window.top.myyy[ncc-1][i]+"\r\n"}
alert(ws)
t.border=0  
}
else
{tx=document.getElementById("xz").title
ty=document.getElementById("yz").title
kx=parseInt(e.clientX)-10
ky=parseInt(hh)-parseInt(e.clientY)+35
zzz=parseFloat(minmy)+ky/mmy
zzz=Math.round(zzz*10)/10
mmm=parseFloat(minmx)+Math.round(kx*10/mmx)/10
alert("About:\r\n"+ tx+"="+mmm+'\r\n'+ty+"="+zzz)
tgg=parseInt(document.getElementById("tg").innerHTML)  //
}}
//****************************************************
function wtime()     // 
//***************************************************
{kzz=document.getElementById("time_in").value
document.getElementById("time_in").value=kzz.replace(",",".")
inx=parseFloat(document.getElementById("time_in").value)
if (isNaN(inx))
{alert("Enter the number!")
return
}
if (inx>maxmx ||  inx<minmx )
{alert("Enter the value of X in the allowed range: from "+minmx +"   to "+maxmx)}
else
{xxx=(-minmx+inx)*mmx+7         // 
dxxx=xxx-document.getElementById("inn").offsetWidth
document.getElementById("x").style.left=xxx-7
if (dxxx>0)
{document.getElementById("inn").scrollLeft=xxx-document.getElementById("inn").offsetWidth/2}
else
{document.getElementById("inn").scrollLeft=0
}
document.getElementById("x").style.visibility="visible"
//
for(var i = 0; i < krow-1; i++) 
{if  (inx==window.top.myyy[i][1])   //
{isk=window.top.myyy[i][tgg]
break
}
else
{if  (inx==window.top.myyy[i+1][1])   // 
{isk=parseFloat(window.top.myyy[i+1][tgg])
break
}
else
{if (inx>window.top.myyy[i][1] & inx<window.top.myyy[i+1][1])
{isk=parseFloat(parseFloat(window.top.myyy[i][tgg]))+parseFloat(mk[i])*(parseFloat(inx)-parseFloat(window.top.myyy[i][1]))
break
}}}}
document.getElementById("temp_in").value=isk
}}
//**********************************************
function wtemp()    // 
//**********************************************
{iny=parseFloat(document.getElementById("temp_in").value)
if (isNaN(iny))
{alert("Enter the number!")
return
}
if (iny>maxmy ||  iny<minmy )
{alert("Enter the Y value in the allowed range: from "+minmy +"   to "+maxmy)}
else
{try {
document.getElementById("y").style.top=document.getElementById("inn").offsetHeight-(iny-minmy)*mmy+11+8
document.getElementById("y").style.visibility="visible"
}
catch(e) {}
}}
 
//************************************************
function  totabl()    //
//************************************************
{window.parent.document.body.scrollTop=0
}

//****************************************************
function  can()    //  
//**************************************************
{document.getElementById("y").style.visibility="hidden"
document.getElementById("x").style.visibility="hidden"
}
 
//*****************************************************
function   mmc()    // 
//***************************************************
{alert(window.top.ist[tgg]+':\r\n\r\nYmin='+minmy+'\r\nYmax='+maxmy +'\r\nYav ='+ss+'\r\n\r\nXmin='+minmx+'\r\nXmax='+maxmx) 
} 
kmx=1
//**************************************************************
function graf(p)    // 
//**************************************************************
{tgg=parseInt(document.getElementById("tg").innerHTML)        //
if (window.top.ist[1].length>30)
{document.getElementById("xz").innerHTML=window.top.ist[1].substr(0,5)+"..."
document.getElementById("xz").title=window.top.ist[1]
}
else
{
document.getElementById("xz").innerHTML=window.top.ist[1]
document.getElementById("xz").title=window.top.ist[1]
}
if  (window.top.ist[tgg].length>30)
{document.getElementById("yz").innerHTML=window.top.ist[tgg].substr(0,5)+"..."
}
else
{document.getElementById("yz").innerHTML=window.top.ist[tgg]}
document.getElementById("yz").title=window.top.ist[tgg]
kx=0                                                                //
hh=parseInt(document.getElementById("inn").offsetHeight,10)-18      //
ww=parseInt(document.getElementById("inn").offsetWidth,10)          //
//
korx=2
kory=-12
var mt = document.getElementById("m").getElementsByTagName("hr"); 
var mt2 = document.getElementById("m").getElementsByTagName("i"); 
mmx=parseFloat(ww/10,10)                                         //
mmy=parseFloat(hh/10,10)                                         //
hrt=""
//Microsoft Internet Explorer
if (navigator.appName=="Microsoft Internet Explorer")
{dob=0
dob2=-1
}
else
{dob=0
dob2=-7
}
for(var i = 0; i <=10 ; i++) 
{yy5=hh-i*mmy
 xx5=i*mmx
 mt[i].style.top=yy5+dob
 mt2[i].style.left=xx5+dob2
 mt2[i].style.height=hh
 hrt2=tek.replace("top:0;","top:"+(yy5+dob)+"px;")
 hrt2=hrt2.replace("left:0;","left:"+(xx5+dob2)+"px;") 
 hrt=hrt+hrt2
 }
document.getElementById("x").style.height= document.getElementById("inn").offsetHeight+5+"px"
document.getElementById("y").style.width= document.getElementById("inn").offsetWidth+"px"
krow=window.top.myyy.length  
document.getElementById("izm").innerHTML=krow
mk.length=krow
for(var i = 0; i < krow-1; i++) 
{dy=window.top.myyy[i][tgg]-window.top.myyy[i+1][tgg];dx=window.top.myyy[i][kx]-window.top.myyy[i+1][kx]
mk[i]=dy/dx
}
var mxx = new Array()   //
var myy = new Array()   //
mxx.length=krow
myy.length=krow
minmy=window.top.myyy[0][tgg] 
maxmy=window.top.myyy[0][tgg] 
maxmx=window.top.myyy[0][kx] 
minmx=window.top.myyy[0][kx]
for(var i = 0; i < krow; i++) 
{mmmy=parseFloat(window.top.myyy[i][tgg],10)
if (isNaN(mmmy))
{

//

//return

}
mmmx=parseFloat(window.top.myyy[i][kx],10)
if (mmmy>maxmy) {maxmy=mmmy}
if (mmmx>maxmx) {maxmx=mmmx}
if (mmmy<minmy) {minmy=mmmy}
if (mmmx<minmx) {minmx=mmmx}
}
delta=maxmy                                                      //
delta2=0
if (minmy<0)
{delta=maxmy-minmy                                                      
delta2=minmy
}
mmx=parseFloat(ww/(maxmx-minmx),10)                              //
if (mmx<10)
{mmx=10}
mmx=mmx*kmx
mmy=parseFloat(hh/(maxmy-minmy),10)                             //
if (navigator.appName=="Microsoft Internet Explorer") 
{}
ss=0.00
for(var i = 0; i < krow; i++) 
{ss=ss+parseFloat(window.top.myyy[i][tgg])}
ss=Math.round(ss/krow*100)/100
//******************
// 
//*****************
hrt=""
put=10
for(var i = 0; i < krow; i++) 
{mxx[i]=(window.top.myyy[i][kx]-minmx)*mmx
myy[i]=hh-(window.top.myyy[i][tgg]-minmy)*mmy
if (i>0)
{ddx=Math.abs(mxx[i]-mxx[i-1])
ddy=Math.abs(myy[i]-myy[i-1])
put=put+Math.sqrt(ddx*ddx+ddy*ddy)
}
if  (put<7)
{hrt2=tek.replace("top:0;","visibility:hidden;top:"+(myy[i]-2)+"px;")}
else
{hrt2=tek.replace("top:0;","top:"+(myy[i]-2)+"px;")
put=0
}
hrt2=hrt2.replace("left:0;","left:"+(mxx[i]-2)+"px;")
if (i==krow-1)
{kk=""}
else
{dy=window.top.myyy[i][tgg]-window.top.myyy[i+1][tgg];dx=window.top.myyy[i][kx]-window.top.myyy[i+1][kx]
kk=dy/dx
kk=Math.round(kk*100)/100
}
hrt2=hrt2.replace('title=""','title="'+(i+1)+'"')
hrt=hrt+hrt2
}
//***************
// 
//****************
sy=4
//pll=2                              // 
var kk=1
for(var i = 0; i < krow-1; i++) 
{if (i==0)
{dy=myy[1]-myy[0];dx=mxx[1]-mxx[0]}
else
{dy=myy[i+1]-myy[i];dx=mxx[i+1]-mxx[i]}
kk=dy/dx
gip=Math.sqrt((dy*dy)+(dx*dx))
if (dx==0)
{sina=0
sinb=sy
}
else if (dy==0 )
{sina=sy
sinb=0
}
else
{sinb=-parseFloat(gip/dx)
sina=parseFloat(gip/dy)
}

for (jj=1;jj<=1000;jj++)
{
xk=jj
yk=kk*jj
gip=Math.sqrt(xk*xk+yk*yk)
if (gip>=sy)
{break}
}

for (ii=0;ii<1000; ii++) 
{
yy=myy[i]+ yk*ii    //parseInt(kk*parseInt(sy*ii))
xx=mxx[i]+ xk*ii    //parseInt(sy*ii)    
if (xx>mxx[i+1] || (Math.abs(yy-myy[i+1])<1 && kk!=0)) 
{break}

hrt2=tek2.replace("top:0;","top:"+parseInt(yy)+"px;")
hrt2=hrt2.replace("left:0;","left:"+parseInt(xx)+"px;")
//ddyy=yk
hrt33=""
if  (Math.abs(yk)>sy*2)
{if (yk>0)
{for (ii2=1;ii2<=parseInt(yk/sy)-1; ii2++)
{hrt3=tek2.replace("top:0;","top:"+parseInt(yy+ii2*sy)+"px;")
hrt3=hrt3.replace("left:0;","left:"+parseInt(xx)+"px;")
hrt33=hrt33+hrt3
}
}
else
{
for (ii2=1;ii2<=parseInt(Math.abs(yk)/sy)-1; ii2++)
{hrt3=tek2.replace("top:0;","top:"+parseInt(yy-ii2*sy)+"px;")
hrt3=hrt3.replace("left:0;","left:"+parseInt(xx)+"px;")
hrt33=hrt33+hrt3
}
}






}




hrt=hrt+hrt2+hrt33
}}
mmm=document.getElementById("inn").innerHTML
document.getElementById("inn").innerHTML=mmm+hrt 
document.getElementById("inn").scrollLeft=9999999   //
}

//*******************************************************************************************
function stopr()   //
//******************************************************************************************
{tnap="<HTML><HEAD><META http-equiv=Content-Type content='text/html; charset=windows-1251'></head>"
fl=window.top.frames
tnap2="Website:</b>"+fl[0].document.getElementById("sname2").innerHTML+"<br><b>Page:&nbsp;&nbsp;&nbsp;</b>"+
fl[0].document.getElementById("zag").innerHTML
ref=fl[0].location.href.split("pages")[1].split("/")
ref2=" ("+ref[1]+" "+ref[3]+")"
tnap2=tnap2+ref2
document.getElementById("zz").innerHTML=tnap2
mmm=document.getElementById("m").outerHTML
document.getElementById("zz").innerHTML=""
tnap=tnap+mmm.replace(/onclick/g,"onclick2")
tnap=tnap+"</html>"
dop=window.open("","","");
dop.document.write(tnap)
}
 </script>
 </html>