   

























 




function MM_jumpMenu(targ,selObj,restore){   eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}




function FensterOeffnen (Adresse, Titel, Parameter) {
  Fenster1 = window.open(Adresse, Titel, Parameter);
  Fenster1.focus();
}


function MM_preloadImages() {   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i < a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() {   var i,x,a=document.MM_sr; for(i=0;a&&i < a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) {   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i < d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i < d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i < (a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function doFlash(ctype,id,divid) {
			if(!document.identify && !eval("document.identify.state" +divid)) return false;
	if (eval("document.identify.state" +divid + ".value == 'img'")) {
			 incText = '<' + 'object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" id="streaming" width="0" height="0"><' + 'param name="movie" value="http://www.joylife.de/me/pub/c/2100947/0/en/web/img/streamplayer.swf" /><' + 'param name=FlashVars value="id=' + id + '&type=' + ctype + '&divid=' + divid +'&cid=2100947" /><' + 'param name="bgcolor" value="#000000" /><' + 'param name="quality" value="best" /><' + 'param name="scale" value="exactfit" /><' + 'param name="allowscriptaccess" value="samedomain" /><' + 'embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="0" height="0" name="streaming" src="http://www.joylife.de/me/pub/c/2100947/0/en/web/img/streamplayer.swf" bgcolor="#000000" quality="best" scale="exactfit" swLiveConnect="true" allowScriptAccess="samedomain" FlashVars="id=' + id + '&type=' + ctype + '&divid=' + divid + '&cid=2100947"><' + '/embed><' + '/object>';
		eval("document.identify.state" +divid + ".value = 'flash'");
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_stop.gif',1)");
	}
			else {
				incText = "";
		if(!document.identify && !eval("document.identify.state" +divid)) return false;
		eval("document.identify.state" +divid + ".value = 'img'");
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play.gif',1)");
	}
		ctypes = new Array ('rrringt', 'pringtx', 'msound','rbt');
	for (var j = 0; j < ctypes.length; j++) {
		for (var i = 0; i <= 20; i++) {
					wanted = 'prlstn' + ctypes[j] + i;

			if (divid != wanted) {
								eval("divstate = MM_findObj('state"+wanted+"')");
				if (divstate != null) {
					eval("document.identify.state" + wanted + ".value = 'img'")
					eval ("MM_swapImage('play"+ wanted +"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play.gif',1)");
				}
			}

		}
	}
	var jse1 = document.createElement('SCRIPT');
	jse1.type = 'text/javascript';
	jse1.text = "div = document.getElementById('streamplayer');\ndiv.innerHTML = '" + incText + "';";
	document.body.appendChild (jse1);
	return true;
}

function doFlashNew(ctype,id,divid){
	var divstate = $("state"+divid); 	if(!divstate) return false;
	var imgid = $("play"+divid); 		if(divstate.value=='img'){
				incText = '<' + 'object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0" id="streaming" width="0" height="0" /><' + 'param name="movie" value="http://www.joylife.de/me/pub/c/2100947/0/en/web/img/streamplayer.swf" /><' + 'param name=FlashVars value="id=' + id + '&type=' + ctype + '&divid=' + divid +'&cid=2100947" /><' + 'param name="bgcolor" value="#000000" /><' + 'param name="quality" value="best" /><param name="scale" value="exactfit" /><' + 'param name="allowscriptaccess" value="samedomain" /><' + 'embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="0" height="0" name="streaming" src="http://www.joylife.de/me/pub/c/2100947/0/en/web/img/streamplayer.swf" bgcolor="#000000" quality="best" scale="exactfit" swLiveConnect="true" allowScriptAccess="samedomain" FlashVars="id=' + id + '&type=' + ctype + '&divid=' + divid + '&cid=2100947"><' + '/embed><' + '/object>';
		divstate.value = 'flash';
		imgid.src = 'http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_stop.gif';
	}
		else{
				incText = "";
		divstate.value = 'img';
		imgid.src = 'http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play.gif';
	}
			ctypes = new Array ('ringt', 'rrringt', 'pringtx', 'pringt4', 'pringt16', 'pringt24', 'msound', 'fulltrack','rbt');
	for (var j = 0; j < ctypes.length; j++) {
		for (var i = 0; i <= 20; i++) {
			wanted = 'prlstn' + ctypes[j] + i;
			if (divid != wanted) {
				var wanted_divstate = $("state"+wanted);
				var wanted_imgid = $("play"+wanted); 				if(wanted_divstate != null){
					wanted_divstate.value = 'img';
					if(wanted_imgid != null){
						wanted_imgid.src = 'http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play.gif';
					}
				}
			}
		}
	}
		var jse1 = document.createElement('SCRIPT');
	jse1.type = 'text/javascript';
	jse1.text = "div = document.getElementById('streamplayer');\ndiv.innerHTML = '" + incText + "';";
	document.body.appendChild (jse1);
	return true;
}

function swap (divid) {
	if(!document.identify && !eval("document.identify.state" +divid)) return false;
	if (eval("document.identify.state" +divid + ".value == 'img'")) {	
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play_over.gif',1)");
	}
	else {
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_stop_over.gif',1)");
	}
	return true;
}

function swapBack (divid) {
	if(!document.identify && !eval("document.identify.state" +divid)) return false;
	if (eval("document.identify.state" +divid + ".value == 'img'")) {	
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_play.gif',1)");
	}
	else {
		eval ("MM_swapImage('play"+divid+"','','http://www.joylife.de/me/pub/c/2100947/0/en/web/img/icon_prelisten_stop.gif',1)");
	}
	return true;
}


function msisdnCheck(msisdn){
    if (msisdn.substring(0,1) == '+' && msisdn.length >= 13){
        return true;
    }
    else{
        if (msisdn.substring(0,2) == '00' && msisdn.length >= 14){
            return true;
        }
        else{
            return false;
        }
    }
}
function sendGoPay() {
  if (!msisdnCheck(document.getElementById("gopaymsisdn").value) ){
     alert("There is a problem with the entered mobile number. Please use the international format with country code and your number without leading 0, eg. 0049178123456.");
     document.getElementById("gopaymsisdn").focus();
     return false;
  }
  else {
     if (document.getElementById("gopayagb").checked == false) {
        alert("Please accept the terms!");
        return false;
     }
     else {
        return true;
     }
  }
}

function sendGoPayPin() {
   if (document.getElementById("gopaypin").value != "") {
      return true;
   }
   else {
      alert("Bitte PIN eingeben!")
      return false;
   }
}


/* check form1 for goPay payment */
function SendTan(itemid, ctykey, mdv){
	if (msisdnCheck(document.getElementById("tanmsisdn").value) ){
		if (tanCheck(document.getElementById("tantan").value) ){
			if (document.getElementById("tanagb").checked==true) {
			  document.getElementById("sendtan").value="";
        link = '/me/pub/servlet/ItemSenderTAN?clientContractId=2100947&version=0&itemOrderId=' + itemid + '&contentType=' + ctykey + '&contentSubtype=&mobileDevice=' + mdv + '&toMSISDN='+document.getElementById("tanmsisdn").value+'&TAN='+document.getElementById("tantan").value+'&sourceFormat=';
        window.location.href=link;
        return false;
			}
			else {
        alert("Please accept the terms!");
				return false;
			}
		}
		else{
      alert("Please enter your TAN!");
      document.getElementById("tantan").focus();
			return false;
		}
	}
	else{
    alert("There is a problem with the entered mobile number. Please use the international format with country code and your number without leading 0, eg. 0049178123456.");
		document.getElementById("tanmsisdn").focus();
		return false;
	}
	return false;
}



var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i < data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{					string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 					string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();


