// copyright 2004 IT-Systemservice Richard Vinco, richard.vinco@email.de



// Popup Window

		function popup(mylink, windowname, xsize, ysize)
		{

		if (! window.focus)return true;

		var href;
		if (typeof(mylink) == 'string')
		   href=mylink;


		else

		   href=mylink.href;

		var param='width='+xsize+',height='+ysize;


		window.open(href, windowname, param);

		return false;
		}


// Button & Banner swapper

		function MM_preloadImages() { //v3.0
		  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

		    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
		}

		function MM_findObj(n, d) { //v4.01
		  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
		  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

		  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

		  if(!x && d.getElementById) x=d.getElementById(n); return x;
		}

		function MM_swapImgRestore() { //v3.0
		  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
		}

		function MM_swapImage() { //v3.0
		  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
		}

// Menu

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function CloseMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
	el.style.display = "none";
	}
}


// Form-Validator dt/en

function form_Validator(form, lang)
{
	if (form.name.value == "")
	{
		if (lang == "dt") { alert("Bitte Ihren Namen angeben!"); }
		else{ alert("Please enter your Name!"); }
		form.name.focus();
	return (false);
	}

	if (form.email.value == "")
	{
		if (lang == "dt") { alert("Bitte Ihre eMail-Addresse angeben!"); }
		else{ alert("Please enter your eMail-Address!"); }
		form.email.focus();
		return (false);
	}
	if (form.text.value == "")
	{
		if (lang == "dt") { alert("Ihre Anfrage sollte zumindest einen Buchstaben enthalten, den Rest wissen wir dann."); }
		else{ alert("Your message should contain at least one letter, about the rest we know already."); }
		form.email.focus();
		return (false);
	}
	return (true);
}

// Close only Contact-Window

window.focus();

function targetopener(mylink, closeme, closeonly)
{
	if (! (window.focus && window.opener))return true;
	window.opener.focus();
	if (! closeonly)window.opener.location.href=mylink.href;
	if (closeme)window.close();
	return false;
}
/*
function ds(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=ds
document.onclick=reEnable
}
*/
// if Amiga = A3000