//Goethe v 1.0
var webtrekk = new Object();

webtrekk.trackDomain = "goetheinstitut01.webtrekk.net"; // track url
webtrekk.trackId = "382202390743064"; // webtrekk id(s)
webtrekk.domain = "www.cn-de.net;www.de-cn.net"; // list or regexp of your domains
webtrekk.contentId = ""; // content id

//// click tracking		
webtrekk.linkTrack = "standard"; // click tracking: (standard|link)
//// content group(s)
webtrekk.contentGroup = new Array();
function wt_getContentGroups(z){if(typeof(z)=="undefined"){z=1;}var wt_fullPath=window.location.pathname.split("/");var wt_fullPathLength=wt_fullPath.length-1;if(wt_fullPathLength > 8){wt_fullPathLength=8;} for(var i=1;i<=wt_fullPathLength;i++){if(wt_fullPath[i]!=""&&wt_fullPath[i].search(/\.htm|\.html]/)==-1){webtrekk.contentGroup[z++]=wt_fullPath[i]}}}
wt_getContentGroups(5); // insert first content group id
webtrekk.contentGroup[8] = "Web-Produkt";
webtrekk.contentGroup[1] = "www.goethe.de";
webtrekk.contentGroup[2] = "ins";
webtrekk.contentGroup[3] = "cn";
webtrekk.contentGroup[4] = "de-cn";
webtrekk.contentGroup[10] = "Deutsch-Chinesisches Kulturnetz";

//// Custom Parameter
webtrekk.customParameter = new Array();
var tagHTML=document.getElementsByTagName("html")[0];
if (typeof(tagHTML) == "object" && typeof(tagHTML.getAttribute("lang")) == "string"){
	webtrekk.customParameter[1] = tagHTML.getAttribute("lang");
} else {
	wt_fullFilename = window.location.pathname.replace(/.*\//,"");
	if (wt_fullFilename.search(/\./) != -1 && wt_fullFilename.length > 5){
		webtrekk.customParameter[1] = wt_fullFilename.substr(0,2);
	}
}
