function openWindow(url,title,width,height) {
	popup = window.open(url, title, 'width='+width+',height='+height+'screenX=80,screenY=50,scrollbars=yes,menubar=no,status=no,toolbar=no,resizable=yes');	
	popup.focus();
}

function checkFileUpload(form)
{	
	var extArray = new Array(".doc");
	var allowSubmit = false;
		
	var file = document.getElementById('wordfile_upload');
	if (!file) {
		return false;
	}
	
	file_value = file.value;
	
	while (file_value.indexOf("\\") != -1){
		file_value = file_value.slice(file_value.indexOf("\\") + 1);
	}
	
	/*	check extension	
	ext = file_value.slice(file_value.indexOf(".")).toLowerCase();
	for (var i = 0; i < extArray.length; i++) {
		if (extArray[i] == ext) { 
			allowSubmit = true; break;
		}
	}
	*/
	allowSubmit = true; //mr. geisser asked on sept 9, 2008 do not check anymore
	
	if (!allowSubmit) {
		alert("Bitte ausschliesslich MS Word Dateien hochladen.");
	}
	else {
		document.getElementById("ajaxloader_id").style.display = "block";
		return true;
	}	
			
	return false;
}

function $(id) {
	return document.getElementById(id);
}
