function showSubMenu(id, x) {
	if(document.getElementById) {
		if(x) {
			for (var i=1; i<6; i++) {
				document.getElementById('subID'+ i).style.visibility = 'hidden';
			}
			document.getElementById('subID' + id).style.visibility = 'visible';
		}
		else {
			document.getElementById('subID' + id).style.visibility = 'hidden';
		}
	}
}

function worldwide(id, x, url) {

	if(document.getElementById) {
		if (x == 1) {
			document.getElementById('ww' + id).style.backgroundColor = '#119868';
		}
		else if (x == 0) {
			document.getElementById('ww' + id).style.backgroundColor = '#7FC182';
		}
		else if (x == 4) {
			document.getElementById('ww' + id).style.backgroundColor = '#A5DEA8';
		}
		else if (x == 2) {
			location.href = url;
		}
	}
}

function changeMenu(id, x, url) {

	if (x == 2) {
		location.href = url;
	}
	else {
		if(document.getElementById) {
			if (x == 1) {
				farben = new Array('119868','48A954','0097AC','0084BD','4FA8E8','E6C361','FF0000')
				document.getElementById('main' + id).style.backgroundColor = '#' + farben[id];
			}
			else if (x == 0) {
				document.getElementById('main' + id).style.backgroundColor = '#119868';
			}
		}
	}
}

function changeMenuIE(id, x, url) {


	for(var i=1; i<=5; i++)
	{
		document.getElementById('main' + i).style.backgroundColor = '#119868';
	}

	if(document.getElementById) {
		if (x) {
			farben = new Array('119868','48A954','0097AC','0084BD','4FA8E8','E6C361','FF0000')
			document.getElementById('main' + id).style.backgroundColor = '#' + farben[id];
		}
		else {
			document.getElementById('main' + id).style.backgroundColor = '#119868';
		}
	}
}

function gotoCountry(form)
{
	jump = form.options[form.options.selectedIndex].value
	if (jump != 0) {
		popupWin = window.open(jump, 'country', 'status=1,scrollbars=1,resizable=1,menubar=1,toolbar=1,location=1,width=780,height=480,left=0,top=0')
		window.popupWin.focus()
	}
	form.blur();
}

function pl(imgObj,imgSrc) {
	eval(imgObj+' = new Image()')
	eval(imgObj+'.src = "'+imgSrc+'"')
}

pl('pixel','images/pixel.gif')

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
		}
	}
}

function openWindow(url,w,l) {
	popupWin = window.open(url, 'popup', 'status,scrollbars,resizable,width='+w+',height='+l+',left=20,top=20')
	window.popupWin.focus()
}

function gotoURL(form) {
	var jump
	jump = form.options[form.options.selectedIndex].value;
	if(jump != 0) location.href = jump;
	
}



function checkForm() {
	var form
	form = document.sendmail

	var txt
	txt = ''
	
	if (form.betreff.value == '') txt += 'please insert a subject\n';
	if (form.text.value == '') txt += 'please insert a message\n';
	if (form.email.value == '') {
		txt += 'please insert a email adress\n';
	}
	else {
		var goodMail = form.email.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if(!goodMail) txt += 'please insert a valid eMail adress\n';
	}

	if (txt == '') {			
		return true
	}
	else {
		alert(txt)
		return false
	}
}

