var GSKID_WIDGET_DISABLED = false; function GskIdWidget(_gskIdUrl, _objName, _websiteName, _showDoctorsPanel, _showUsersPanel, _isLoggedInPortal) { this.gskIdUrl = _gskIdUrl; this.layer1_expanded = false; this.layer2_expanded = false; this.objName = _objName; this.websiteName = _websiteName; this.isVisible = true; this.showDoctorsPanel = false; //_showDoctorsPanel; this.showUsersPanel = false; //_showUsersPanel; if (_isLoggedInPortal == null) this.isLoggedInPortal = false; else this.isLoggedInPortal = _isLoggedInPortal; } GskIdWidget.prototype.init = function() { if (GSKID_WIDGET_DISABLED) return; if (this.isLoggedInPortal) { this.validateSession(); } if (!this.showDoctorsPanel) return; var outerDiv = document.createElement("DIV"); document.body.appendChild(outerDiv); //wartstwa do logowania lekarzy (naglowek+iframe) var header1 = "
"; header1 += ""; header1 += ""; header1 += ""; header1 += ""; header1 += "
   Logowanie 
"; header1 += "
" var iframe1 = ""; var layerForDoctors = header1 + "
" + iframe1 + "
"; //warstwa do logowania pacjentow (naglowek+iframe+link do rejestracji) var iframe2 = ""; var header2 = "
"; header2 += ""; header2 += ""; header2 += ""; header2 += ""; header2 += "
   Logowanie 
"; header2 += "
" var links2 = ""; var layerForUsers = header2 + "
" + iframe2 + links2 + "
"; var html = "
"; html += ""; html += ""; //komorka z logo gskid html += ""; //komorka z przyciskami i rozwijana wartswa html += ""; //ostatnia komorka z pineska html += ""; html += ""; html += "
"; //dodatkowa tabelka ktora trzyma dwa przyciski html += ""; html += ""; if (this.showDoctorsPanel) { html += ""; } if (this.showUsersPanel) { // *tymczasowo wylaczone // html += ""; } html += "
"; html += " "; html += "
Dla lekarzy
"; html += "
"; // html += " "; // html += "
Dla pacjentów
"; // html += "
"; //koniec tej dodatkowej tabelki html += "
"; html += "
"; // var html = "
"; // html += ""; // html += ""; // html += ""; // html += ""; // html += ""; // html += ""; // html += ""; outerDiv.innerHTML = html; gskid_initLightbox(); if (gskid_getCookie('gskid_widget_visibility') == '0') this.hideOrShow(); } GskIdWidget.prototype.validateSession = function() { //var div = document.createElement("DIV"); //div.style.display = 'none'; //document.body.appendChild(div); //var url = this.gskIdUrl + '/client-framework/backgroundactions/checkglobalsession.aspx?website=' + this.websiteName + '&backUrl='+encodeURIComponent(document.location.href); //div.innerHTML = ""; } GskIdWidget.prototype.hideOrShow = function() { var layer = document.getElementById('gskid_layer_1'); if (layer!=null && layer.style.display == 'block') this.expandOrCollapse(1); layer = document.getElementById('gskid_layer_2'); if (layer != null && layer.style.display == 'block') this.expandOrCollapse(2); this.isVisible = !this.isVisible; document.getElementById('gskid_widget_container').style.display = (this.isVisible ? 'block' : 'none'); document.getElementById('gskid_pin_img').src = this.gskIdUrl + "/client-framework/widget/img/" + (this.isVisible ? 'pin1.gif' : 'pin2.gif'); gskid_setCookie('gskid_widget_visibility', (this.isVisible ? '1' : '0'), 30, '/', null, null); } GskIdWidget.prototype.expandOrCollapse = function(id) { if (id == 1 && this.layer2_expanded) { var tmp = document.getElementById('gskid_layer_2'); tmp.style.display = 'none'; //tmp.parentNode.className = 'gskid_layer_border_off'; this.layer2_expanded = false; } if (id == 2 && this.layer1_expanded) { var tmp = document.getElementById('gskid_layer_1'); tmp.style.display = 'none'; //tmp.parentNode.className = 'gskid_layer_border_off'; this.layer1_expanded = false; } var obj = document.getElementById('gskid_layer_' + id); obj.style.display = (obj.style.display == 'none' ? 'block' : 'none'); //obj.parentNode.className = (obj.style.display == 'none' ? 'gskid_layer_border_off' : 'gskid_layer_border_on'); if (id == 1) this.layer1_expanded = true; else if (id == 2) this.layer2_expanded = true; } GskIdWidget.prototype.createProfile = function() { gskid_showLightbox(720, 565, this.gskIdUrl + '/client-framework/widget/lightbox/user-registration.aspx?website=' + this.websiteName, this.gskIdUrl); } GskIdWidget.prototype.rememberPassword = function() { gskid_showLightbox(620, 440, this.gskIdUrl + '/client-framework/widget/lightbox/remember-password.aspx?website=' + this.websiteName, this.gskIdUrl); } GskIdWidget.prototype.showHelp = function(bOpenInLightbox) { if (bOpenInLightbox) gskid_showLightbox(620, 594, this.gskIdUrl + '/client-framework/widget/lightbox/help.aspx?website=' + this.websiteName, this.gskIdUrl); else window.open(GSKID_HELP_URL); }
"; // html += " "; // html += " "; // if (this.showDoctorsPanel == true) // html += " "; // if (this.showUsersPanel == true) // html += " "; // html += " "; // html += " "; // if (this.showDoctorsPanel == true) // html += " "; // if (this.showUsersPanel == true) // html += " "; // html += " "; // html += "
Lekarze
Użytkownicy
"; // html += "