HTMLElement.prototype._getBoundingClientRect = HTMLElement.prototype.getBoundingClientRect; HTMLElement.prototype.getBoundingClientRect = function () { try { return this._getBoundingClientRect(); } catch (e) { return { top: this.offsetTop, left: this.offsetLeft }; } } function getScrollTop(element) { if (typeof pageYOffset != 'undefined') return pageYOffset; else { var bodyElm = document.body; var docElm = document.documentElement; docElm = (docElm.clientHeight) ? docElm : bodyElm; return docElm.scrollTop; } } function getScrollLeft() { if (typeof pageXOffset != 'undefined') return pageXOffset; else { var bodyElm = document.body; var docElm = document.documentElement; docElm = (docElm.clientWidth) ? docElm : bodyElm; return docElm.scrollLeft; } } function getWindowHeight() { var wHeight; if (window.innerHeight) wHeight = window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) wHeight = document.documentElement.clientHeight; else if (document.body) wHeight = document.body.clientHeight; return wHeight; } function getWindowWidth() { var wWidth; if (window.innerWidth) wWidth = window.innerWidth; else if (document.documentElement && document.documentElement.clientWidth) wWidth = document.documentElement.clientWidth; else if (document.body) wWidth = document.body.clientWidth; return wWidth; } function doAJAXPostBack(eventTarget, methodName) { var eventArgument = "__undone__"; for (var i = 1; i < arguments.length; i++) { eventArgument += arguments[i]; if ((i + 1) < arguments.length) eventArgument += ','; } __doPostBack(eventTarget, eventArgument); } function clearAJAXPostBack() { theForm.__EVENTTARGET.value = ''; theForm.__EVENTARGUMENT.value = ''; } function imposeMaxLength(object, maxLen) { if (object.value.length > maxLen) object.value = object.value.substring(0, maxLen); return (object.value.length < maxLen); } function resizeGrid(sender, args) { var rowCount = sender.get_masterTableView().get_dataItems().length; var pageIndex = sender.get_masterTableView().get_currentPageIndex(); var pageSize = sender.get_masterTableView().get_pageSize(); var footerHeight = (rowCount >= pageSize || pageIndex > 0) ? 34 : 0; var addHeader = false; if (typeof isHeaderExist != 'undefined') addHeader = isHeaderExist; var headerHeight = (addHeader) ? 26 : 0; if (rowCount < 1) footerHeight = 30; var rowsHeight = (sender.get_id().indexOf('ItemMediaGrid') > -1) ? mediaGridRowsHeight : gridRowsHeight; sender.get_element().style.height = ((rowCount * rowsHeight) + footerHeight + headerHeight) + 'px'; } function scrollToTop() { scrollTo(0, 0); } function scrollPageToTop() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } function getPageWidth() { var doc = document; return Math.max( Math.max(doc.body.scrollWidth, doc.documentElement.scrollWidth), Math.max(doc.body.offsetWidth, doc.documentElement.offsetWidth), Math.max(doc.body.clientWidth, doc.documentElement.clientWidth) ); } function getPageHeight() { var doc = document; return Math.max( Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight), Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight), Math.max(doc.body.clientHeight, doc.documentElement.clientHeight) ); } function locateProgressPanel() { var wW = getWindowWidth(); var wH = getWindowHeight(); var pW = document.getElementById("ProgressPanel").style.width; var pH = document.getElementById("ProgressPanel").style.height; document.getElementById("ProgressPanel").style.left = (getScrollLeft() + ((wW - 75) / 2)) + 'px'; document.getElementById("ProgressPanel").style.top = (getScrollTop() + ((wH - 75) / 2)) + 'px'; document.getElementById("ProgressBackgroundFilter").style.width = getPageWidth() + 'px'; document.getElementById("ProgressBackgroundFilter").style.height = getPageHeight() + 'px'; } function dumpProps(obj, parent) { for (var i in obj) { var msg = ''; if (parent) { msg = parent + "." + i + "\n" + obj[i]; } else { msg = i + "\n" + obj[i]; } if (!confirm(msg)) { return; } if (document.getElementById('dumpPropsText')) document.getElementById('dumpPropsText').value += msg + "\r\n"; if (typeof obj[i] == "object") { if (parent) { dumpProps(obj[i], parent + "." + i); } else { dumpProps(obj[i], i); } } } // } function hierarchyComboNodeClicking(sender, args) { var comboBox = $find(sender.get_id().replace('_i0_HierarchyTreeView', '')); var node = args.get_node() comboBox.set_text(node.get_text()); comboBox.trackChanges(); comboBox.get_items().getItem(0).set_value(node.get_value()); comboBox.commitChanges(); comboBox.hideDropDown(); } function getRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; return oWindow; } function returnToParent(passedValue, passedId, targetElement) { var oArg = new Object(); if (passedValue != null) oArg.passedvalue = passedValue; if (passedId != null) oArg.passedid = passedId; if (targetElement != null) oArg.targetelement = targetElement; var oWindow = getRadWindow(); oWindow.close(oArg); } function optimizationChange(sender, args) { document.getElementById(sender.get_id() + 'Degree').innerHTML = sender.get_value(); } function showHierarchyItemControl(sender) { hideHierarchyItemControls(); document.getElementById(sender.id.replace('textbox', 'control')).style.display = 'block'; } function hideHierarchyItemControls() { var divCollection = document.getElementsByTagName("div"); for (var i = 0; i < divCollection.length; i++) if (divCollection[i].id.indexOf("control") > -1) divCollection[i].style.display = 'none'; } function colorChangedByPicker(sender, eventArgs) { var color = sender.get_selectedColor(); if (color == null) color = ''; $find(sender.get_id().replace('Picker', 'Text')).set_value(color); } function colorChangedByText(sender, args) { $find(sender.get_id().replace('Text', 'Picker')).set_selectedColor(sender.get_value()); } function sliderChanged(sender, args) { document.getElementById(sender.get_id() + 'Value').innerHTML = sender.get_value(); } function showMessage(msg) { // document.getElementById("ctl00_FakeButton").focus(); alertify.alert(msg); return false; } //------------------------------------------------------------------------------------------------ function showItem(id) { document.getElementById(id).style.display = "block"; } function hideItem(id) { document.getElementById(id).style.display = "none"; } function switchSideMenuDisplay() { var x = document.getElementById("l-nav"); if (x.className.indexOf("w3-show") == -1) { removeClassName("p-nav", "w3-show"); x.className += " w3-show"; if (document.getElementById("MenuIcon").src.indexOf("mobile") > -1) document.getElementById("MenuIcon").src = "/files/images/close-mobile.png"; else document.getElementById("MenuIcon").src = "/files/images/close.png"; } else resetMenu(); } function switchSideCalendarMenuDisplay() { resetMenu(); var x = document.getElementById("calendar-panel"); if (x == null) { document.location.href = "/management/scheduler/"; return; } if (x.className.indexOf("w3-show") == -1) { removeClassName("calendar-panel", "w3-show"); x.className += " w3-show"; } else { removeClassName("calendar-panel", "w3-show"); } } function switchProfileMenuDisplay() { var x = document.getElementById("p-nav"); if (x.className.indexOf("w3-show") == -1) { resetMenu(); x.className += " w3-show"; } else resetMenu(); } function resetMenu() { var i = document.getElementById("MenuIcon"); if (i.src.indexOf("mobile") > -1) i.src = "/files/images/menu-hamburger-mobile.png"; else i.src = "/files/images/menu-hamburger.png"; removeClassName("l-nav", "w3-show"); removeClassName("p-nav", "w3-show"); } function switchDisplay(itemId) { var x = document.getElementById(itemId); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; } else { x.className = x.className.replace(" w3-show", ""); } } function showMenuOption(itemId) { var x = document.getElementById(itemId); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; } } function removeClassName(itemId, clsName) { var x = document.getElementById(itemId); if (x.className.indexOf(clsName) > -1) { x.className = x.className.replace(" " + clsName, ""); } } function addClassName(itemId, clsName) { var x = document.getElementById(itemId); if (x.className.indexOf(clsName) == -1) { x.className += " " + clsName; } } function printContract(div1Id, div2Id) { var content = document.getElementById(div1Id).innerHTML + "

EK-1 TUR PROGRAMI


" + document.getElementById(div2Id).innerHTML; var mywindow = window.open('', 'Print', 'height=600,width=800'); mywindow.document.write('Print'); mywindow.document.write(''); mywindow.document.write(content); mywindow.document.write(''); mywindow.document.close(); mywindow.focus() mywindow.print(); mywindow.close(); return true; } function AutoCompleteItemSelected(sender, e) { $get(sender.get_element().id + 'HF').value = e.get_value(); $get(sender.get_element().id + 'TF').value = e.get_text(); sender.get_element().value = e.get_text(); } function AutoCompleteTextChanged(sender) { if (sender.value.trim() == '') document.getElementById(sender.id + 'HF').value = document.getElementById(sender.id + 'TF').value = ''; else sender.value = document.getElementById(sender.id + 'TF').value; } function forceAllowedChars(textBox, extraChars) { var position = textBox.selectionStart - 1; value = textBox.value; textBox.value = textBox.value.replace(new RegExp('([^abcçdefgğhıijklmnoöpqrsştuüvwxyzABCÇDEFGĞHIİJKLMNOÖPQRSŞTUÜVWXYZ0123456789' + extraChars + ']+)', 'g'), ''); if (value != textBox.value) { textBox.selectionStart = position; textBox.selectionEnd = position; } } function convertToEnglishUpperCase(textBox) { textBox.value = textBox.value .replace('ı', 'I').replace('ş', 'S').replace('ç', 'C').replace('ö', 'O').replace('ü', 'U').replace('ğ', 'G') .replace('İ', 'I').replace('Ş', 'S').replace('Ç', 'C').replace('Ö', 'O').replace('Ü', 'U').replace('Ğ', 'G') .toUpperCase(); } $(document).ready(function () { $(document).on("change keydown input", ".phone-number", function (e) { checkCursor(this, e); }).on("change keyup input", ".phone-number", function () { formatPhoneNumberInput(this); }); $(document).on("change keydown input", ".credit-card-number", function (e) { checkCursor(this, e); }).on("change keyup input", ".credit-card-number", function () { formatCreditCardInput(this); }); $(document).on("change keydown input", ".numeric", function () { forceTextOnly(this, '0123456789') }); $(document).on("change keydown input", ".basic-phone", function () { forceTextOnly(this, '+0123456789 ') }); $(document).on("change keyup input", ".integer", function () { formatNumericInput(this, false, false, 0); }); $(document).on("change keyup input", ".integer-negative", function () { formatNumericInput(this, false, true, 0); }); $(document).on("change keyup input", "[class*='decimal']", function () { var cname = $(this).attr('class').split(' '); for (i = 0; i < cname.length; i++) if (cname[i] == 'decimal' || cname[i].startsWith('decimal-')) { formatNumericInput(this, true, cname[i].indexOf("negative") > -1, parseInt(cname[i].replace('decimal', '').replace('negative', '').replace(/-/g, ''), 10) || 0); break; } }); $(document).on("change keyup input", "[class*='text-only']", function () { var cname = $(this).attr('class').split(' '); for (i = 0; i < cname.length; i++) if ((cname[i] == 'text-only') || cname[i].startsWith('text-only-')) { var allowedChars = ''; if (cname[i] == 'text-only' || cname[i] == 'text-only-tr' || cname[i].indexOf("lower") >-1) allowedChars += 'abcdefghijklmnopqrstuvwxyz '; if (cname[i] == 'text-only-tr' || cname[i].indexOf("lower-tr") > -1) allowedChars += 'çğıöşü'; if (cname[i] == 'text-only' || cname[i] == 'text-only-tr' || cname[i].indexOf("upper") > -1) allowedChars += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '; if (cname[i] == 'text-only-tr' || cname[i].indexOf("upper-tr") > -1) allowedChars += 'ÇĞİÖŞÜ'; forceTextOnly(this, allowedChars); break; } }); }); function formatNumericInput(element, decimal, allowNegative, decimalPlaces) { var cursor = element.selectionStart; var length = element.value.length; var fixed = element.value.replace(decimal ? /[^-0-9\.,]/g : /[^-0-9]/g, ''); if (decimal) { if (fixed.indexOf(',') > -1) fixed = fixed.replace(',', '.'); if (fixed.charAt(0) === '.') fixed = fixed.slice(1); var dpos = fixed.indexOf(".") + 1; if (dpos >= 0) fixed = fixed.substr(0, dpos) + fixed.slice(dpos).replace('.', ''); dpos = fixed.indexOf(".") + 1; if (decimalPlaces > 0 && fixed.indexOf(".") > -1 && fixed.slice(dpos).length > decimalPlaces) fixed = fixed.substr(0, dpos) + fixed.slice(dpos).substr(0, decimalPlaces); } if (fixed.indexOf('-') > -1) { fixed = allowNegative ? fixed.substr(0, 1) + fixed.slice(1).replace('-', '') : fixed.replace('-', ''); if (decimal && fixed.indexOf('-.') > -1) fixed = fixed.replace('-.', '-'); } if (fixed.length < length && fixed.substr(cursor - 1, 1) != '.') cursor = cursor - 1; if (cursor < 0) cursor = 0; if (element.value !== fixed) { element.value = fixed; element.selectionStart = cursor; element.selectionEnd = cursor; } } function checkCursor(element, event) { var cursor = element.selectionStart; if (element.selectionEnd != cursor) return; if (event.which == 46 && (element.value[cursor] == " " || element.value[cursor] == "-")) element.selectionStart++; else if (event.which == 8 && cursor && (element.value[cursor - 1] == " " || element.value[cursor - 1] == "-")) element.selectionEnd--; } function formatCreditCardInput(element) { var value = element.value; var cursor = element.selectionStart; var matches = value.substring(0, cursor).match(/[^0-9]/g); var formattedNr = ""; if (matches) cursor -= matches.length; value = value.replace(/[^0-9]/g, "").substring(0, 16); for (var i = 0, n = value.length; i < n; i++) { if (i && i % 4 == 0) { if (formattedNr.length <= cursor) cursor += 1; formattedNr += " "; } formattedNr += value[i]; } if (formattedNr == element.value) return; element.value = formattedNr; element.selectionEnd = cursor; } function formatPhoneNumberInput(element) { var value = element.value; var cursor = element.selectionStart; var matches = value.substring(0, cursor).match(/[^0-9]/g); var formattedNr = ""; if (matches) cursor -= matches.length; value = value.replace(/[^0-9]/g, "").substring(0, 10); for (var i = 0, n = value.length; i < n; i++) { if (i == 3 || i == 6 || i == 8) { if (formattedNr.length <= cursor) cursor += 1; formattedNr += i == 3 ? "-" : " "; } formattedNr += value[i]; } if (formattedNr.startsWith('0')) { formattedNr = formattedNr.slice(1); cursor--; } if (formattedNr == element.value) return; element.value = formattedNr; element.selectionEnd = cursor; } function forceTextOnly(textBox, chars) { var position = textBox.selectionStart - 1; value = textBox.value; textBox.value = textBox.value.replace(new RegExp('([^' + chars + ']+)', 'g'), ''); if (value != textBox.value) { textBox.selectionStart = position; textBox.selectionEnd = position; } } function initLightBox(elementClass, containerId, type) { elementClass = (elementClass.substring(1, 1) != '.' && elementClass.substring(1, 1) != '#' ? '.' : '') + elementClass; $(elementClass).each(function (i, obj) { obj.addEventListener('click', function (e) { e.preventDefault(); if (type == "image") BigPicture({ el: e.target, gallery: '#' + containerId }); else if (type == "video") BigPicture({ el: e.target, vidSrc: e.target.getAttribute(type + 'Src') }); else if (type == "audio") BigPicture({ el: e.target, audio: e.target.getAttribute(type + 'Src') }); else if (type == "iframe") BigPicture({ el: e.target, iframeSrc: e.target.getAttribute(type + 'Src'), dimensions: [800, 800] }); }); }); } function showDialog(updatePanelID, title, message, btn1Txt, btn1Method, btn1Val, btn2Txt, btn2Method, btn2Val) { var d = '
' + '
' + '
' + '×' + title + '
' + '
' + message + '
' + '
'; if (btn1Txt != '' && btn2Txt != '') { d += '
' + '
' + '' + '
' + '
' + '' + '
' + '
'; } else { d += '
' + '' + '
'; } d += '
' + '
' + '
'; removeDialog(); var elm = document.createElement("div"); elm.id = "diaModalDiv"; elm.innerHTML = d; document.body.appendChild(elm); document.getElementById('diaModalForm').style.display = 'block'; } function removeDialog() { var oldElement = document.getElementById('diaModalDiv'); if (typeof (oldElement) != 'undefined' && oldElement != null) { document.getElementById('diaModalForm').style.display = 'none'; document.body.removeChild(oldElement); } } /*! alertify - v0.3.11 - 2013-10-08 */ !function (a, b) { "use strict"; var c, d = a.document; c = function () { var c, e, f, g, h, i, j, k, l, m, n, o, p, q = {}, r = {}, s = !1, t = { ENTER: 13, ESC: 27, SPACE: 32 }, u = []; return r = { buttons: { holder: '', submit: '', ok: '', cancel: '' }, input: '
', message: '

{{message}}

', log: '
{{message}}
' }, p = function () { var a, c, e = !1, f = d.createElement("fakeelement"), g = { WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend" }; for (a in g) if (f.style[a] !== b) { c = g[a], e = !0; break } return { type: c, supported: e } }, c = function (a) { return d.getElementById(a) }, q = { labels: { ok: "OK", cancel: "Cancel" }, delay: 5e3, buttonReverse: !1, buttonFocus: "ok", transition: b, addListeners: function (a) { var b, c, i, j, k, l = "undefined" != typeof f, m = "undefined" != typeof e, n = "undefined" != typeof o, p = "", q = this; b = function (b) { return "undefined" != typeof b.preventDefault && b.preventDefault(), i(b), "undefined" != typeof o && (p = o.value), "function" == typeof a && ("undefined" != typeof o ? a(!0, p) : a(!0)), !1 }, c = function (b) { return "undefined" != typeof b.preventDefault && b.preventDefault(), i(b), "function" == typeof a && a(!1), !1 }, i = function () { q.hide(), q.unbind(d.body, "keyup", j), q.unbind(g, "focus", k), l && q.unbind(f, "click", b), m && q.unbind(e, "click", c) }, j = function (a) { var d = a.keyCode; (d === t.SPACE && !n || n && d === t.ENTER) && b(a), d === t.ESC && m && c(a) }, k = function () { n ? o.focus() : !m || q.buttonReverse ? f.focus() : e.focus() }, this.bind(g, "focus", k), this.bind(h, "focus", k), l && this.bind(f, "click", b), m && this.bind(e, "click", c), this.bind(d.body, "keyup", j), this.transition.supported || this.setFocus() }, bind: function (a, b, c) { "function" == typeof a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent && a.attachEvent("on" + b, c) }, handleErrors: function () { if ("undefined" != typeof a.onerror) { var b = this; return a.onerror = function (a, c, d) { b.error("[" + a + " on line " + d + " of " + c + "]", 0) }, !0 } return !1 }, appendButtons: function (a, b) { return this.buttonReverse ? b + a : a + b }, build: function (a) { var b = "", c = a.type, d = a.message, e = a.cssClass || ""; switch (b += '
', b += 'Reset Focus', "none" === q.buttonFocus && (b += ''), "prompt" === c && (b += '
'), b += '
', b += r.message.replace("{{message}}", d), "prompt" === c && (b += r.input), b += r.buttons.holder, b += "
", "prompt" === c && (b += "
"), b += 'Reset Focus', b += "
", c) { case "confirm": b = b.replace("{{buttons}}", this.appendButtons(r.buttons.cancel, r.buttons.ok)), b = b.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel); break; case "prompt": b = b.replace("{{buttons}}", this.appendButtons(r.buttons.cancel, r.buttons.submit)), b = b.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel); break; case "alert": b = b.replace("{{buttons}}", r.buttons.ok), b = b.replace("{{ok}}", this.labels.ok) }return l.className = "alertify alertify-" + c + " " + e, k.className = "alertify-cover", b }, close: function (a, b) { var c, d, e = b && !isNaN(b) ? +b : this.delay, f = this; this.bind(a, "click", function () { c(a) }), d = function (a) { a.stopPropagation(), f.unbind(this, f.transition.type, d), m.removeChild(this), m.hasChildNodes() || (m.className += " alertify-logs-hidden") }, c = function (a) { "undefined" != typeof a && a.parentNode === m && (f.transition.supported ? (f.bind(a, f.transition.type, d), a.className += " alertify-log-hide") : (m.removeChild(a), m.hasChildNodes() || (m.className += " alertify-logs-hidden"))) }, 0 !== b && setTimeout(function () { c(a) }, e) }, dialog: function (a, b, c, e, f) { j = d.activeElement; var g = function () { m && null !== m.scrollTop && k && null !== k.scrollTop || g() }; if ("string" != typeof a) throw new Error("message must be a string"); if ("string" != typeof b) throw new Error("type must be a string"); if ("undefined" != typeof c && "function" != typeof c) throw new Error("fn must be a function"); return this.init(), g(), u.push({ type: b, message: a, callback: c, placeholder: e, cssClass: f }), s || this.setup(), this }, extend: function (a) { if ("string" != typeof a) throw new Error("extend method must have exactly one paramter"); return function (b, c) { return this.log(b, a, c), this } }, hide: function () { var a, b = this; u.splice(0, 1), u.length > 0 ? this.setup(!0) : (s = !1, a = function (c) { c.stopPropagation(), b.unbind(l, b.transition.type, a) }, this.transition.supported ? (this.bind(l, this.transition.type, a), l.className = "alertify alertify-hide alertify-hidden") : l.className = "alertify alertify-hide alertify-hidden alertify-isHidden", k.className = "alertify-cover alertify-cover-hidden") }, init: function () { d.createElement("nav"), d.createElement("article"), d.createElement("section"), null == c("alertify-cover") && (k = d.createElement("div"), k.setAttribute("id", "alertify-cover"), k.className = "alertify-cover alertify-cover-hidden", d.body.appendChild(k)), null == c("alertify") && (s = !1, u = [], l = d.createElement("section"), l.setAttribute("id", "alertify"), l.className = "alertify alertify-hidden", d.body.appendChild(l)), null == c("alertify-logs") && (m = d.createElement("section"), m.setAttribute("id", "alertify-logs"), m.className = "alertify-logs alertify-logs-hidden", d.body.appendChild(m)), d.body.setAttribute("tabindex", "0"), this.transition = p() }, log: function (a, b, c) { var d = function () { m && null !== m.scrollTop || d() }; return this.init(), d(), m.className = "alertify-logs", this.notify(a, b, c), this }, notify: function (a, b, c) { var e = d.createElement("article"); e.className = "alertify-log" + ("string" == typeof b && "" !== b ? " alertify-log-" + b : ""), e.innerHTML = a, m.appendChild(e), setTimeout(function () { e.className = e.className + " alertify-log-show" }, 50), this.close(e, c) }, set: function (a) { var b; if ("object" != typeof a && a instanceof Array) throw new Error("args must be an object"); for (b in a) a.hasOwnProperty(b) && (this[b] = a[b]) }, setFocus: function () { o ? (o.focus(), o.select()) : i.focus() }, setup: function (a) { var d, j = u[0], k = this; s = !0, d = function (a) { a.stopPropagation(), k.setFocus(), k.unbind(l, k.transition.type, d) }, this.transition.supported && !a && this.bind(l, this.transition.type, d), l.innerHTML = this.build(j), g = c("alertify-resetFocus"), h = c("alertify-resetFocusBack"), f = c("alertify-ok") || b, e = c("alertify-cancel") || b, i = "cancel" === q.buttonFocus ? e : "none" === q.buttonFocus ? c("alertify-noneFocus") : f, o = c("alertify-text") || b, n = c("alertify-form") || b, "string" == typeof j.placeholder && "" !== j.placeholder && (o.value = j.placeholder), a && this.setFocus(), this.addListeners(j.callback) }, unbind: function (a, b, c) { "function" == typeof a.removeEventListener ? a.removeEventListener(b, c, !1) : a.detachEvent && a.detachEvent("on" + b, c) } }, { alert: function (a, b, c) { return q.dialog(a, "alert", b, "", c), this }, confirm: function (a, b, c) { return q.dialog(a, "confirm", b, "", c), this }, extend: q.extend, init: q.init, log: function (a, b, c) { return q.log(a, b, c), this }, prompt: function (a, b, c, d) { return q.dialog(a, "prompt", b, c, d), this }, success: function (a, b) { return q.log(a, "success", b), this }, error: function (a, b) { return q.log(a, "error", b), this }, set: function (a) { q.set(a) }, labels: q.labels, debug: q.handleErrors } }, "function" == typeof define ? define([], function () { return new c }) : "undefined" == typeof a.alertify && (a.alertify = new c) }(this);