
var AppUserAgent = navigator.userAgent.toLowerCase();
	
if((AppUserAgent.search(/(iphone|ipod|ipad|android)/)>-1) && (getCookie('mobileAppCheck')!= 'NO')) {
	location.href = "http://www.myspass.de/mobile/";
}

function getCookie(name){
	var i=0  //Suchposition im Cookie
	var suche = name+"="
	while (i<document.cookie.length){
		if (document.cookie.substring(i, i+suche.length)==suche){
			var ende = document.cookie.indexOf(";", i+suche.length)
			ende = (ende>-1) ? ende : document.cookie.length
			var cook = document.cookie.substring(i+suche.length, ende)
			return unescape(cook)
		}
		i++
	}
	return null
}
 
