function cbb(idecko){
 var el=document.getElementById(idecko); 
 el.checked=(el.checked == true)?false:true;
}

/* VALIDATOR */
function MW_check_form(xfrm,etext,email){

// @frm - id formulare k odeslani
// @etext - seznam poli validovanych jako text, oddelne strednikem
// @email - seznam poli validovanych jako e-mail, oddelne strednikem

    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
    var frm1 = document.getElementById(xfrm);
    var texts = etext.split('\;');
    var mails = email.split('\;');

if(texts && texts.length>0){
for(f in texts){

        ff = document.getElementById(texts[f]);
       
        if(ff!=null && ff.value.length<1){
            alert('Formulář je chybně vyplněn');
			return false;
        }
    }
}   

if(mails && mails.length>0){
    for(m in mails){
       
        mm = document.getElementById(mails[m]);
       
        if(mm!=null && !reg.test(mm.value)){
            alert('Formulář je chybně vyplněn');
			return false;
        }
    }
}   

frm1.submit();
}

function isint(ide1,ide2) {
   var a = document.getElementById(ide1).value;
   var b = document.getElementById(ide2).value;
   
if(b>1){ 
    
   var c = a / b; 
   
   var d = parseInt(c);
   
  /*
     return c==d && c.toString()==d.toString();
  */  
   e = 2 * b;
   f = 3 * b;
   g = 10 * b;   
   
   if (c==d && c.toString()==d.toString()){
    return true;
   }else{ 
    alert('U tohoto zboží lze zakoupit pouze násobky minimálního množství! \nMinimální množství u této položky je '+ b +' !\nLze tedy zakoupit např.: '+ b +', ' + e + ', ' + f + ' nebo ' + g +'ks!\n');    
    return false;
   }
 }else{
   return true; 
 }  
   
} 

