function push(a,b)
{
var off = new Image();
on.src = "images/but_0.gif";

var on = new Image();
off.src = "images/but_1.gif";

document.images[a].src = eval(b+".src");
}

function rtel()
{
//var tel2 = new Image();
var rd = new Array(9);
index = Math.floor(Math.random() * rd.length);
tel.src = "images/phone_"+index+".gif";
}

function rollover(a,b)
{
var p1 = new Image();
p1.src = "images/but_0.gif";

var p1s = new Image();
p1s.src = "images/but_1.gif";

var p2 = new Image();
p2.src = "images/but_0.gif";

var p2s = new Image();
p2s.src = "images/but_1.gif";

var p3 = new Image();
p3.src = "images/but_0.gif";

var p3s = new Image();
p3s.src = "images/but_1.gif";

var p4 = new Image();
p4.src = "images/but_0.gif";

var p4s = new Image();
p4s.src = "images/but_1.gif";

var p5 = new Image();
p5.src = "images/but_0.gif";

var p5s = new Image();
p5s.src = "images/but_1.gif";

var p6 = new Image();
p6.src = "images/but_0.gif";

var p6s = new Image();
p6s.src = "images/but_1.gif";

var p7 = new Image();
p7.src = "images/but_0.gif";

var p7s = new Image();
p7s.src = "images/but_1.gif";

var p8 = new Image();
p8.src = "images/but_0.gif";

var p8s = new Image();
p8s.src = "images/but_1.gif";

var p9 = new Image();
p9.src = "images/but_0.gif";

var p9s = new Image();
p9s.src = "images/but_1.gif";

var p10 = new Image();
p10.src = "images/but_0.gif";

var p10s = new Image();
p10s.src = "images/but_1.gif";


document.images[a].src = eval(b+".src");
}

function xh(a,b)
{


//document.images[a].src = eval(b+".src");
document.images[a].height = b;
}

function high(which2){ the=which2; highlighting=setInterval("highlightit(the)",50); } function low(which2){ clearInterval(highlighting); which2.filters.alpha.opacity=20; } function highlightit(cur2){ cur2.filters.alpha.opacity=100
//if (cur2.filters.alpha.opacity<100) //cur2.filters.alpha.opacity+=5 if (window.highlighting) clearInterval(highlighting); }    function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function submitForm(theForm) {
    windowName = "mail";
    windowURL = theForm.action + '?';
    windowURL = windowURL + 'Message_topic=' + theForm.Message_topic.value + '&';
    windowURL = windowURL + 'Your_name=' + theForm.Your_name.value + '&';
    windowURL = windowURL + 'Adress=' + theForm.Adress.value + '&';
    windowURL = windowURL + 'Text=' + theForm.Text.value + '&';
    windowURL = windowURL + 'required=' + theForm.required.value + '&';
    windowURL = windowURL + 'recipient=' + theForm.recipient.value + '&';

    myWindow = window.open(windowURL, windowName,'location=0,width=550,height=250,scrollbars=1');
    myWindow.focus();

    //очистка значений
    theForm.Message_topic.value = '';
    theForm.Your_name.value= '';
    theForm.Adress.value = '';
    theForm.Text.value= '';

} 

function slide(elmnt)
{
var result=true;
	if(document.getElementById && document.getElementById(elmnt)){
		var subitemsBlock=document.getElementById(elmnt);
		if(subitemsBlock.style.display=='' || subitemsBlock.style.display=='none'){
			subitemsBlock.style.display='block';
			result=false;
		} else {
			subitemsBlock.style.display='none';}
	}
}


