//SPOLECNE FUNKCE PRO VSECHNY CASTI WEBU

// kontrola formatu tel. cisla a faxu
function check_format_telfax(my_field)
{	
  format = /^[0-9]{9}$/
	if (format.test(my_field.value) == true)	{
	  	return true;
	}	
	else { 
	       format = /^\+[0-9]{3}[0-9]{9}$/
	       if (format.test(my_field.value) == true)	{
	  	       return true;	       	
	  	   }    
	       else  {
	               format = /^\+[0-9]{3}\ [0-9]{9}$/
	               if (format.test(my_field.value) == true)	
	                   return true;
                 else
                     return false;		             
        }		    
  }		
}


// kontrola formatu e-mailu
function check_format_email(my_field)
{	format = /^[_a-zA-Z0-9\.\-]+@[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$/
	if (format.test(my_field.value) == true)
		  return true;
	else 
		  return false;
}

// kontrola formatu www adresy
function check_format_www(my_field)
{	format = /^((http:|https:)\/\/[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}(\/{1}[-_~&=\?\.a-z0-9]*)*)$/
	if (format.test(my_field.value) == true)
		return true;
	else 
		return false;
}


// kontrola formatu zda je slozen jen z cislic
function check_num_format(my_field)
{	format = /^[0-9]$/
	if (format.test(my_field.value) == true)
		return true;
	else 
		return false;
}



