// JavaScript Document

var tp;
var fluc=1;
var actl=0;
var counter=0;

clock=setInterval(leftslide,30);

function leftslide()
{
tp=document.body.scrollTop;
if (actl<=tp+4 && actl>=tp-4)
{
if (tp>=actl) {counter=counter+(5-(tp-actl));}
else {counter=counter+(5-(actl-tp));}
if (actl>tp+3) {fluc=-1;}
if (actl<tp-3) {fluc=1;}
if (fluc>=0 && counter>10) {actl=actl+1; counter=0;}
if (fluc<0 && counter>10) {actl=actl-1; counter=0;}
}
else
{
if (actl<tp-600) {actl=actl+10;}
if (actl<tp-300) {actl=actl+7;}
if (actl<tp-120) {actl=actl+5;}
if (actl<tp-40) {actl=actl+3;}
if (actl<tp-10) {actl=actl+1;}
if (actl<tp) {actl=actl+1;}
if (actl>tp) {actl=actl-1;}
if (actl>tp+10) {actl=actl-1;}
if (actl>tp+40) {actl=actl-3;}
if (actl>tp+120) {actl=actl-5;}
if (actl>tp+300) {actl=actl-7;}
if (actl>tp+600) {actl=actl-10;}
}
document.getElementById('slider').style.top=actl;
}


// [ function set for showing short window with picture ]
//
// <a href="javascript:wopen('src',640,520);void(0);"><img src="http://schwebpes.ru/pic.jpg" border=0></a>
// it requires file - "showpic.php" - programmed specially
//
// ----------------------------

var mer, condition;
function wopen(char,filename,j_wid,j_hei) 
{
if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1)
{
condition = (mer && !mer.closed);
}
else
{
condition = (mer && !mer.closed && mer.closed != undefined);
}
if (condition) mer.close();
{
mer = window.open("inc/showpic.php?src="+filename+"&char="+char, "winbox", "toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width="+ j_wid +", height="+ j_hei +", left="+(screen.width-j_wid)/2+", top="+(screen.height-j_hei)/2);
}
}


setTimeout(fillform, 10000);

function fillform()
{
	var newup='sch'+(8585-65);
	document.getElementById('check').value=newup;
}


function unitchoose()
{
	if (document.getElementById('zapros_email').value && document.getElementById('zapros_body').value)
	{
		document.getElementById('zapros_button').disabled=false;
	}
	if (!document.getElementById('zapros_email').value || !document.getElementById('zapros_body').value)
	{
		document.getElementById('zapros_button').disabled=true;
	}
}

