    function sendform () 
	{
    name_r = document.h1.name_r.value.toString();
    kr_opis_r = document.h1.kr_opis_r.value.toString();
    po_opis_r = document.h1.po_opis_r.value.toString();
	
	if(name_r == "") {	
	  alert ("Укажите название");
      document.h1.name_r.focus();
      return false;		
	}


	if(po_opis_r == "") {	
	  alert ("Укажите полное описание");
      document.h1.po_opis_r.focus();
      return false;		
	}

        if ((name_r != "")||(po_opis_r != ""))
        {

          return true;
          
        }

  }




    function sendform1 () 
	{
    name_r = document.fotka.addName.value.toString();
    foto_s = document.fotka.myfileS.value.toString();
    foto_n = document.fotka.myfileN.value.toString();
    foto_b = document.fotka.myfileB.value.toString();
	
	if(name_r == "") {	
	  alert ("Укажите название фотографии");
      document.fotka.addName.focus();
      return false;		
	}

	
      if(document.fotka.YES.checked)	
      {
       if(foto_s == "") {	
	  alert ("Загрузите маленькую фотографию");
      document.fotka.myfileS.focus();
      return false;		
	}
      }	

	if(foto_n == "") {	
	  alert ("Загрузите среднюю фотографию");
      document.fotka.myfileN.focus();
      return false;		
	}

	if(foto_b == "") {	
	  alert ("Загрузите большую фотографию");
      document.fotka.myfileB.focus();
      return false;		
	}


        if ((name_r != "")||(foto_s != "")||(foto_n != "")||(foto_b != ""))
        {

          return true;
          
        }

  }


    function sendform_small() 
	{
    foto_s = document.fotka_small.myfileS.value.toString();

       if(foto_s == "") {	
	  alert ("Загрузите маленькую фотографию");
      document.fotka_small.myfileS.focus();
      return false;		
	}



        if (foto_s != "")
        {

          return true;
          
        }

  }


function Email( old_res, id, field_title )
{ // test
   if ( old_res==0 )
   {
      var el = document.getElementById( id );
      if ( typeof(el)=='object' && el!=null )
      {
         var re = /^[a-zA-Z0-9_\.\-]+@([a-zA-Z0-9][a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$/;

         if (el.value.search(re) != -1 )  return 0;
         else
         {
            alert( 'Проверьте правильность заполнения поля "'+field_title+'"' );
            return 1;
         }
      }
   }
   return 0;
}


function Checkmail()
{

   var nResult = 0;
   nResult += Email( nResult, 'changemailbNew','Ваш e-mail' );
   if ( nResult == 0 )
   {
      if (1)
      {
         var el = document.getElementById( 'mail_bb' );
         if ( typeof(el)=='object' && el != null ) el.submit();
      }
   }
}

function Checkmail1()
{

   var nResult = 0;
   nResult += Email( nResult, 'changemailcNew','Ваш e-mail' );
   if ( nResult == 0 )
   {
      if (1)
      {
         var el = document.getElementById( 'mail_cc' );
         if ( typeof(el)=='object' && el != null ) el.submit();
      }
   }
}



