  function emptyFormElements(theForm, theFieldName)
  {
      var isEmpty  = 1;
      var theField = theForm.elements[theFieldName];
    	var isRegExp = (typeof(theField.value.replace) != 'undefined');
      if (!isRegExp) {
          isEmpty      = (theField.value == '') ? 1 : 0;
      } 
      else 
      {
          var space_re = new RegExp('\\s+');
          if(theField.value == '0')
          {
            isEmpty = 1;
          }
          else
            if(theField.value == '0,00')
              isEmpty = 1;
            else
              if(theField.value == '0,0')
                isEmpty = 1;
              else
                if(theField.value == '0.00')
                  isEmpty = 1;
                else
                  if(theField.value == '0.0')
                    isEmpty = 1;
                  else
                    if(theField.value.replace(space_re, '') == '')
                      isEmpty = 1;
                    else
                      isEmpty = 0;
      }
      if (isEmpty)
      {
        alert('Пожалуйста заполните обязательные поля!');
        theField.focus();
				return false;
      }

      return true;
  }

function showctgimg(img,ttl,height)
{
	document.getElementById('ctgimg').src=img;
	if(ie)
	{
		while(document.getElementById('ctgimg').src.indexOf(img)<0);
		alignctgimg(height);
	}
}

function alignctgimg(height)
{
	if(height)
		document.getElementById('galimg').style.height=(height+19)+'px';
	else
		document.getElementById('galimg').style.height=(document.getElementById('ctgimg').height+19)+'px';
}



