defaultSwap = 0;
isSwapped = false;
isSwapped2 = false;
isSwapped3 = false;
isSwapped4 = false;
currentSwap = 0;
currentSwap2 = 0;
currentSwap3 = 0;
currentSwap4 = 0;
check = false;
check2 = false;
check3 = false;
check4 = false;
regionAmericas = "<img src='/image/americas.jpg' origsrc='/image/americas.jpg' oversrc='/image/Map_small.jpg'>"

function SimpleSwapFirstPage(el,which,div,visibility){
  el.src=el.getAttribute(which || "origsrc");
  if (visibility == 1) {
  toggleBox(div,visibility);
  }
  else {
  toggleBox('togglebox',0);
  }
}
function swapImage(image,value,swap1,swap2,swap3) {
	if (image == 1) {
		if (currentSwap == 0) {
			currentSwap = 1;
			SimpleSwap(value,"oversrc");
		}
		else {
			currentSwap = 0;
			SimpleSwap(value);
		}
	}
	if (image == 2) {
		if (currentSwap2 == 0) {
			currentSwap2 = 1;
			SimpleSwap(value,"oversrc");
		}
		else {
			currentSwap2 = 0;
			SimpleSwap(value);
		}
	}
	if (image == 3) {
		if (currentSwap3 == 0) {
			currentSwap3 = 1;
			SimpleSwap(value,"oversrc");
		}
		else {
			currentSwap3 = 0;
			SimpleSwap(value);
		}
	}
	if (image == 4) {
		if (currentSwap4 == 0) {
			currentSwap4 = 1;
			SimpleSwap(value,"oversrc");
		}
		else {
			currentSwap4 = 0;
			SimpleSwap(value);
		}
	}


	if (image != 1 && isSwapped == false) {
		isSwapped = true;
		isSwapped2 = false;
		isSwapped3 = false;
		isSwapped4 = false;
		if (image == 2 && currentSwap2 == 1){
		}
		else {
		currentSwap2 = 0;
		}
		if (image == 3 && currentSwap3 == 1){
		}
		else {
		currentSwap3 = 0;
		}
		if (image == 4 && currentSwap4 == 1){
		}
		else {
		currentSwap4 = 0;
		}
		SimpleSwap(swap1);
		SimpleSwap(swap2);
		SimpleSwap(swap3);
	}
	if (image != 2 && isSwapped2 == false) {
		isSwapped2 = true;
		isSwapped = false;
		isSwapped3 = false;
		isSwapped4 = false;
		if (image == 1 && currentSwap == 1){
		}
		else {
		currentSwap = 0;
		}
		if (image == 3 && currentSwap3 == 1){
		}
		else {
		currentSwap3 = 0;
		}
		if (image == 4 && currentSwap4 == 1){
		}
		else {
		currentSwap4 = 0;
		}		
		SimpleSwap(swap1);
		SimpleSwap(swap2);
		SimpleSwap(swap3);
	}
	if (image != 3 && isSwapped3 == false) {
		isSwapped3 = true;
		isSwapped = false;
		isSwapped2 = false;
		isSwapped4 = false;
		if (image == 1 && currentSwap == 1){
		}
		else {
		currentSwap = 0;
		}
		if (image == 2 && currentSwap2 == 1){
		}
		else {
		currentSwap2 = 0;
		}
		if (image == 4 && currentSwap4 == 1){
		}
		else {
		currentSwap4 = 0;
		}
		SimpleSwap(swap1);
		SimpleSwap(swap2);
		SimpleSwap(swap3);
	}
	if (image != 4 && isSwapped4 == false) {
		isSwapped4 = true;
		isSwapped = false;
		isSwapped2 = false;
		isSwapped3 = false;
		if (image == 1 && currentSwap == 1) {
		}
		else {
		currentSwap = 0;
		}
		if (image == 2 && currentSwap2 == 1){
		}
		else {
		currentSwap2 = 0;
		}
		if (image == 3 && currentSwap3 == 1){
		}
		else {
		currentSwap3 = 0;
		}
		SimpleSwap(swap1);
		SimpleSwap(swap2);
		SimpleSwap(swap3);
	}
}

function SimpleSwap(el,which){
  el.src=el.getAttribute(which || "origsrc");
}

function SimpleSwapSetup(){
  var x = document.getElementsByTagName("img");
  for (var i=0;i<x.length;i++){
    var oversrc = x[i].getAttribute("oversrc");
    if (!oversrc) continue;
    // preload image
    // comment the next two lines to disable image pre-loading
    x[i].oversrc_img = new Image();
    x[i].oversrc_img.src=oversrc;
    // set event handlers
    x[i].onmouseover = new Function("SimpleSwap(this,'oversrc');");
    x[i].onmouseout = new Function("SimpleSwap(this);");
    // save original src
    x[i].setAttribute("origsrc",x[i].src);
  }

}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{	
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }

}

function setPage(simpleName) {
alert(simpleName)
}

function go() {
location.href = "http://www.k-online.de";
}

function goToUrl(url) {
	if (url != -1) {
	location.href = url;
	}
}

function SwapMap(region) {
alert(region)
SimpleSwap(regionAmericas,'oversrc');
}

function test() {
alert()
}



		function getBlue(number) {
			var leftBlue = document.getElementById("left"+number);
			var theCell = document.getElementById("middle"+number);
			var rightBlue = document.getElementById("right"+number);
			if (leftBlue && theCell && rightBlue) {
				leftBlue.className = "left_nav";
				theCell.className = "hover_blue";
				rightBlue.className = "right_nav";
			}
		}
		
		function removeBlue(number) {
			var leftBlue = document.getElementById("left"+number);
			var theCell = document.getElementById("middle"+number);
			var rightBlue = document.getElementById("right"+number);
			if (leftBlue && theCell && rightBlue) {
				leftBlue.className = "off";
				theCell.className = "topmenuitem";
				rightBlue.className = "off";
			}
		}


