/* This Javascript object is used to check to see if a user has entered there correct Domino credientialsThis code could break if the standard error message returned by Domino (session based authentication) changes in the future*/var loginObj={		//Main function	login : function(){				// Display busy animation		// Element.show('processing');					// Prototype		$("#processing").show();				// Get the field values		username	= $("[name=Username]").val();		password	= $("[name=Password]").val();			var servername		=	location.hostname;		if ( servername == "") { servername = "www"};		var defaultDbPath	 	=	"/cycot/service/webinare.nsf";		var returnUrl 			=	"/createSessionDoc?OpenAgent&RedirectTo=/cycot/service/webinare.nsf/page?ReadForm&type=videotrainings";		urlPath					= 	location.pathname;		nsfCount 				=	urlPath.toLowerCase().lastIndexOf(".nsf");			if (nsfCount  == -1) {			dbPath = defaultDbPath;		}else{			dbPath = urlPath.substr(0,nsfCount+4).toLowerCase();			if (urlPath. toLowerCase().lastIndexOf("/cycot/service/support.nsf") != -1) {				returnUrl 		=	"/question?OpenForm";			}		}				returnUrl			= dbPath +returnUrl;				if(username=="" || password==""){			this.resetLogin();			return false;		}		var url = location.protocol+"//"+ servername +'/names.nsf?login';								// Set the positioning URL -the Names.nsf?login - uses a CGI Variable SERVER_NAME		var pars="Username="+encodeURIComponent(username)+"&Password="+encodeURIComponent(password);					// Encode the parameters		var myAjax = new $.ajax({			type: "POST",			url: url,			data: pars,			dataType: "html",			timeout: 5000,		    error: function(){        			alert('Es ist ein Fehler aufgetreten. Bitte benutzen Sie die alternative Login Funktion oben in der Men\u00FCleiste');        			loginObj.resetLogin();    			},			//		complete: function(){}					success: function(html) {			loginObj.processResponse(html, servername, returnUrl);			//loginObj.resetLogin();			}		});	},		processResponse: function(html, servername, returnUrl){		test= html.indexOf("Passwort sind falsch");		if(test==-1){			location.href = location.protocol+"//"+ servername + returnUrl;		}else{			alert('Benutzername oder Passwort leider nicht korrekt');				this.resetLogin();			return false;		}	},		resetLogin:function(){		//Element.hide('processing');		$("#processing").hide();		$("#loginForm")[0].reset();		$("#loginForm :input:first").focus();	},		logout: function(){		window.location.href = "/cycot/service/webinare.nsf?Logout&RedirectTo=/cycot/service/webinare.nsf/0/BB654904B784CE97C12572E7005E2742?OpenDocument";	}}