// JavaScript Document

<!-- Funktionen von Worldmap.htm  ----------------------------------------

function initPage(){
strLanguage=window.location.search.substring(1);

if (strLanguage == 'D')
  	{i=1}
  else
  	{i=2}
	
	document.getElementById("Title").firstChild.data = Title[i];

	for(x=1;x<=Countries;x++)
	{
		var strCountry = "Country_" + x
	  	if (strLanguage == 'D')
  		{
			var SortPos = SortPos_D[x]
			document.getElementById(strCountry).firstChild.data = Country_D[SortPos];
		}
		else
		{
			document.getElementById(strCountry).firstChild.data = Country_E[x];
		}
	}
}


function navigateToCountry(i,Type) 
{ 
if (strLanguage == 'D') 
{ 
	if ((Type == 0)) 
		{
			if ((i>20))
			{
			var SortPos = SortPos_D[i] 
			var Nav = Navigation_test[SortPos]+'?Lang=D' 
			window.location.href=Nav; 
			}
			else
			{
			var SortPos = SortPos_D[i] 
<!--			var Nav = 'cntry_main.php?Lang=D&Cntry='+Navigation_test[SortPos] 
			var Nav = 'cntry_main.php?Lang=D&Cntry='+Navigation_test[SortPos] 
			window.location.href=Nav; 
			}
		}
	else 
		{ 
		var Nav = Navigation_test[i]+'?Lang=D'; 
		window.location.href=Nav; 
		} 
} 

else 
	{ 
		if(i>20)
		{
		var Nav = Navigation_test[i]+'?Lang=E'; 
		window.location.href=Nav; 
		}
		else
		{
		var Nav = 'cntry_main.php?Lang=E&Cntry='+Navigation_test[i] 
<!--		var Nav = Navigation[i]+'?E'; 
		window.location.href=Nav; 
		}
	}	 
}


function swapColour(i)
{
var strElement = "Country_" + i
  obj = document.getElementById(strElement);
  if (obj.style)
  {
    obj.style.color = "#FFcc66";
  }
document.all(strElement).style.cursor = 'hand';
}

function restoreColour(i)
{
var strElement = "Country_" + i
  obj = document.getElementById(strElement);
  if (obj.style)
  {
    obj.style.color = "#CCCCCC";
  }
}


<!-- Funktionen der Landes-Einstiegsseiten --------------------------------

function initPageThumb(){
strLanguageThumb=window.location.search.substring(1);

if (strLanguageThumb == 'D')
  	{i=1}
  else
  	{i=2}
	
	document.getElementById("title").firstChild.data = TitleThumb[i];
}

function NavigateCountry_Back(Country) 
{ //v3.0
	for(x=1;x<=Countries;x++)
	{
		if(Country_E[x] == Country)
		{
		i=x
		}
	}

	if (i==1)
	{
		window.location.href=MainWin+'?'+strLanguageThumb;
	}
	else
	{
		if (strLanguageThumb == 'D')
		{
			for(y=1;y<=Countries;y++)
			{
				if(SortPos_D[y] == i)
				{
				z=y
				}
			}
			var SortPos = SortPos_D[z-1]
			var NavMain = Navigation[SortPos]+'?D' 
			window.location.href=NavMain;
		}
		else
		{
			var NavMain = Navigation[i-1]+'?E';
			window.location.href=NavMain;
		}
	}
}

function NavigateCountry_Forward(Country) 
{ //v3.0
	for(x=1;x<=Countries;x++)
	{
		if(Country_E[x] == Country)
		{
		i=x
		}
	}

	if (i==Countries-1)
	{
		window.location.href=MainWin+'?'+strLanguageThumb;
	}
	else
	{
		if (strLanguageThumb == 'D')
		{
			for(y=1;y<=Countries;y++)
			{
				if(SortPos_D[y] == i)
				{
				z=y
				}
			}
			var SortPos = SortPos_D[z+1]
			var NavMain = Navigation[SortPos]+'?D' 
			window.location.href=NavMain;
		}
		else
		{
			var NavMain = Navigation[i+1]+'?E';
			window.location.href=NavMain;
		}
	}
}

function MM_findObj(n, d) { //v4.0
  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 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];}
}

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;
}


<!-- Funktionen für contact.htm  ----------------------------------------

function initContactPage(){
strLanguage=window.location.search.substring(1);

if (strLanguage == 'D')
  	{i=1}
else
  	{i=2}

document.getElementById("Description").firstChild.data = Description[i];
document.getElementById("Equip_03").firstChild.data = Equip_03[i];
document.getElementById("Equip_04").firstChild.data = Equip_04[i];
document.getElementById("Contact").firstChild.data = Contact[i];

}
