//Spring JS
// *******************************************************************
//if(!this.spring){this.spring=function(){var B="undefined",R="test",G="2cnt.net",C=typeof spring_ms!=B?spring_ms:2048,L=typeof spring_debug!=B?spring_debug:null,M={"+":"%2B",",":"%2C",";":"%3B","=":"%3D","~":"%7E"},K="site",I="s",Q={},S=null,N={},F;function H(){if("https"==document.location.href.slice(0,5)){return"https://ssl-"}return"http://"}function O(W,U){if(!U){if(!W){return this}U=W;W={r:document.referrer};N=U}var V=U[I]?U[I]:W[I];if(!V){V=U[K]?U[K]:(W[K]?W[K]:R)}if(!Q[V]){Q[V]=[]}Q[V].push([W,U]);S=1;return this}function D(Z){if(!S){O({})}var X,W,Y,V,U;for(W in Q){if(Q.hasOwnProperty(W)){Y=Q[W];while(Y.length>0){V=",",U=[];while(Y.length>0){V=V+P(T(Y.shift(),U),U);if(V.length>C){break}if(Y.length>0){V+="+"}}X=A(V+";",W,Z)}}}Q={};return X}function A(Y,W,a){var X=H()+(W?W:R)+"."+G+"/j0="+Y,V=X+"?lt="+(new Date()).getTime().toString(36)+"&x="+screen.width+"x"+screen.height+"x"+screen.colorDepth;if(a==1){document.write('<img src="'+V+'" width="1" height="1">')}else{if(a==2){(new Image()).src=V}else{if(a==3||!a){var Z=H()+"i."+G+"/?l="+encodeURIComponent(V);if(!F){F=document.createElement("iframe");var U=F.style;U.position="absolute";U.left=U.top="-999px";F.src=Z;document.body.appendChild(F)}else{F.src=Z}}}}if(L){alert(V)}return X}function P(U,W){for(var V=0;V<W.length;V+=1){if(W[V]==U){return"~"+V}}W.push(U);return U}function T(X,Z){var V,Y,W,U,b=/[+&,;=~]/g,c;if(!Z){Z=[]}switch(typeof X){case"string":return b.test(X)?escape(X).replace(b,function(d){var e=M[d];return e?e:d}):escape(X);case"number":return isFinite(X)?String(X):"null";case"boolean":case"null":return String(X);case"object":if(!X){return"null"}V=[];if(typeof X.length==="number"&&!(X.propertyIsEnumerable("length"))){U=X.length;for(Y=0;Y<U;Y+=1){V.push(P(T(X[Y],Z),Z)||"null")}return","+V.join("+")+";"}for(W in X){if(typeof W==="string"){if(W!=K&&W!=I){c=T(X[W],Z);if(c){V.push(P(T(W,Z)+"="+c,Z))}}}}return","+V.join("+")+";"}return""}function E(V,U,W){O(V,U);return D(W)}function J(){while(springq.length>0){var U=springq.shift();if(U[1]){O(U[0],U[1])}else{O(U,false)}}D();setTimeout("spring.p()",100)}return{a:O,add:O,c:E,commit:E,p:J}}()}if(this.springq){spring.p()};
// *******************************************************************
function $(id) { return document.getElementById(id); }
var IVW="";
var IVW2="1_iphone_back;iphone";
var IVW3="1_iphone_replace;iphone";
function setivw(ivwsrc)
{
var ivwpixel = document.getElementById("ivwpix");
if (ivwpixel != null && ivwsrc.length > 5) { ivwpixel.src = "http://kicmobil.ivwbox.de/cgi-bin/ivw/CP/" + ivwsrc + "?r="+escape(document.referrer)+"&d="+(Math.random()*100000); }
//iphone
//if (spring) { spring.c({"s":"m-kicker","cp":"/"+ivwsrc.substring(0,ivwsrc.indexOf(";")).replace(/_/g,"/"),"url":document.location.href}); }
}
//(function() {
var slideSpeed = 50;
var slideInterval = 0;
var currentPage = null;
var currentDialog = null;
var currentWidth = 0;
var currentHash = location.hash;
var currentHref = null;
var hashPrefix = "#_";
var newPageCount = 0;
var checkTimer;
var iphoneHistory = [];
var isIphone = (navigator.userAgent.toLowerCase().indexOf("webkit")>-1)
var isIE = (navigator.userAgent.toLowerCase().indexOf("iemobile")>-1)
//var imAdBanner = null;
// *******************************************************************
window.iui =
{
showPage: function(page,backwards)
{
if (page)
{
if (currentDialog)
{
currentDialog.removeAttribute("selected");
currentDialog = null;
}
if (hasClass(page,"dialog"))
showDialog(page);
else
{
var fromPage = currentPage;
currentPage = page;
if (fromPage){
setTimeout(function(){slidePages(fromPage,page,backwards)},0);
}else{
updatePage(page,fromPage);
}
}
}
},showPageByHref: function(href,args,method,replace,cb)
{
var req = null;
try {
// Mozilla,Opera,Safari sowie Internet Explorer (ab v7)
req = new XMLHttpRequest();
} catch(e) {
try {
// MS Internet Explorer (ab v6)
xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
try {
// MS Internet Explorer (ab v5)
xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
xmlHttp  = null;
}
}
}
req.onerror = function()
{
if (cb)
cb(false);
};
req.onreadystatechange = function()
{
if (req.readyState == 4)
{
var newFrag = document.createElement("div");
if (replace)
replaceElementWithSource(replace,req.responseText);
else
{
var frag = document.createElement("div");
frag.innerHTML = req.responseText;
newFrag.innerHTML = req.responseText;
iui.insertPages(frag.childNodes);
}
if (cb)
setTimeout(cb,1000,true);
//IVW-Pixel aufrufen
if (newFrag.innerHTML != ""){
var ivwUrl = newFrag.getElementsByTagName("input");
if (ivwUrl.length > 0)
setivw(ivwUrl[0].value);
else
setivw(IVW3);
}
}
};
href += '?rd='+Math.round(Math.random() * 10000);
if (args)
{
req.open(method || "POST",href,true);
req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
req.setRequestHeader("X_AjaxReq","1");
req.setRequestHeader("Content-Length",args.length);
req.send(args.join("&"));
}
else
{
req.open(method || "GET",href,true);
req.setRequestHeader("X_AjaxReq","1");
req.send(null);
}
},insertPages: function(nodes)
{
var targetPage;
for (var i = 0; i < nodes.length; ++i)
{
var child = nodes[i];
if (child.nodeType == 1)
{
if (!child.id)
child.id = "__" + (++newPageCount) + "__";
var clone = $(child.id);
if (clone)
clone.parentNode.replaceChild(child,clone);
else
document.body.appendChild(child);
if (child.getAttribute("selected") == "true" || !targetPage)
targetPage = child;
--i;
}
}
if (targetPage)
iui.showPage(targetPage);
},getSelectedPage: function()
{
for (var child = document.body.firstChild; child; child = child.nextSibling)
{
if (child.nodeType == 1 && child.getAttribute("selected") == "true")
return child;
}
}
};
// *******************************************************************
if(window.addEventListener){
addEventListener('load',EventLoad,false);
addEventListener('click',EventClick,true);
addEventListener('click',EventClickToggle,true);
} else { // IE
attachEvent('onload',EventLoad);
document.attachEvent('onclick',EventClick);
document.attachEvent('onclick',EventClickToggle);
}
function EventLoad(event)
{
//for ie
if (!event) event = window.event;
var hash = location.hash;
if (hash.indexOf("#_--")==-1)
hash="";
if (hash!=""&&hash!="#_home") {
var page = iui.getSelectedPage();
page.removeAttribute("selected")
function unselect()
{
$(hash.substr(hashPrefix.length)).setAttribute("selected","true");
showImages();
//LoadAdBanner();
}
var href=hash.substr(hashPrefix.length);
href=href.replace(/--/g,"/");
if (hash.indexOf("mteam")>-1 && hash.indexOf("vrn")==-1){
var verein = getMtVerein(href);
href=href+verein;
}
HistoryPush(iphoneHistory,href);
iui.showPageByHref(href,null,null,null,unselect);
}else{
var href = "/home";
HistoryPush(iphoneHistory,href);
if (iui.getSelectedPage()){
var page = iui.getSelectedPage();
page.removeAttribute("selected");
}
function unselect()
{
href=href.replace(/\//g,"--");
$(href).setAttribute("selected","true");
showImages();
//LoadAdBanner();
}
iui.showPageByHref(href,null,null,null,unselect);
}
setTimeout(checkOrientAndLocation,0);
checkTimer = setInterval(checkOrientAndLocation,1000);
}
//function LoadAdBanner()
//{
//    if (imAdBanner==null){
//        var adBanner = $("ovAdBanner").getElementsByTagName("DIV");
//        if (adBanner != undefined){
//            imAdBanner = adBanner[0];
//            $("ovAdBanner").removeChild(imAdBanner);
//        }
//    }
//
//    if (imAdBanner!=null){
//        var adContainer = $("ovAdContainer");
//        if (adContainer != undefined){
//            adContainer.appendChild(imAdBanner);
//            adContainer.style.display = "block";
//        }else{
//            //alert("noch nicht da.");
//        }
//    }
//}
function EventClick(event)
{
//for ie
if (!event) event = window.event;
//target ermitteln
var targ;
if (event.target) targ = event.target;
else if (event.srcElement) targ = event.srcElement;
var link = findParent(targ,"a");
if (link)
{
function unselect()
{
link.removeAttribute("selected");
showImages();
if (link.href.indexOf('lsalert')>-1){
getUserNotificationGroups(unhideRegisterLinks,unhideRegisterLinks);
}
if (link.href.indexOf('558028')>-1){
WrapperGetDataPrivacyStatus();
}
stopLoading();
//            LoadAdBanner();
}
startLoading();
if (link.href && link.hash && link.hash != "#")
{
link.setAttribute("selected","true");
iui.showPage($(link.hash.substr(1)));
setTimeout(unselect,500);
}
else if (link == $("backButton"))
{
pageBack();
}
else if (link.getAttribute("class") == "reloadButton" || link.getAttribute("className") == "reloadButton")
{
reloadPage();
}
else if (link.getAttribute("class") == "lsreload" || link.getAttribute("className") == "lsreload")
{
iui.showPageByHref(actualPath(),null,null,null,unselect);
}
else if (link.getAttribute("type") == "submit")
{
submitForm(findParent(link,"form"));
}
else if (link.getAttribute("type") == "cancel")
{
cancelDialog(findParent(link,"form"));
}
else if (link.target == "_mediaplayer")
{
try{window.external.Notify("media|"+link.href);}catch(err){}
return false;
}
else if (link.target == "_videoplayer")
{
try{window.external.Notify("video|"+link.href);}catch(err){}
return false;
}
else if (link.target == "_meinteam")
{
currentHref=link.href;
link.setAttribute("selected","progress");
var verein = getMtVerein(link.href);
HistoryPush(iphoneHistory,currentHref+verein);
iui.showPageByHref(link.href + verein,null,null,null,unselect);
}
else if (link.target == "_replace")
{
link.setAttribute("selected","progress");
var linkparent = findParent(link,"li");
if (linkparent && !hasClass(linkparent,"lslistnext") && !hasClass(linkparent,"mtnext"))
link.style.visibility = "hidden";
iui.showPageByHref(link.href,null,null,linkparent,unselect);
setivw(IVW3);
}
else if (link.target == "_replacels")
{
link.setAttribute("selected","progress");
link.style.display = "none";
iui.showPageByHref(link.href,null,null,findParent(link,"ul"),unselect);
setivw(IVW3);
}
else if (link.target == "_blank")
{
try{window.external.Notify("openlink|"+link.href);}catch(err){}
return false;
}
else if (!link.target)
{
currentHref=link.href;
if (currentHref.length > 0 && currentHref.indexOf("t-online") > -1){
try{window.external.Notify("openlink|"+link.href);}catch(err){}
return false;
}
HistoryPush(iphoneHistory,currentHref);
link.setAttribute("selected","progress");
iui.showPageByHref(link.href,null,null,null,unselect);
}
else
{
return false;
}
if(event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
}
}
function EventClickToggle(event)
{
//for ie
if (!event) var e = window.event;
//target ermitteln
var targ;
if (event.target) targ = event.target;
else if (event.srcElement) targ = event.srcElement;
var div = findParent(targ,"div");
if (div && div.getAttribute("id") == "toggleData")
{
div.setAttribute("toggled",div.getAttribute("toggled") != "true");
if (div.getAttribute("toggled") == "true")
WrapperActivateDataPrivacy();
else if (div.getAttribute("toggled") == "false")
WrapperDeactivateDataPrivacy();
if(event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
}
else if (div && hasClass(div,"toggle"))
{
div.setAttribute("toggled",div.getAttribute("toggled") != "true");
if (div.getAttribute("toggled") == "true")
registerNotification(div.id.replace('alerts',''),successRegister,failRegister);
else if (div.getAttribute("toggled") == "false")
unregisterNotification(div.id.replace('alerts',''),successUnregister,failUnregister);
if(event.preventDefault) {
event.preventDefault();
} else {
event.returnValue = false;
}
}
}
function EventChange(event)
{
//for ie
if (!event) var e = window.event;
//target ermitteln
var targ;
if (event.target) targ = event.target;
else if (event.srcElement) targ = event.srcElement;
var form = findParent(targ,"form");
submitForm(form);
}
function EventChangeForm(form)
{
submitForm(form);
}
var checkOrientInProgress = false;
function checkOrientAndLocation()
{
if (isIE == false){
if (window.innerWidth != currentWidth)
{
currentWidth = window.innerWidth;
var orient = currentWidth == 320 ? "profile" : "landscape";
document.body.setAttribute("orient",orient);
setTimeout(function(){scrollTo(0,1)},100);
}
}
if (checkOrientInProgress == false && location.hash != currentHash)
{
checkOrientInProgress = true;
startLoading();
var pageId = location.hash.substr(hashPrefix.length);
var newpage=document.getElementById(pageId);
function unselect()
{
showImages();
stopLoading();
checkOrientInProgress = false;
}
if (newpage!=null){
iui.showPage(newpage,true);
stopLoading();
checkOrientInProgress = false;
}else{
var newhref=pageId.replace(/--/g,"/");
if (pageId.indexOf("mteam")>-1 && pageId.indexOf("vrn")==-1){
var verein = getMtVerein(newhref);
newhref=newhref+verein;
}
HistoryPush(iphoneHistory,newhref);
iui.showPageByHref(newhref,null,null,null,unselect);
}
setivw(IVW2);
}
}
function showDialog(page)
{
currentDialog = page;
page.setAttribute("selected","true");
if (hasClass(page,"dialog") && !page.target)
showForm(page);
}
function showForm(form)
{
form.onsubmit = function(event)
{
event.preventDefault();
submitForm(form);
};
form.onclick = function(event)
{
//target ermitteln
var targ;
if (event.target) targ = event.target;
else if (event.srcElement) targ = event.srcElement;
if (targ == form && hasClass(form,"dialog"))
cancelDialog(form);
};
}
function cancelDialog(form)
{
form.removeAttribute("selected");
}
function updatePage(page,fromPage)
{
if (!page.id)
page.id = "__" + (++newPageCount) + "__";
location.href = currentHash = hashPrefix + page.id;
if (fromPage != null && fromPage.parentNode != null)
{
var fromPageParent = fromPage.parentNode;
var deleted = fromPageParent.removeChild(fromPage);
}
var pageTitle = $("pageTitle");
if (page.title)
pageTitle.innerHTML = page.title;
var backButton = $("backButton");
if (backButton){
if (iphoneHistory.length > 1)
backButton.style.display = "inline";
else
backButton.style.display = "none";
}else{
if (iphoneHistory.length > 1){
try{showHideBackButton(1);}catch(err){}
try{window.external.Notify("backbutton|1");}catch(err){}
try{showBack.setValue("true")}catch(err){}
}else{
try{showHideBackButton(0);}catch(err){}
try{window.external.Notify("backbutton|0");}catch(err){}
try{showBack.setValue("false")}catch(err){}
}
}
}
function slidePages(fromPage,toPage,backwards)
{
if (isIphone==false)
{
scrollTo(0,1);
fromPage.style.display = "none";
toPage.style.display = "block";
toPage.style.width = "100%";
toPage.setAttribute("selected","true");
fromPage.removeAttribute("selected");
setTimeout(function(){updatePage(toPage,fromPage)},0);
}else{
var axis = (backwards ? fromPage : toPage).getAttribute("axis");
if (axis == "y")
(backwards ? fromPage : toPage).style.top = "100%";
else
toPage.style.left = "100%";
toPage.setAttribute("selected","true");
scrollTo(0,1);
clearInterval(checkTimer);
var percent = 100;
function slide()
{
percent -= slideSpeed;
if (percent <= 0)
{
percent = 0;
if (!hasClass(toPage,"dialog"))
fromPage.removeAttribute("selected");
clearInterval(timer);
checkTimer = setInterval(checkOrientAndLocation,1000);
setTimeout(function(){updatePage(toPage,fromPage)},0);
}
if (axis == "y")
{
backwards
? fromPage.style.top = (100-percent) + "%"
: toPage.style.top = percent + "%";
}
else
{
fromPage.style.left = (backwards ? (100-percent) : (percent-100)) + "%";
toPage.style.left = (backwards ? -percent : percent) + "%";
}
}
slide();
var timer = setInterval(slide,slideInterval);
}
}
function showImages()
{
var page=null;
if (iui.getSelectedPage() != null)
page = iui.getSelectedPage();
else
page = document.body;
if (page!=null){
var allElements = page.getElementsByTagName("img");
var element;
for (var i = 0; (element = allElements[i]) != null; i++){
if (element.src && element.src.indexOf("spacer.gif") != -1 && element.getAttribute("alt",0).length > 0)
element.src = element.getAttribute("alt",0);
element.setAttribute("alt","",0);
}
}
}
function submitForm(form)
{
currentHref = form.action + "/" + encodeForm(form);
currentHref = currentHref.replace(/=/g,"/");
currentHref = currentHref.replace('ctl00$PlaceHolderContent$','');
HistoryPush(iphoneHistory,currentHref);
iui.showPageByHref(currentHref || "POST",encodeForm(form),form.method);
}
function encodeForm(form)
{
function encode(inputs)
{
for (var i = 0; i < inputs.length; ++i)
{
if (inputs[i].name)
args.push(inputs[i].name + "=" + escape(inputs[i].value));
}
}
var args = [];
encode(form.getElementsByTagName("input"));
encode(form.getElementsByTagName("select"));
return args;
}
function findParent(node,localName)
{
while (node && (node.nodeType != 1 || node.nodeName.toLowerCase() != localName))
node = node.parentNode;
return node;
}
function hasClass(self,name)
{
var re = new RegExp("(^|\\s)"+name+"($|\\s)");
if (isIE)
return re.exec(self.getAttribute("className")) != null;
else
return re.exec(self.getAttribute("class")) != null;
}
function replaceElementWithSource(replace,source)
{
var page = replace.parentNode;
var parent = replace;
//    while (page.parentNode != document.body)
//    {
//        page = page.parentNode;
//        parent = parent.parentNode;
//    }
var frag = document.createElement("ul");//parent.nodeName.toLowerCase());
frag.innerHTML = source;
page.removeChild(parent);
while (frag.firstChild)
page.appendChild(frag.firstChild);
}
//})();
// *******************************************************************
//History methods
function getLastHistoryItem(iphoneHistory)
{
var href = iphoneHistory[iphoneHistory.length-1];
var actHref = actualPath();
if (href.indexOf(actHref)>-1)
href=iphoneHistory[iphoneHistory.length-2];
return href;
}
function HistoryPush(iphoneHistory,currHref)
{
if (iphoneHistory.length>0 && (currHref.indexOf("ls/") != -1 || currHref.indexOf("lsall/") != -1 || currHref.indexOf("viddet/") != -1 || currHref.indexOf("slidedet/") != -1 || currHref.indexOf("apoddet/") != -1))
{
var href = iphoneHistory[iphoneHistory.length-1];
if (href.indexOf("ls/") != -1 || href.indexOf("lsall/") != -1|| href.indexOf("viddet/") != -1 || href.indexOf("slidedet/") != -1 || href.indexOf("apoddet/") != -1)
iphoneHistory.pop();
}
iphoneHistory.push(formatHistoryHref(currHref));
}
function HistoryPop(iphoneHistory)
{
iphoneHistory.pop();
}
function formatHistoryHref(href)
{
var newHref=href;
if (href!=null && href.length > 0 && href.indexOf("http://")>-1){
newHref = href.substring(href.indexOf("/",7),href.length);
}
return newHref;
}
// *******************************************************************
//Mein Team methods
function mtExists()
{
var cookie = this.getCookie("meinteam");
if (cookie != null) {
if (this.getCookieProp("meinteam","verein") != null) {
return true;
} else {
return false;
}
} else {
return false;
}
}
function getMtVerein(lHref)
{
if (lHref.indexOf("vrn/0") > -1){
return "";
}else if (lHref.indexOf("vrn") > -1){
//ID im Cookie speichern und zurückgeben
var vrn = lHref.substring(lHref.indexOf("vrn/")+4);
var ablauf = new Date();
var infuenfTagen = ablauf.getTime() + (365 * 24 * 60 * 60 * 1000);
ablauf.setTime(infuenfTagen);
document.cookie = 'meinteam=verein='+vrn+';expires=' + ablauf.toGMTString();
return "";
} else if (mtExists()) {
return "/vrn/"+getCookieProp("meinteam","verein");
}
return "";
}
// *******************************************************************
// Back and Reload methods
function actualPath()
{
var href;
var hash = location.hash;
var hashPrefix = "#_";
if (hash!="" && hash!=hashPrefix+"home")
{
var href=hash.substr(hashPrefix.length);
href=href.replace(/--/g,"/");
}
return href;
}
function pageBack()
{
var hist=iphoneHistory;
if (hist.length > 1){
function unselect()
{
showImages();
stopLoading();
//            LoadAdBanner();
}
startLoading();
var newhref=iphoneHistory[iphoneHistory.length-2];
var newid=newhref.replace("/","--");
while (newid.indexOf("/")>=0) {
newid = newid.replace("/","--");
}
var backpage=document.getElementById(newid);
if (backpage!=null){
iui.showPage(backpage,true);
stopLoading();
}else{
iui.showPageByHref(newhref,null,null,null,unselect);
}
HistoryPop(iphoneHistory);
//setivw(IVW2);
}
}
function reloadPage()
{
var link=actualPath()
startLoading();
function unselect()
{
showImages();
if (link.indexOf('lsalert')>-1){
getUserNotificationGroups(unhideRegisterLinks,unhideRegisterLinks);
}
if (link.indexOf('558028')>-1){
WrapperGetDataPrivacyStatus();
}
stopLoading();
//        LoadAdBanner();
}
iui.showPageByHref(link,null,null,null,unselect);
}
function startLoading()
{
try{startLoadingAnimation();} catch(err){}
try{window.external.Notify("loading|1");}catch(err){}
try{loader.start();}catch(err){}
}
function stopLoading()
{
try{stopLoadingAnimation();} catch(err){}
try{window.external.Notify("loading|0");}catch(err){}
try{loader.stop();}catch(err){}
}
// *******************************************************************
// Notification callback methods
function successRegister(sppa)
{
//	alert('Die Buchung der Spielpaarung wurde erfolgreich durchgeführt!');
}
function failRegister(sppa)
{
alert('Die Buchung der Spielpaarung konnte nicht durchgeführt werden!');
document.getElementById('alerts'+sppa).setAttribute("toggled","false");
}
function successUnregister(sppa)
{
//	alert('Die Buchung der Spielpaarung wurde erfolgreich abbestellt!');
}
function failUnregister(sppa)
{
alert('Die Buchung der Spielpaarung konnte nicht abbestellt werden!');
document.getElementById('alerts'+sppa).setAttribute("toggled","true");
}
function unhideRegisterLinks(sppaList)
{
var regLinks = getElementByClassName("toggle");
var sppaItems = sppaList.split('|');
var element;
for (var i = 0; (element = regLinks[i]) != null; i++) {
if (element.id.length > 0) {
for (var j = 0; j<sppaItems.length; j++) {
if (element.id == 'alerts'+sppaItems[j])
element.setAttribute("toggled","true");
}
}
}
}
// *******************************************************************
// DataPrivacy Wrapper Functions
function WrapperActivateDataPrivacy()
{
try{activateDataPrivacy(successActivateDataPrivacy,failActivateDataPrivacy);} catch(err){}
try{dataprivacy.activate("successActivateDataPrivacy","failActivateDataPrivacy");}catch(err){}
}
function WrapperDeactivateDataPrivacy()
{
try{deactivateDataPrivacy(successDeactivateDataPrivacy,failDeactivateDataPrivacy);} catch(err){}
try{dataprivacy.deactivate("successDeactivateDataPrivacy","failDeactivateDataPrivacy");}catch(err){}
}
function WrapperGetDataPrivacyStatus()
{
try{getDataPrivacyStatus(unhideDataPrivacy,unhideDataPrivacy);} catch(err){}
try{dataprivacy.getStatus("unhideDataPrivacy");}catch(err){}
}
// DataPrivacy callback methods
function successActivateDataPrivacy()
{
//alert('Die Aktivierung wurde erfolgreich durchgeführt!');
}
function failActivateDataPrivacy()
{
//alert('Die Deaktivieren konnte nicht durchgeführt werden!');
document.getElementById('toggleData').setAttribute("toggled","false");
}
function successDeactivateDataPrivacy()
{
//alert('Die Deaktivierung wurde erfolgreich durchgeführt!');
}
function failDeactivateDataPrivacy()
{
//alert('Die Deaktivierung konnte nicht erfolgreich durchgeführt werden!');
document.getElementById('toggleData').setAttribute("toggled","true");
}
function unhideDataPrivacy(status)
{
//alert('unhideDataPrivacy:'+status);
if (status==true)
document.getElementById('toggleData').setAttribute("toggled","true");
else
document.getElementById('toggleData').setAttribute("toggled","false");
}
//*******************************************************************
//Common methods
function getCookieProp(cName,pName)
{
var cookie = this.getCookie(cName);
var prefix = pName + "=";
var propStart = cookie.indexOf("&" + prefix);
var propEnd;
var propValue;
if (propStart == -1) {
propStart = cookie.indexOf(prefix);
if (propStart != 0) return null;
}
else propStart += 1;
propEnd = cookie.indexOf("&",propStart);
if (propEnd == -1) propEnd = cookie.length;
propValue = cookie.substring(propStart + prefix.length,propEnd);
while (propValue.indexOf ("+")>=0) {
propValue = propValue.replace (/\++/," ");
}
return unescape(propValue);
}
function getCookie(name)
{
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
}
else begin += 2;
var end = document.cookie.indexOf(";",begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin + prefix.length,end));
}
function getElementByClassName(className) {
var hasClassName = new RegExp("(?:^|\\s)" + className + "(?:$|\\s)");
var allElements = document.getElementsByTagName("*");
var results = [];
var element;
for (var i = 0; (element = allElements[i]) != null; i++) {
var elementClass = element.className;
if (elementClass && elementClass.indexOf(className) != -1 && hasClassName.test(elementClass))
results.push(element);
}
return results;
}
// *******************************************************************

