var arrMandatoryFlds               = new Array();
arrMandatoryFlds['frm_contact']    = new Array("txt_name", "txt_message");


var arrFrmAlert   = new Array();
arrFrmAlert['de'] = "Bitte alle Pflichtfelder ausf%FCllen.";
arrFrmAlert['en'] = "Please fill in all mandatory fields.";

function preload_images()
{
	document.preloaded = new Array();
	if(document.images)
	{
		for(var i=0; i<preload_images.arguments.length; i++)
		{
			document.preloaded[i] = new Image();
			document.preloaded[i].src = preload_images.arguments[i];
		}
	}
}


function open_window(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no' //resizable=yes ist die alternative
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function check_form(chkID_1, chkID_2, language, targetID, switchValue)
{
	if (document.getElementById(chkID_1) && document.getElementById(chkID_1).value != '' &&
	    document.getElementById(chkID_2) && document.getElementById(chkID_2).value != '') {
			document.getElementById(targetID).value = unescape(switchValue);
			return true;
	} else {
			alert(unescape(arrFrmAlert[language]));
			return false;
	}
}

function activate_gb_entry(targetID, switchValue)
{
	document.getElementById(targetID).value = unescape(switchValue);
	return true;
}
