function setHeight() {		var height = (document.getElementById("table-layout").offsetHeight) - 200;		document.getElementById("leftmenu").style.height  =  height  +"px";		initPage();}function unloadWindow() {	if (navigator.cookieEnabled == true) {			wert = document.cookie;		$(document).ready(function() {				if (wert.indexOf("videomenu=1") == -1 && wert.indexOf("premiummenu=1") == -1) {					$("#premiumbereich").hide();					$("#menuvideos").hide();				}		})	}}function bindLinks() {	$(".jLink")	.unbind("click.links")   	.bind("click.links", function() {  		var toLoad = $(this).attr("href") + " #tableContent > *";  		var thisUrl = window.location.href;	  	$("#processingContent").show();	    $("#tableContent").hide("fast",loadContent);      	$("#processingContent").hide();				function loadContent() {  				$("#tableContent").load(toLoad,"",showNewContent);  			}							function showNewContent() {  				$("#tableContent").show("normal",function() {					bindLinks(); 				});	 				hideLoader();			}	   							function hideLoader() {  				$("#processingContent").fadeOut("normal");				$("#lastPage").val(thisUrl); 			} 	   		return false;		});	$(".shopLink").click(function () { 		$("#tableContent").replaceWith("<iframe src='/secure/eshop.nsf/videotrainings?OpenView' frameborder='0' width='630' height='2199' name='shopframe'>Ihr Browser unterst\u00FCtzt leider keine Frames<br /><a href='http://www.cycot.biz'>Zum Webshop</a></iframe>");		return false;	});}  		 $(document).ready(function() {	bindLinks();	});function menuCookie() {	if (navigator.cookieEnabled == true) {			wert = document.cookie;		$(document).ready(function() {			if ( wert.indexOf("videomenu=1") != -1) {				//		document.getElementById('menuvideos').style.display='block';				$("#menuvideos").slideDown("slow");				 $("#premiumbereich").hide();			}						if ( wert.indexOf("premiummenu=1") != -1) {				if (document.getElementById('premiumbereich')){						// document.getElementById('premiumbereich').style.display='block';						$("#premiumbereich").slideDown("slow");						$("#menuvideos").hide();				} 			}				if (wert.indexOf("videomenu=1") == -1 && wert.indexOf("premiummenu=1") == -1) {				$("#premiumbereich").hide();				$("#menuvideos").hide();			}		})	}}function getMenuCookie() {	var standard = 0;	var premium = 0;	if (navigator.cookieEnabled == true) {				wert = document.cookie;			if ( wert.indexOf("videomenu=1") != -1) {				standard = 1;			}				if ( wert.indexOf("premiummenu=1") != -1) {				premium = 2;			}							return (standard +premium);		}	}function setMenuCookie(kategorie, neuerWert) {	if (navigator.cookieEnabled == true) {			document.cookie	=	kategorie + "menu=" + neuerWert + "; path=/"; 		}}function setMenu(selection) {	var menu = getMenuCookie();	var standard = document.getElementById('menuvideos');	var premium = document.getElementById('premiumbereich');			if( selection == "none") {			$("#premiumbereich:visible").slideUp("slow");				$("#menuvideos:visible").slideUp("slow");			setMenuCookie("video","0");			setMenuCookie("premium","0");			}					if ( menu == 0 && selection == "standard") {			$("#menuvideos").slideToggle("slow");			$("#premiumbereich:visible").slideUp("slow");				//	standard.style.display='block';			setMenuCookie("video","1");			return false;		}			if ( menu == 1 && selection == "standard") {			$("#menuvideos").slideToggle("slow");			$("#premiumbereich:visible").slideUp("slow");			//	standard.style.display='none';			setMenuCookie("video","0");			return false;		}				if ( menu == 2 && selection == "standard") {			// standard.style.display='block';			$("#menuvideos").slideToggle("slow");			if(premium){				//premium.style.display='none';				$("#premiumbereich:visible").slideUp("slow");			}				setMenuCookie("video","1");		}				if ( menu == 0 && selection == "premium") {			// standard.style.display='none';			$("#menuvideos:visible").slideUp("slow");			if(premium){				// premium.style.display='block';				$("#premiumbereich").slideToggle("slow");				setMenuCookie("premium","1");			}		}			if ( menu == 1 && selection == "premium") {			// standard.style.display='none';			$("#menuvideos:visible").slideUp("slow");			if(premium){				// premium.style.display='block';				$("#premiumbereich").slideToggle("slow");				setMenuCookie("premium","1");			}			}				if ( menu == 2 && selection == "premium" ){			$("#menuvideos:visible").slideUp("slow");			if(premium){				// premium.style.display='none';				$("#premiumbereich").slideToggle("slow");			}			setMenuCookie("premium","0");		}				if ( menu == 3 && selection == "standard") {			// standard.style.display='none';			$("#menuvideos").slideToggle("slow");			if(premium){				// premium.style.display='none';				$("#premiumbereich").slideUp("slow");			}			setMenuCookie("video","0");		}				if ( menu == 3 & selection == "premium") {			$("#menuvideos").slideUp("slow");			if(premium){				// premium.style.display='none';				$("#premiumbereich").slideToggle("slow");			}			setMenuCookie("premium","0");		}}// Jake Howlett http://www.codestore.net/store.nsf/unid/DOMM-4PYJ3S?OpenDocumentfunction openWindow(url, name, args) {	if (typeof(popupWin) != "object"){		popupWin = window.open(url,name,args);	} else {		if (!popupWin.closed){			popupWin.location.href = url;		} else {			popupWin = window.open(url, name,args);		}	}	popupWin.focus();}// http://www.derwok.de/service/email_stopspam/;		 function UnCryptMailto(s, shift) {		 var n=0;		 var r="";		 for(var i=0;i<s.length;i++) { 		 		 n=s.charCodeAt(i); 		 		 if (n>=8364) {n = 128;}		 		 r += String.fromCharCode(n-(shift)); 		 }		 return r;}function linkTo_UnCryptMailto(s, shift)		 {		 location.href=UnCryptMailto(s, shift);}function brm() {	breite = parseInt(document.forms[0].ScreenWidth.value) + 20;	hoehe = parseInt(document.forms[0].ScreenHeight.value) + 159;		if (screen.availWidth > breite && screen.availHeight > hoehe) {		window.resizeTo(breite, hoehe);	} else {		window.resizeTo(screen.availWidth, screen.availHeight);	}}function menuCategory() { 	var urlMenu = new String(document.URL); 	category=document.forms["cat"].menuCat.value;}// Submit wenn man enter dr\u00FCcktfunction submitenter(myfield,e){var keycode;if (window.event) keycode = window.event.keyCode;else if (e) keycode = e.which;else return true;if (keycode == 13)   {   loginObj.login();   return false;   }else   return true;}// Shopfunction initializePage() {	menuCookie();	setHeight();		var urlCartID = new String(document.URL);	cartID = getCartID("cartid",urlCartID, "&");	if (navigator.cookieEnabled == true) { 		var cookies=document.cookie; 		cookieID = getCartID("cartid", cookies, ";");    	}	if (cartID==null && navigator.cookieEnabled == true) { 		var cookies=document.cookie;  		cartID = getCartID("cartid", cookies, ";"); 	}     	if ( cartID != null && navigator.cookieEnabled == true && cookieID !=null && cookieID != cartID ) {		cookieID = cartID;		if (document.forms[0] && document.forms[0].CartID) {			var ablauf = new Date();			var morgen = ablauf.getTime() + (1 * 24 * 60 * 60 * 1000);			ablauf.setTime(morgen);			document.cookie = "cartid="+ cartID+"; expires=" + ablauf.toGMTString();		}	}		if (cartID==null) { 		cartID=randomNum();     }	 		setLinks(cartID);	shoppingCart(cartID);}function randomNum() {      var TodaysDate=new Date();      var rn = String(Math.floor(16000 * (Math.random()+1)))+"-"+String(TodaysDate.getHours()+String(TodaysDate.getMinutes())+String(TodaysDate.getSeconds()));       return rn;}function setLinks(v) {       for (var i = 0; i < document.links.length; i++) {		if (String(document.links[i]).indexOf("/secure/") != -1) {   			if ((String(document.links[i]).toLowerCase().indexOf("cartid") ==-1) &&  (String(document.links[i]).toLowerCase().indexOf(".pdf") ==-1)) {				if  ( document.links[i].search.length > 0) { 					document.links[i].search=document.links[i].search + "&CartID=" +v ;				}  				}  		}	} } function getCartID(name, inputstring, trunc) {	inputstring = inputstring + trunc;	inputstring = inputstring.toLowerCase();	var start=inputstring.indexOf(name + "=");	if (start>-1) {		start=inputstring.indexOf("=", start)+1	}	var end = inputstring.indexOf(trunc, start);	if (start==-1 || end==-1) {		value=null	} else {	    var value=unescape(inputstring.substring(start,end))	}	return value;}function shoppingCart() {			var hn		= location.hostname;			var prt		= location.protocol;			var xmlUrl	= prt + "//" + hn + "/secure/eshop.nsf/shoppingxmlcart.xml?OpenPage&CartID=" + cartID;			var namesHTML = "<table border='0' style='table-layout:fixed;width:155px;border-collapse:collapse;border-spacing:0px;font-size:7pt;'><colgroup><col width='90'><col width='10'><col width='39'><col width='16'></colgroup>";			var cartUrl	= prt + "//" + hn + "/secure/eshop.nsf/cart?ReadForm&thema=allplanlernen&CartID="+ cartID;				$.ajax({				type: "GET",				url: xmlUrl,				dataType: "xml",				aSync: "true",				success: function(xml){					var unids 			=$("unid", xml)					var prodNames		=$("productname", xml);					var prodOptions	=$("productoption", xml);					var qts				=$("quantity", xml);					var priceTotal		=$("pricetotal", xml);									var img				= "<img src='"+ prt + "//" + hn +"/secure/eshop.nsf/icon-del-12x12.gif' alt='del' width='12' height='12' />";					for (var i=0; i < unids.length; i++) {  						namesHTML = namesHTML + "<tr><td align='left'><a href='"+cartUrl+"' title='" + prodOptions[i].firstChild.nodeValue +"'>"+ prodNames[i].firstChild.nodeValue + "</a></td><td align='center'>"+qts[i].firstChild.nodeValue+"</td><td align='right'>" + priceTotal[i].firstChild.nodeValue + "</td><td align='center'><a href='" + prt + "//" + hn + "/secure/eshop.nsf/cartdelprod?OpenAgent&unid=" + unids[i].firstChild.nodeValue +"&amp;CartID="+ cartID+"'>" + img + "</a></td></tr>";					}					namesHTML = namesHTML + "<tr><td colspan='4' height='30'><center><a href='"+cartUrl+"'><b>Warenkorb \u00F6ffnen</b></a></center></td></tr></table>";					$("#cartDetail").replaceWith(namesHTML);		//			$("#cartDetail").empty();  		//			$("#cartDetail").append(namesHTML);  				}		});}// 2010-03-17 HH Volltextsuche Allplanlernen.defunction searchView() {	var query1 = $("input[name=Query]").val();	var query2 = $("#searchQuery").val();	var query = query2;		if (query == "" && query1 !=="") {		query = query1;	};	if (query !== "") {		initSearch(query);		return true;	} else {		window.location.href="/cycot/service/webinare.nsf/suchen?SearchView&Query=&responseType=Error&responseValue=%21%20Bitte%20geben%20Sie%20einen%20Suchbegriff%20ein";		return true;		}	};function initSearch(searchString) {if (searchString !== "") {		window.location.href="/cycot/service/webinare.nsf/suchen?SearchView&Query=" + searchString + "&SearchMax=50";	} else {		window.location.href="/cycot/service/webinare.nsf/suchen?SearchView&Query=&responseType=Error&responseValue=%21%20Bitte%20geben%20Sie%20einen%20Suchbegriff%20ein";	}};function initPage(){	$(document).keyup(function(e) { 		var code = (e.keyCode ? e.keyCode : e.which); 		if(code == 13) { 			if ($('#Password').val() !='' && $('#Password').length != 0)  {				loginObj.login();				return false;			}			if ($('#searchQuery').val() !='' && $('#searchQuery').length != 0)  {				searchView();				return false;			}			if ($('input[name=Query]').val() !='' && $('input[name=Query]').length != 0)  {				searchView();				return false;			}			return false;							 } 	});		}	