<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
function winopen(page,title,w,h){
        win = window.open(page, title,'menubar=no,status=no, resizable=no, scrollbars=no, directories=no, location=no, toolbar=no');
        win.resizeTo(w,h);
        win.moveTo((screen.Width-w)/2,(screen.Height-h)/2);
}

function SelectColorMenu( obj, status )
{  var el = document.getElementById(obj);

  if( status == 1 )
  {
   el.style.backgroundColor = '#3D625E';
   el.style.color = '#FFFFFF';
  }
  else
  {
   el.style.backgroundColor = '#E5E4E4';
   el.style.color = '#666666';
  }
}

function DisplayMenu( obj, typeEvent, nsub, menu )
{  var el = document.getElementById(obj);
   var el_sub = document.getElementById(nsub);

   if(( typeEvent == 'mouseover')||(el_sub.style.display=='block')||( menu=='SET' )) status = 1;
   else status = 0;

   SelectColorMenu( obj, status );
}
function subDisplay(subName)
{
    var el = document.getElementById(subName);

    if (el.style.display!='block')
    {
	  el.style.visibility='visible';
      el.style.display='block';
    }
    else
    {
	  el.style.visibility='hidden';
	  el.style.display='none';
    }

}
function validate_form(lang)
{
	if (document.sendmail.fio.value=="")
	{
		if ( lang=="rus" ) {
			alert("Пожалуйста, укажите Ваше имя");
		}
		else
		{
		alert("Please, Enter your name");
		 }
		return false;
	}
	if (document.sendmail.email.value!="")
		{
			obj = document.sendmail.email;
    		if (obj.value.indexOf('@') < 1 ||
				obj.value.indexOf('@') == obj.value.length - 1 ||
		   		obj.value.lastIndexOf('@') != obj.value.indexOf('@') ||
				obj.value.indexOf('.') < 1 ||
				obj.value.indexOf('.') == obj.value.length - 1 ||
	      		obj.value.lastIndexOf('.') < obj.value.indexOf('@'))
				{
					if ( lang=="rus" ) {
					alert("Проверьте правильность написания e-mail");
					}
					else
					{ alert("Chek your e-mail");
					 }

		      		obj.focus();
		      		return false;
		    	}
	    }
	else
		{
				if ( lang=="rus" ) {
					alert("Пожалуйста, укажите Ваш e-mail");
					}
					else
					{
						alert("e-mail is not defined");
					}

			return false;
    	}
	if (document.sendmail.msg.value=="")
	{
		if ( lang=="rus" ) {
		  alert("Вы ничего не написали");
		}
		else
		{
			alert("Message can not empty!");
		}

		return false;
	}
	return true;
}
