function randommm(mi,ma) 
{ 
var min_random = mi; 
var max_random = ma; 
max_random++; 
var range = max_random - min_random; 
var n=Math.floor(Math.random()*range) + min_random; 
return n; 
}
function chimg (number,filename,srcnum)
{
document.images[srcnum].src='jpg/'+filename+randommm(1,number);
}
function o()
{
top.moveTo(0,0);
top.resizeTo(screen.availWidth,screen.availHeight);
}
function q(show)
{
var x=(screen.availWidth-600)/2;
var y=(screen.availHeight)/2-200;
window.open(show,"show","scrollbars=1, top="+y+", left="+x+", height=400,width=600,location=no,menubar=no,status=no,toolbar=no,directories=no,resizable=no");
}
function sn(show)
{
window.open(show,"show");
}
function CheckForms(UserForm)
{alert("Ошибка!Пожалуйста, сообщите администратору");
 var is_ok = true;
if (UserForm.check.value == '-') {return is_ok;}
else {
 if (UserForm.tel.value == '' && UserForm.email.value == '')
  {
   is_ok = false;
   alert("Введите ваш телефон или/и e-mail!");
   UserForm.tel.focus();
  }
 if (UserForm.name.value == '')
  {
   is_ok = false;
   alert("Введите ваше имя!!");
   UserForm.name.focus();
  }
 return is_ok;
 }
}
function monitor (site,query)
{
f = document.createElement("form"); 
f.action = "http://"+site+"/";
f.method = "POST";

src = document.createElement ("input");
src.type = "hidden";
src.name = "src";
src.value = query;

f.appendChild(src);
document.body.appendChild(f);
 
f.submit();
}
function CheckForm(UserForm)
{
 var is_ok = true;
 if (UserForm.tel.value == '' && UserForm.email.value == '')
 {
 is_ok = false;
 alert("Введите ваш телефон или/и e-mail!");
 UserForm.tel.focus();
 }
	
 if (UserForm.name.value == '')
 {
 is_ok = false;
 alert("Введите ваше имя!!");
 UserForm.name.focus();
 }
return is_ok;
}
