function popme(a)
{
		sprach = "de";
		languageid = document.getElementById("sprachvariable").value;
		
		if (a <= 9){
		pfad = "/vertrieb/contacts/"+sprach+"0"+a+".asp?s="+languageid;
		}
		else{
		pfad = "/vertrieb/contacts/"+sprach+a+".asp?s="+languageid;
		}
		popup = "Popme"+a;
		sourc=window.open (pfad, popup, "width=300,height=350,resizable=1,scrollbars=1");
			
}

function minStrLen(field, sprache)
{
			  if(field.value.length > 1){
		  	  openWindow('/vertrieb/inland/plzsuche.asp?plz=' + field.value,'CAD', 300,350,true);
		  	}else{
		  	
          alert(sprache);
            
          }
		  	
}


function openWindow (strUrl, name, width, height, scroll)
			{
				
				languageid = document.getElementById("sprachvariable").value;
				features  = "resizeable=0,location=0,directories=0,status=1,menubar=0,toolbar=0,scrollbars=";
				features += (scroll ? "1" : "0");
				features += ",width=" + width + ",height=" + height;
				window.open(strUrl+'&s='+languageid, name, features);
			}
			
		

	function check_input_numeric(field, e, sprache)
	{
		  if(e.keyCode==13){
       minStrLen(field, sprache);
		 return false;
		  }


	var key = window.event ? e.keyCode : e.which;
	var keychar = String.fromCharCode(key);
	//reg = /[a-zA-Z]/;
	//return !reg.test(keychar);
	
	      
	
		reg = /[0123456789]/;	
		reg1 = /[.%&()']/;	
		
		
		if((reg.test(keychar) || e.keyCode==8 || e.keyCode==9 || e.keyCode==46 || e.keyCode==37 || e.keyCode==38 || e.keyCode==39 || e.keyCode==40) && !reg1.test(keychar) )
			return true;
		else
			return false;
			
			
			
	}

