function enSearchPLZ(PLZ)
{
	var zip = document.getElementById('ensearchplz');
	var distance = document.getElementById('ensearchdistance');
	zip.value = PLZ;
	// distance.value = 100;
	checkAmbitVisibility();
}

function USROpenConsultantDetails(CID)
{
	window.open('consultant.php?consultant='+CID,'Consultant','scrollbars=yes,width=500,height=750,left='+(screen.availWidth/2-175)+',top='+(screen.availHeight/2-250)+'');   
}

function USROpenConsultantDetailsExtern(CID)
{
	window.open('consultant_extern.php?consultant='+CID,'Consultant','scrollbars=yes,width=400,height=500,left='+(screen.availWidth/2-175)+',top='+(screen.availHeight/2-250)+'');   
}

function checkEnSearchForm(strID)
{
	var zip = document.getElementById(strID);
	if((isNaN(zip.value)) ||
	   (zip.value.length == 0)  ||
	   (zip.value == null))
	{
		alert("Bitte geben Sie einen gültigen Wert für die Postleitzahl ein!");
		return false;
	}
	else
	{
		return true;
	}
}

function usrEnSearchLoad()
{
	checkAmbitVisibility();
}

function checkAmbitVisibility()
{
	var objAmbit = document.getElementById('enAmbit');
	var objZIP = document.getElementById('ensearchplz');
	
	if((objZIP.value.length < 5) && (objZIP.value.length > 0 ))
	{
		objAmbit.style.visibility = "hidden"; 
	}
	else
	{
		objAmbit.style.visibility = "visible";
	}
}