function oe(Fehler,Datei,Zeile){
	alert('Es ist der JS- Fehler: '+Fehler+', in der Datei: '+Datei+', in der Zeile: '+Zeile+'Aufgetreten.');
}
function oe2(){
	return true;	
}
window.onerror=oe2;
function $(Id, Parent){
	if(!Parent && arguments.length == 2){
		return null;	
	}
	return (Parent || document).getElementById(Id);
}
function $T(Tag, Parent){
	if(!Parent && arguments.length == 2){
		return null;	
	}
	Tag=Tag?Tag:'*';
	return (navigator.appVersion.match(/MSIE 5/) && (Tag=='*'))?(Parent||document).all:(Parent||document).getElementsByTagName(Tag);
}
function init(){
	if($('CountryList'))$('CountryList').onchange = window.ChangeImage;
	var a=$T('a');
	var td = $T('td');
	var hsh = '';
	for(var i=0;i<a.length;i++){ // http://www.tomislav.net/gestrichelte-linie-um-link-verstecken.htm
		a[i].onmousedown	= function(){this.onfocus=function(){this.blur();}}
		a[i].onmouseup		= function(){this.onfocus=function(){}}
		a[i].onmouseout		= a[i].onmouseup;
	}
	window.setHeight();
	if(window['starte'])window['starte']();
}
window.setHeight = function()
{
	window.myHeight = window.getHeight();
	if($('content'))$('content').style.height = ($('content').offsetHeight + (window.myHeight - ($('All').offsetHeight+30))) + 'px';
}
window.getHeight  = function()
{
	return 	document.documentElement.offsetHeight;
}
window.wopen 	=	function(Url, Width, Height, Features)
{
	if(document.currWin){
		document.currWin.close();
	}
	document.currWin = window.open(Url,'Popup','width=' + Width + ',height=' + Height + ',top=20,left=20' + (Features?(','+Features):''));
	if(document.currWin){
		document.currWin.focus();
		return false;
	}
	else{
		return true;
	}
}
window.ChangeImage = function(){
var VisaImage        = $("VisaImage");
var CountryList        = $("CountryList");
VisaImage.src = '/bsp/' + CountryList.value + '.jpg';
if(CountryList.value == 0)
	VisaImage.style.display = "none";
else
	VisaImage.style.display = "block";
}

window.tmr = null;
window.my_resize = function()
{
	window.clearTimeout(window.tmr);
	window.tmr = null;
	window.tmr = window.setTimeout(window.setHeight, 100);	
}
window.onresize = window.my_resize;
window.onload = init;

function formCheck_de(formobj){
	// name of mandatory fields
	var fieldRequired = Array("russland[Firma]", "russland[aVorname]", "russland[aNachname]", "russland[Email]", "russland[Konsulat]");
	// field description to appear in the dialog box
	var fieldDescription = Array("Firma", "Vorname", "Nachname", "E-Mail", "Ausstellendes Konsulat");
	// dialog message
	var alertMsg = "Bitte füllen Sie die folgenden Felder aus:\n";

	var l_Msg = alertMsg.length;

	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];

		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.selectedIndex == false || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}