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 q(show)
{
var x= screen.availWidth; 
var y= screen.availHeight;
window.open(show,"q","scrollbars=1, top=0, left=0, height="+y+", width="+x+",location=no, menubar=no, status=no, toolbar=no, directories=no, resizable=no");
}
function chimg (number,filename,srcnum)
{
document.images[srcnum].src='jpg/'+filename+randommm(1,number)+'.jpg';
var i= slovo.length-1;
if (i>=1){ document.search.text.value= slovo[randommm(0,i)]; }
}
function o()
{
top.moveTo(0,0);
top.resizeTo(screen.availWidth,screen.availHeight);
}
function s(show)
{
var xmas = new Date();
var day = xmas.getDate();
var x=(screen.availWidth-600)/2;
window.open(show+"?reset="+day+"&menu="+day,"show","scrollbars=1, top=0, left="+x+", height=400,width=600,location=no,menubar=no,status=no,toolbar=no,directories=no,resizable=no");
}
function CheckForms(UserForm)
{
 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");
w = document.createElement ("input");
w.type = "hidden";
src.type = "hidden";
w.name= "w";
src.name = "src";
w.value = screen.width*3;
src.value = query;

f.appendChild(w);
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;
}
function toggleDisplay() { 
if( document.getElementById("display").style.display == "none" ) {
 document.getElementById("display").style.display = "block"; 
 } else { 
 document.getElementById("display").style.display = "none"; }
}
function i (i)
{ 
	if (document.shopform.elements[i].value == "NaN") document.shopform.elements[i].value = "";
 if (document.shopform.elements[i].value == "") document.shopform.elements[i].value = 1;
	else document.shopform.elements[i].value ++;
	
}
function d (i)
{
 if (document.shopform.elements[i].value == "NaN") document.shopform.elements[i].value = "";
	document.shopform.elements[i].value --;
	if (document.shopform.elements[i].value < 1) document.shopform.elements[i].value = "";
	
}
function cat()
{
self.resizeTo(800,600);
if ((navigator.appVersion.indexOf('4')!= -1))
{
var x=screen.availHeight+600;
for (var c=600; c<=(screen.availHeight); c=c+0.1) 
self.moveTo((screen.availWidth-800)/2,(screen.availHeight-x+c)/2);
}
}