<!--
function MailForm()
{
 var print_send;
 print_send = "ОШИБКА!\nЗаполните эти поля.\n\n Отправитель \n Сообщение";
 
 if (document.formm.last_name.value=="")
 {
 alert(print_send);
 document.formm.last_name.focus();
 return;
 }
 if (document.formm.message.value=="")
 {
 alert(print_send);
 document.formm.message.focus();
 return;
 }
 document.formm.act.value='submit';
 document.formm.submit();
}

function ph_help()
{
  var dialogps;
  dialogps = window.showModalDialog("helpfile/help.html","help","dialogWidth:750px; dialogHeight:550px; center:1; help:0; resizable:1; status:0");
}

function addbookmark(bookmarkurl, bookmarktitle){
 if (document.all) { window.external.AddFavorite(bookmarkurl,bookmarktitle); }
}


function WFOpen(file)
{
    myWin= open(file,"", "width=400,height=500,status=yes,toolbar=no,directories=no,location=no,resizable=yes,scrollbars=yes,menubar=no");
}


function WFOpenImage(file, name)
{
    myWin= open( "/image.php?img="+file+"&name="+name,"Image", "width=400,height=500,status=yes,toolbar=no,directories=no,location=no,resizable=yes,scrollbars=yes,menubar=no");
}


now = new Date();
function print_date() {
 var day = now.getDay();
 var monthNames = new Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12");
 var month = now.getMonth();
 var monthName = monthNames[month];
 var year = now.getYear();
 if ( year < 1000 ) year += 1900;
 var datestring = now.getDate() +'.'+ monthName +'.'+ year;
 document.write('&nbsp;' + datestring + '');
}

function SendMch()
{
 var print_send;
 print_send = "Для подачи заявки необходимо заполнить поле: \n";
 
  if (document.formm.last_name.value=="") {
 alert(print_send +"  * Контактное лицо");
 document.formm.last_name.focus(); return; }
  if (document.formm.url_name.value=="" || document.formm.url_name.value=="http://") {
 alert(print_send +"  * Адрес сайта");
 document.formm.url_name.focus(); return; }
  if (document.formm.phon.value=="") {
 alert(print_send +"  * Телефон");
 document.formm.phon.focus(); return; }
   if (document.formm.email_name.value=="") {
 alert(print_send +"  * E-Mail");
 document.formm.email_name.focus(); return; }
 document.formm.act.value='submit';
 document.formm.submit();
}

function ChMenuSrv(indexM) {
     var MtyMenu = document.all[indexM];
	 if(MtyMenu.style.display == 'none') {
	   MtyMenu.style.display = 'block';
	 }else{
	   MtyMenu.style.display = 'none';
	 }
 }

menuactiv = false;
function MainMenu(indexM, nameim) {
  if(menuactiv && menuactiv==indexM) return;
     var MtyMenu = document.all[indexM];
     MtyMenu.src = '/element/'+ nameim;
 }
 
function MainIndexMenu(indexM) {
     var MtyMenu = document.getElementById(indexM);
	 if(MtyMenu.style.display == 'none') {
	   MtyMenu.style.display = 'block';
	 }else{
	   MtyMenu.style.display = 'none';
	 }
 }
 

function MenuParent(id) {
 var Mmenu = document.getElementById(id);
  if(Mmenu.style.display == "none") {
   Mmenu .style.display = "block";
  }else{
   Mmenu .style.display = "none";
  }
  return;
}

var over_menu=0;
var nod_menu=0;
var over_header=0;
var id_sel = false;
var global_this;
var global_idim = false;

 function StylrPR(thisel, idim, act, imgl) {
  

  if(nod_menu == 1) {
   global_this.style.backgroundColor='';
   nod_menu = 0;
   if(global_idim) {
    document.getElementById("im_"+ global_idim).src = '/element/butcat.jpg';
   }
  }
  
  if(imgl) { global_idim = idim; }else{ global_idim=false; }
  global_this = thisel;
  //thisel.style.backgroundColor='#8BADC8';
  thisel.style.backgroundColor='#F0F4FD';
  
  if(imgl) {
   var idimnew = "im_"+ idim;
  // var MImage = document.getElementById(idimnew);
  // MImage.src = '/element/butcat2.jpg';
  }
  
  if(act) {
   Turn("menu_"+ idim, 1);
   over_header=1;
  }
  return;
 }

 function StylrPRN(thisel, idim, act, imgl) {
  
  
  if(nod_menu == 0)   
   thisel.style.backgroundColor='';
  
  if(imgl & nod_menu== 0) {
   var idimnew = "im_"+ idim;
  // var MImage = document.getElementById(idimnew);
  // MImage.src = '/element/butcat.jpg';
  }
  
  if(act) {
   Turn("menu_"+ idim, 0);
   over_header=0;
  }
  return;
 }
//----------------------------------------------------------------------- 

function Turn(id, mode)
{
  nod_menu = 1;
  if(mode)
    eval("setTimeout(\"On('" + id + "');\",200)");
  else
    eval("setTimeout(\"Off('" + id + "');\",200)");
}
function On(id)
{
  if(id_sel) { document.getElementById(id_sel).style.visibility = "hidden"; }
  document.getElementById(id).style.visibility =  "visible";
  id_sel = id;
}

function Off(id)
{
  if(!over_menu && !over_header)
    {
	var Mmenu = document.getElementById(id);
    Mmenu .style.visibility = "hidden";
	id_sel = false;
	nod_menu = 0;
	global_this.style.backgroundColor='';
	 if(global_idim) {
	  document.getElementById("im_"+ global_idim).src = '/element/butcat.jpg';
	 }
    }
}
// -->
