function checkInputs()
{
	var inputs = $$('.required [title]');
	
	for (var index = 0; index < inputs.length; ++index) {
		
		var item = inputs[index];
		var inputValue = item.value;
		var inputType  = item.getAttribute('type');
		var titleValue = item.getAttribute('title');
		
		if(inputType == 'checkbox') {
			if(item.checked == false) {
				Effect.Shake(item);
				item.focus();
				return false;
			}
		} else {
			if(titleValue != '' && inputValue == '') {
				Effect.Shake(item);
				item.focus();
				return false;
			}
		}
	}
	
	if($('submit')) {
		$('submit').value = 'Bitte warten...';
		$('submit').disabled = true;
	}
	
	return true;
}

function deleteRecord(url)
{
	if (confirm(unescape('Diesen Eintrag wirklich löschen?')) == true) {
		document.location.href = url;
	}
}

function openWindow(theURL,winName,winWidth,winHeight,sb,rs)
{
	var winLeft	  = ((screen.availWidth - winWidth) / 2);
	var winTop	  = ((screen.availHeight - winHeight) / 2);
	var sb_string = (sb == "no") ? ",scrollbars=no" : ",scrollbars=yes";
	var rs_string = (rs == "no") ? ",resizable=no" : ",resizable=yes";
	
	window.open(theURL,winName,'toolbar=no' + sb_string + ',status=no,menubar=no' + rs_string + ',location=no,dependent=yes,width=' + winWidth + ',height=' + winHeight + ',left=' + winLeft + ',top=' + winTop);
}

function createMessage(part1, part2, part3)
{
	window.location.href = 'mailto:' + part1 + '@' + part2 + '.' + part3;
}
