news1 = new Image();
news1.src= "images/news.png";
news2 = new Image();
news2.src= "images/newsnav.png";

hist1 = new Image();
hist1.src= "images/hist.png";
hist2 = new Image();
hist2.src= "images/histnav.png";

pers1 = new Image();
pers1.src= "images/pers.png";
pers2 = new Image();
pers2.src= "images/persnav.png";

cont1 = new Image();
cont1.src= "images/cont.png";
cont2 = new Image();
cont2.src= "images/contnav.png";

function CommOver(imgname,src1) {
	imgname.src=src1;
}








function limitText(limitField, limitCount, limitNum) {
    if (limitField.value.length > limitNum) {
        limitField.value = limitField.value.substring(0, limitNum);
    } else {
        limitCount.value = limitNum - limitField.value.length;
    }
}

function yesno(question) {
	if (confirm(question + ' ?'))	return true;
	else	return false;
}

function checkForm1() {			// ввод пароля
var pForm = document.form1;
   if (pForm.login.value == "") {
	  pForm.login.focus();
	  return false;
   }
   if (pForm.password.value == "") {
	  pForm.password.focus();
	  return false;
   }
   return true;
}

function check_srchform( searchField ){
    if (searchField.value == 'поиск') {
        searchField.value = '';
		return false;
    }
    if (searchField.value == '') {
		return false;
    }
    return true;
}

function clearsearch() {
var pole = document.form2.stext;
alert(pole.value);
   if (pole.value == "поиск") {
	  pole.value='';
	  return true;
   }
   //return true;
}

function clearsss( searchField ) {
    if (searchField.value == 'поиск') {
        searchField.value = '';
    }
}


function checkpwForm() {
var pForm = document.pwForm;
   pForm.email.focus();
   if (pForm.email.value == "") {
	  pForm.email.focus();
	  return false;
   }
   return true;
}

function showPicture(movie, name, width, height) {
  var inc_x = 12;
  var inc_y = 40;
  var currentTime = new Date();

  params = "top=0, left=0, width="+(parseInt(width)+inc_x)+
           ", height="+(parseInt(height)+inc_y)+
		   ", status=no, toolbar=no, menubar=no, location=no, directories=no, scrollbars=no";
  www = window.open("","fcpict" + currentTime.getSeconds(),params);
  www.document.open();
  www.document.write("<html><head>");
  www.document.write("<meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
  www.document.write("<title>"+name+"</title></head>");
  www.document.write("<body bgcolor='#C0C0C0' style='margin: 0px; text-align: center;'>"+
  "<img src='"+movie+"' width='"+width+"' height='"+height+"' border=0>"+
  "<form class='vertpadd'><input type='button' value='Закрыть' onclick='window.close()'></form></body></html>");
  www.document.close();
  www.focus();
  return false;
};


function showMovie(movie, name, width, height) {
  var inc_x = 12;
  var inc_y = 40;
  params = "top=50, left=200, width="+(parseInt(width)+inc_x)+
           ", height="+(parseInt(height)+inc_y)+
		   ", status=no, toolbar=no, menubar=no, location=no, directories=no, scrollbars=no";
  www = window.open("","DVDPrizInfo",params);
  www.document.open();
  www.document.write("<html><head>");
  www.document.write("<meta http-equiv='Content-Type' content='text/html; charset=windows-1251'>");
  //www.document.write("<link rel='stylesheet' type='text/css' media='screen' href='/styles/index.css'>");
  //www.document.write("<style type='text/css' media='screen'>@import '/styles/index.css';</style>");
  www.document.write("<title>"+name+"</title></head>");
  www.document.write("<body bgcolor='#C0C0C0' style='margin: 0px; text-align: center;'>"+
  "<embed src='"+movie+"' type='application/x-mplayer2' width='"+width+"' height='"+height+"'></embed>"+
  "<form class='vertpadd'><input type='button' value='Закрыть' onclick='window.close()'></form></body></html>");
  www.document.close();
  www.focus();
  return false;
};

function pause( mSec ) {
	clock = new Date();
	justMinute = clock.getTime();
	while (true) {
		just = new Date();
		if (just.getTime() - justMinute > mSec ) break;
	}
}

function pressEnter(keyCode) {
	if (keyCode==13) return true;
	else return false;
}



