/*Функция для перенаправления пользователя на нужную перспективу*/
function redirect(mainContext, addContext, filterContext) {
	window.open(document.location.protocol+"//"+document.location.host+ document.location.pathname+addContext, "_top");
};
function getAuth(mainContext, addContext, filterContext, userid, sid, url) {
	xmlhttp =new XMLHttpRequest(); 
	if("withCredentials" in xmlhttp) { 
		xmlhttp.open("GET", "https://certif.lancelot-it.ru/pentaho/Login?userid="+userid+"&password="+sid, true); 
		xmlhttp.withCredentials = true; 
		xmlhttp.send();
		xmlhttp.onreadystatechange = function() { 
			if (xmlhttp.readyState == 4) { 
				if(xmlhttp.status != 404)  { 
					xmlhttp.onloadend = function() { 
						window.open('https://certif.lancelot-it.ru/pentaho/content/openi/RenderOAnalysis?actionType=view&path='+url);
					} 
				} 
			} 
		}
  }
};