function showHideElement (id) {
	var item = document.getElementById ("idElement" + id);
	var image = document.getElementById ("imgShowHide" + id); 
        var txt = document.getElementById ("showHideText" + id); 
        //alert ("txt " + "imgShowHide" + id);
        if (item) {
		if (item.style.display == "none") {
                 item.style.display = "";
                 image.src = "/img/hide.gif"; 
                 //txt.innerText = "скрыть схему";
                 while ( txt.firstChild ) txt.removeChild( txt.firstChild );
                 txt.appendChild( document.createTextNode( "скрыть схему" ) );
                
		} else {
                  item.style.display = "none";
                  image.src = "/img/show.gif"; 
                  //txt.innerText = "показать схему";
                 while ( txt.firstChild ) txt.removeChild( txt.firstChild );
                 txt.appendChild( document.createTextNode( "показать схему" ) );
                }
	}

  return false;
}


function showHide2Element (id) {
	var item = document.getElementById ("idElement" + id);
	var image = document.getElementById ("imgShow2Hide" + id); 
        var txt = document.getElementById ("showHide2Text" + id); 
        //alert ("txt " + "imgShowHide" + id);
        if (item) {
		if (item.style.display == "none") {
                 item.style.display = "";
                 image.src = "/img/hide.gif"; 
                 //txt.innerText = "скрыть лицензию";
                 while ( txt.firstChild ) txt.removeChild( txt.firstChild );
                 txt.appendChild( document.createTextNode( "скрыть лицензию" ) );
                
		} else {
                  item.style.display = "none";
                  image.src = "/img/show.gif"; 
                  //txt.innerText = "показать схему";
                 while ( txt.firstChild ) txt.removeChild( txt.firstChild );
                 txt.appendChild( document.createTextNode( "показать лицензию" ) );
                }
	}

  return false;
}



function valid_form () {
                  var warn = "";
	
		  var f = eval('document.sendform');
	
			if(f.account.value == "")
			{
				warn = warn + "Заполните поле - Количество паллет!\n";
			}

			if(f.in_pallet.value == "")
			{
				warn = warn + "Заполните поле - # входящих паллет / месяц!\n";
			}

			if(f.out_pallet.value == "")
			{
				warn = warn + "Заполните  поле -# исходящих паллет / месяц !\n";
			}

			if(f.fio.value == "")
			{
				warn = warn + "Заполните  поле - ФИО!\n";
			}
			
			
			if(f.company.value == "")
			{
				warn = warn + "Заполните  поле - Компания!\n";
			}

			if(f.phone.value == "")
			{
				warn = warn + "Заполните  поле - Телефон!\n";
			}

			if(f.email.value == "")
			{
				warn = warn + "Заполните  поле - E-mail!\n";
			}			
					
			if(warn == "")
			{
				
				document.sendform.submit();
			}
			else
			{
				alert(warn);
				
			}
		  
}
