function insertContent(script,anys,update) {
	var myHTMLRequest = new Request.HTML({url:script,data:anys,update:update}).send(); 
}
function setRegions(value,container)
{	 
	$(container).set('html', '<div style="text-align:center;"><img src="/Bilder/newlayout/ajax-loader.gif"></div>');
	insertContent("inc/js/dynamic.php","id="+value+"&cmd=getRegionSelect",container);
}
function openPopup(url,winName,winParams)	{	//
		var theWindow = window.open(url,winName,winParams);
		if (theWindow)	{theWindow.focus();}
		return false;
}
function sendRequest(url,data) {
	var req = new Request({url:url, 
		onSuccess: function() {
			return true;
		},
		onFailure: function() {
			return false;
		}
	});
	req.send(data);
}
function countVisits(module,id) {
	sendRequest("inc/js/facade.php","cmd=countVisits&module="+module+"&id="+id);
}
function resetSelectedIndex(name) {
	var anElement = $(document.body).getElement('select[name='+ name +']');

	if(anElement != false) {
		anElement.selectedIndex = -1;
	}
}
function confirmAction(message) {		
	 return confirm(message);
}
function checkEmptySelectValue(formEl, name, message) {	
	var anElement = $(formEl.id).getElement('select[name='+ name +']');
	
	if(anElement && anElement.selectedIndex == 0)
		return confirm(message);
	
	return true;
}
function checkCountry(message) {
	
	if(typeof message == 'undefined')
		message = "Bitte wähle ein Land! Lange Wartezeit";
	
	if(document.searchForm.land_id.options[0].selected == true)
	 return confirm(message);
	
	return true;
}

