// dirArray
var dirArray = new Array();
dirArray["firma"] = "1";
dirArray["firma/facts_figures"] = "1,1";
dirArray["firma/netzwerk"] = "1,2";
dirArray["firma/kontakt"] = "1,3";
dirArray["kompetenzen"] = "2";
dirArray["kompetenzen/services"] = "2,1";
dirArray["kompetenzen/projektablauf"] = "2,2";
dirArray["kompetenzen/gute_gruende"] = "2,3";
dirArray["team"] = "3";
dirArray["team/mitarbeiter"] = "3,1";
dirArray["team/know_how"] = "3,2";
dirArray["team/stellen"] = "3,3";
dirArray["referenzen"] = "4";
dirArray["referenzen/projekte"] = "4,1";
dirArray["referenzen/fallstudien"] = "4,2";
dirArray["referenzen/kunden"] = "4,3";

/*
var flashvars = {
	_DEEPLINK:swfobject.getQueryParamValue("dl")
	};
	var params = {
	  menu:"false",
	  wmode:"window",
	  play:"-1",
	  quality:"high",
	  salign:"",
	  allowscriptaccess:"sameDomain",
	  scale:"noscale"
	};
	var attributes = {};
	
	swfobject.embedSWF("main.swf", "flashContent", "100%", "100%", "6.0.0", "", flashvars, params, attributes);
*/

function getFlashDeeplink() {
	urlArray = URLDecode(window.location.pathname).split("/");
	if (urlArray.length > 1) {
		urlArray.pop();
		urlArray.shift();
	}
	return dirArray[urlArray.join("/")];
}

function URLDecode(encodedString) {
  var output = encodedString;
  var binVal, thisString;
  var myregexp = /(%[^%]{2})/;
  while ((match = myregexp.exec(output)) != null
             && match.length > 1
             && match[1] != '') {
    binVal = parseInt(match[1].substr(1),16);
    thisString = String.fromCharCode(binVal);
    output = output.replace(match[1], thisString);
  }
  return output;
}


if (swfobject.hasFlashPlayerVersion("6.0.0")) {
	window.location = "http://www.itsolution.ch/index.html?dl=" + getFlashDeeplink();
} else {
	window.location = "upgrade_flash/upgrade_flash.htm";
}	
	 
	 
