var pix = new Array("bt_home","bt_produkte","bt_unternehmen","bt_service","bt_partnerpool","bt_kontakt","bt_news");
var pixName = new Array("home","produkte","unternehmen","service","partnerpool","kontakt","news");

function nav(num, over)
{
	var act = (over) ? "_act.gif" : ".gif";
	document.images[pixName[num]].src = "../pix/de/" + pix[num] + act;
}

var pixen = new Array("bt_home","bt_products","bt_company","bt_service","bt_partnerpool","bt_contact","bt_news");
var pixNameen = new Array("home","produkte","unternehmen","service","partnerpool","kontakt","news");

function naven(num, over)
{
	var act = (over) ? "_act.gif" : ".gif";
	document.images[pixNameen[num]].src = "../pix/en/" + pixen[num] + act;
}

function wopen(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function preloadImg() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImg.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 swapImgRes() {
  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_findObj(n, d) {
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function swapImg() {
  var i,j=0,x,a=swapImg.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];}
}

function toggleNav(theNavItem, theStatus)
{

///// Config 
var TopNavAct = "D9D9D9";
var TopNavInact = "";
var SubNavAct = "D9D9D9";
var SubNavInact = "";
////////////

if (theNavItem.match(/\D+/) == "TN")
	{
	if (theStatus == "act")
		{
		document.getElementById(theNavItem).style.backgroundColor = TopNavAct;
		}
	if (theStatus == "inact")
		{
		document.getElementById(theNavItem).style.backgroundColor = TopNavInact;
		}
	}
	
if (theNavItem.match(/\D+/) == "SN")
	{
	if (theStatus == "act")
		{
		document.getElementById(theNavItem).style.backgroundColor = SubNavAct;
		}
	if (theStatus == "inact")
		{
		document.getElementById(theNavItem).style.backgroundColor = SubNavInact;
		}
	}

}

function checkForm()
		{
			var at = document.contact.email.value.indexOf("@");
			
			if (document.contact.firma.value == "")
			{
				alert("Bitte geben Sie Ihre Firma an!");
				document.contact.firma.focus();
				return false;
			}
			else if (document.contact.name.value == "")
			{
				alert("Bitte geben Sie Ihren Namen!");
				document.contact.name.focus();
				return false;
			}
			else if (document.contact.email.value == "")
			{
				alert("Bitte geben Sie Ihre eMail Adresse ein!");
				document.contact.email.focus();
				return false;
			}
			else if (at == -1)
			{
				alert("Bitte geben Sie Ihre korrekte eMail Adresse ein!");
				document.contact.email.focus();
				return false;
			}
			else 
				return true;		
		}
		

function checkFormEn()
		{
			var at = document.contact.email.value.indexOf("@");
			
			if (document.contact.firma.value == "")
			{
				alert("Please enter your company!");
				document.contact.firma.focus();
				return false;
			}
			else if (document.contact.name.value == "")
			{
				alert("Please enter your name!");
				document.contact.name.focus();
				return false;
			}
			else if (document.contact.email.value == "")
			{
				alert("Please enter your E-mail adress!");
				document.contact.email.focus();
				return false;
			}
			else if (at == -1)
			{
				alert("Please enter your correct E-mail adress!");
				document.contact.email.focus();
				return false;
			}
			else 
				return true;		
		}
