var webtrekk = new Object();

webtrekk.trackDomain = "goetheinstitut01.webtrekk.net"; // track url
webtrekk.trackId = "382202390743064"; // webtrekk id(s)
webtrekk.domain = "www.goethe.de;www.de-cn.net;www.cn-de.net"; // list or regexp of your domains
webtrekk.contentId = ""; // content id

//// click tracking		
webtrekk.linkTrack = "link"; // 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 > 7){wt_fullPathLength = 7;}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].toLowerCase();}}}
wt_getContentGroups(2); // insert first content group id
var rex = new RegExp("^/(kue|kug|ges|wis|lrn/pro|lrn/prj/mol|lrn/prj/jgd|lrn/prj/ein|lrn/prj/red|lrn/prj/dfb|lrn/prj/zgd|lrn/prj/kdd|lrn/lks|ins/de/wil|lhr/prj/dtm|lhr/prj/gru|lhr/prj/mac|lhr/prj/mfa|lhr/prj/mmf|lhr/prj/mul|lhr/prj/mig|lhr/prj/nef|lhr/prj/sgs|lhr/prj/ted|lhr/prj/tur|lhr/prj/usg|lhr/prj/wdt|lhr/prj/woe|lhr/prj/www|lhr/pro|lhr/lks|lhr/mat/lko|z|lks|rssfeeds|media-server|blog-server|de-cn-kulturnetz|mobil-server)/|/ins/\S*(kue|ges|wis|pro|prj|lks)/|/lp/(lrn|lhr|lks)/");
var produkttyp = "Meta-Info";
var uriPathName = window.location.pathname;
if (uriPathName.search(rex) != -1){produkttyp = "Web-Produkt";}	
if (uriPathName.search(/\/ins\//) != -1 && uriPathName.search(/v\.htm/) != -1 && uriPathName.search(/prf/) == -1 && uriPathName.search(/pro/) == -1){produkttyp = "Meta-Info";}
webtrekk.contentGroup[8] = produkttyp;
webtrekk.contentGroup[1] = "www.goethe.de";

//// 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);
	}
}