var maxLen=300;

  function setLen(dcs)
 {
   maxLen = 300;
   checkLen(document.forms[oglas]);
 }
 

function ContainsSomething(Field){
      if (Field.value == ""){
         return false;
      }
   return true;
}

  // Check if Field contains numeric data only
function IsNum(Field) {
   if (!ContainsSomething(Field)) {
      return false;
   }
    theNum = parseFloat(Field.value);
    if (Field.value != '' + theNum){
       return false;
    }
    return true;
}

function SendForm() {
//return false;
//exit;

return true;
}

function checkLen(form) {
   str = document.getElementById('podacicl').value;
   len = str.length;
   if ( len > maxLen ) {document.getElementById('podacicl').value = str.substring(0,maxLen);
   alert('Vec ste upisali '+maxLen+' Karaktera.');}
{     document.getElementById('podacicl').focus();
   document.oglas.len.value = (maxLen - document.getElementById('podacicl').value.length);
 }
} 


