/** * * MIT.CORE - JavaSCRIPT Run-Time * * Copyright (c) 2008 Mustafa OZGUR (mitcore.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * Special Thanks to Suat ERENLER (phpdc.net) for help LZW Compressor * * $Revision: 12829 $ * $LastChangedBy: mitcore $ * $LastChangedDate: 2009-01-17 03:37:24 +0200 (Sat, 17 Jan 2009) $ * */ var W3CDOM = (document.createElement && document.getElementsByTagName); var isIE = (navigator.appName.toLowerCase().indexOf("microsoft") != -1) ? 1 : 0; var isNS = (navigator.appName.toLowerCase().indexOf("netscape") != -1) ? 1 : 0; var CFG_FESA_COMPRESS = 1024; var $ = document; function $g(x) { var ret = null; try { ret = $.getElementById(x); } catch(e) { ret = null; } return ret; } function $n(x) { return $.getElementsByTagName(x); } function $gn(x) { return $.getElementsByName(x); } function $c(x) { x = isIE ? '<' + x + '>' : x; return $.createElement(x); } var __CSSList = { 'float':{'styleFloat':'%', 'cssFloat':'%', 'float':'%'}, 'opacity':{'-moz-opacity':'%', 'opacity':'%', 'filter':'alpha(opacity=%)'} }; function fixCSS(o, k, s) { if(typeof __CSSList[k] != 'undefined') { bro = 0; for (x in __CSSList[k]) { bro++; nVal = __CSSList[k][x].replace('%', s); if(bro == 3 && k == 'opacity') { nVal = __CSSList[k][x].replace('%', s * 100); } try { o.style[x] = nVal; eval('o.style["' + x + '"] = "' + nVal + '";'); }catch(e){} } } else { try { o.style[k] = s; eval('o.style["' + k + '"] = "' + s + '";'); }catch(e){} } } // function $h(d, v) { if(v == undefined) { if(_dsp(d) != 'none' && _dsp(d) != '') { return d.offsetHeight; } viz = d.style.visibility; d.style.visibility = 'hidden'; o = _dsp(d); _dsp(d, 'block'); r = parseInt(d.offsetHeight); _dsp(d, o); d.style.visibility = viz; return r; } else { d.style.height = v; } } function _dsp(d, v) { if(v == undefined) { return d.style.display; } else { d.style.display = v; } } // function $s(o, k, s) { var n = ''; kArr = k.split('-'); for (x in kArr) { if(x > 0) { nText = kArr[x]; nText = nText.substr(0, 1).toUpperCase() + nText.substr(1, nText.length); } else { nText = kArr[x]; } n += nText; } fixCSS(o, k, s); if(n) { fixCSS(o, n, s); } } var XHTTP_CHARSET = 'UTF-8'; //var XHTTP_CHARSET = 'WINDOWS-1254'; //var XHTTP_CHARSET = 'ISO-8859-9'; var MIT = {}; (MIT.CORE = { version:'1.8.0', debug:false, SCRIPT_F:'', genUID:function(iLen) { sChrs = '_qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'; sRnd = ''; for (i = 0; i < iLen; i++) { randomPoz = Math.floor(Math.random() * sChrs.length); sRnd += sChrs.substring(randomPoz, randomPoz + 1); } return sRnd; }, loadCSS:function(filename) { var fileref = $c("link"); fileref.setAttribute("rel", "stylesheet"); fileref.setAttribute("type", "text/css"); fileref.setAttribute("href", filename); $n("head")[0].appendChild(fileref); }, loadJS:function(filename) { var fileref = $c('script'); fileref.setAttribute("type", "text/javascript"); fileref.setAttribute("src", filename); $n("head")[0].appendChild(fileref); }, utf_escape:function(string) { if (encodeURIComponent) { string = encodeURIComponent(string); } else { string = escape(string); } return string; }, FixDATA:function(sData) { addSlash = { '%':0, '+':1, '\'':0, '"':0, '<':0, '>':0, '&':0 // 'ğ':0, // 'ü':0, // 'ı':0, // 'ş':0, // 'ç':0, // 'ö':0, // 'Ğ':0, // 'Ü':0, // 'İ':0, // 'Ş':0, // 'Ç':0, // 'Ö':0 }; for (xChr in addSlash) { xRegExp = new RegExp((addSlash[xChr] ? '\\' : '') + xChr, 'g'); sData = sData.replace(xRegExp, '%' + xChr.charCodeAt(0).toString(16).toUpperCase()); } return sData; }, FixURL:function(sData) { sonData = []; sDataArr = sData.split('?'); xUrl = sDataArr[0]; xData = sDataArr[1]; xDataArr = xData.split('&'); for (val in xDataArr) { xVal = xDataArr[val].split('='); sonData.push(xVal[0] + '=' + MIT.CORE.FixDATA(xVal[1])); } return xUrl + '?' + sonData.join('&'); }, getElementInForm:function(formName) { var allowedType = new Array(); var formObj = typeof(formName) == 'object' ? formName : document.getElementById(formName); if(formObj.tagName.toLowerCase() == 'form') { allowedType['text'] = 1; allowedType['password'] = 1; allowedType['checkbox'] = 1; allowedType['radio'] = 1; allowedType['hidden'] = 1; x_inputs = new Array(); arrTextarea = formObj.getElementsByTagName("textarea"); for(xPuts in arrTextarea) { if(typeof arrTextarea[xPuts].tagName == 'string') { if(arrTextarea[xPuts].tagName.toString().toLowerCase() == "textarea" && arrTextarea[xPuts].style.display.toString().toLowerCase() != 'none') { x_inputs.push(arrTextarea[xPuts].name + "=" + MIT.CORE.FixDATA(arrTextarea[xPuts].value)); } } } arrSelects = formObj.getElementsByTagName("select"); for(xPuts in arrSelects) { if(typeof arrSelects[xPuts].tagName == 'string') { if(arrSelects[xPuts].tagName.toString().toLowerCase() == "select" && arrSelects[xPuts].style.display.toString().toLowerCase() != 'none') { if(arrSelects[xPuts].getAttribute('multiple')) { for (i = 0; i < arrSelects[xPuts].length; i++) { sElement = arrSelects[xPuts].item(i); if(sElement.selected) { x_inputs.push(arrSelects[xPuts].name + "=" + MIT.CORE.FixDATA(sElement.value)); } } } else { x_inputs.push(arrSelects[xPuts].name + "=" + MIT.CORE.FixDATA(arrSelects[xPuts].value)); } } } } arrInputs = formObj.getElementsByTagName("input"); for(xPuts in arrInputs) { if(typeof arrInputs[xPuts].type == 'string') { if(allowedType[arrInputs[xPuts].type.toString().toLowerCase()] == 1) { if(arrInputs[xPuts].style.display.toString().toLowerCase() != 'none') { if (arrInputs[xPuts].type.toString().toLowerCase() == 'checkbox') { if(arrInputs[xPuts].checked == true) { x_inputs.push(arrInputs[xPuts].name + "=" + MIT.CORE.FixDATA(arrInputs[xPuts].value)); } } else if (arrInputs[xPuts].type.toString().toLowerCase() == 'radio') { if(arrInputs[xPuts].checked == true) { x_inputs.push(arrInputs[xPuts].name + "=" + MIT.CORE.FixDATA(arrInputs[xPuts].value)); } } else { x_inputs.push(arrInputs[xPuts].name + "=" + MIT.CORE.FixDATA(arrInputs[xPuts].value)); } } } } } return x_inputs.join("&"); } }, excludeScript:function(strData) { var scrpt = ''; strDataArr = strData.split(this.SCRIPT_F); if(strDataArr.length > 1) { for(sdata in strDataArr) { if(strDataArr[sdata].toString().search(this.SCRIPT_E) > -1) { scrptArr = strDataArr[sdata].toString().split(this.SCRIPT_E); scrpt += scrptArr[0] + ';'; strData = strData.replace(this.SCRIPT_F + scrptArr[0] + this.SCRIPT_E, ''); } } } return [strData, scrpt]; } }); (MIT.FESA = { version:'1.9', MLZW : false, load:function() { this.getXMLHttpObj(); }, setForm:function(xObj) { xForm = document.getElementById(xObj.form); var retVal = ''; if(typeof xObj.action == 'string') { xForm.setAttribute('action', xObj.action); } if(typeof xObj.onLoad == 'string') { xForm.x_onLoad = new Function('a', 'b', xObj.onLoad + '(a, b)'); } else { xForm.x_onLoad = 'void(0)'; } xForm.x_onError = new Function('a', 'b', 'this.innerHTML="Hata:"+a+"="+b;'); xForm.x_onStart = new Function('this.innerHTML="Yukleniyor...";'); if(typeof xObj.onSubmit == 'string') { retVal = xObj.onSubmit; } if(isIE == 1) { xForm.onsubmit = new Function((retVal != '' ? 'if(' + retVal + '()){' : '') + 'MIT.FESA.doReq({method:"' + xForm.method.toString().toLowerCase() + '",url:"' + xForm.action.toString().toLowerCase() + '",form:"' + xObj.form + '",onError:this.x_onError,onLoad:this.x_onLoad,onStart:this.x_onStart});' + (retVal != '' ? '}' : '') + 'return false;'); } else { xForm.setAttribute('onsubmit', (retVal != '' ? 'if(' + retVal + '()){' : '') + 'MIT.FESA.doReq({method:"' + xForm.method.toString().toLowerCase() + '",url:"' + xForm.action.toString().toLowerCase() + '",form:"' + xObj.form + '",onError:this.x_onError,onLoad:this.x_onLoad,onStart:this.x_onStart});' + (retVal != '' ? '}' : '') + 'return false;'); } }, doReq:function(urlObj) { if(typeof urlObj == 'string') { url = urlObj; urlObj = {}; urlObj.url = url; } if(typeof urlObj.method == 'undefined') { urlObj.method = ''; } if(typeof urlObj.onLoad != 'function' && urlObj.method == '') { urlObj.method = 'h'; } if(typeof urlObj.url == 'undefined') { if(typeof urlObj.onError == 'function') { urlObj.onError('-100', 'URL yok'); } } else { var req = this.getXMLHttpObj(); req.onreadystatechange = function() { if (req.readyState == 4) { if (req.status >= 200 && req.status < 300) { if(urlObj.method == 'h' && typeof urlObj.onLoad == 'function') { if(typeof(urlObj.onLoadParam) != 'undefined') { urlObj.onLoad(urlObj.onLoadParam, req.getResponseHeader('Content-Length'), req.getResponseHeader('Content-Type')); } else { urlObj.onLoad(req.getResponseHeader('Content-Length'), req.getResponseHeader('Content-Type')); } } else { reqStr = req.responseText == null ? '' : (reqStr = '' + req.responseText.toString()) ? reqStr : reqStr = String(req.responseText) ? reqStr : reqStr = req.responseText ? reqStr : ''; try { mlzw = req.getResponseHeader('X-MIT-FESA-LZW') || null; } catch (e) { mlzw = null } if(mlzw) { reqStr = MIT.COMP.decompress(reqStr, mlzw); } var strArr = MIT.CORE.excludeScript(reqStr); strData = strArr[0]; scrpt = strArr[1]; if(typeof urlObj.onLoad == 'function') { if(typeof urlObj.onLoadParam != 'undefined') { urlObj.onLoad(urlObj.onLoadParam, strData, req.status); } else { urlObj.onLoad(strData, req.status); } } if(typeof(scrpt) == 'string' && scrpt != '') { try { eval(scrpt); } catch(e){} } } } else { if(typeof urlObj.onError == 'function') { urlObj.onError(req.status, req.statusText); } } } } if(typeof urlObj.form != 'undefined') { if(urlObj.form != '') { urlObj.data = MIT.CORE.getElementInForm(urlObj.form); } } if(urlObj.url.indexOf('?') > 0) { delimChar = '&'; } else { delimChar = '?'; } if(typeof urlObj.onStart == 'function') { if(typeof urlObj.onLoadParam != 'undefined') { urlObj.onStart(urlObj.onLoadParam); } else { urlObj.onStart(); } } urlObj.method = urlObj.method.toLowerCase(); if(urlObj.method == '' || urlObj.method == 'get') { urlObj.method = 'g'; } if(urlObj.method == 'post') { urlObj.method = 'p'; } if(urlObj.method == 'head') { urlObj.method = 'h'; } if(urlObj.method != 'p' && urlObj.data) { urlObj.url = urlObj.url + delimChar + urlObj.data + '&__FESA=OK&' + MIT.CORE.genUID(7) + '=' + MIT.CORE.genUID(7); urlObj.data = ''; } else { urlObj.url = urlObj.url + delimChar + '__FESA=OK&' + MIT.CORE.genUID(7) + '=' + MIT.CORE.genUID(7); } if(this.MLZW == true && typeof urlObj._c != 'number') { urlObj._c = CFG_FESA_COMPRESS; } if (urlObj.method == 'p') { req.open('POST', urlObj.url, true); req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded' + (XHTTP_CHARSET != '' ? '; charset=' + XHTTP_CHARSET : '')); if(XHTTP_CHARSET != '') { req.setRequestHeader('Accept-Charset', XHTTP_CHARSET); } req.setRequestHeader('Accept', '*/*'); if(typeof urlObj._c == 'number' || this.MLZW == true) { req.setRequestHeader('X-MIT-FESA-LZW', MIT.COMP.load(urlObj._c)); } req.send(urlObj.data); } else if(urlObj.method == 'h') { req.open('HEAD', urlObj.url, true); req.setRequestHeader('Content-Type', 'text/plain' + (XHTTP_CHARSET != '' ? '; charset=' + XHTTP_CHARSET : '')); if(XHTTP_CHARSET != '') { req.setRequestHeader('Accept-Charset', XHTTP_CHARSET); } req.setRequestHeader('Accept', '*/*'); if(typeof urlObj._c == 'number' || this.MLZW == true) { req.setRequestHeader('X-MIT-FESA-LZW', MIT.COMP.load(urlObj._c)); } req.send(null); } else if(urlObj.method == 'g') { req.open('GET', urlObj.url, true); req.setRequestHeader('Content-Type', 'text/plain' + (XHTTP_CHARSET != '' ? '; charset=' + XHTTP_CHARSET : '')); if(XHTTP_CHARSET != '') { req.setRequestHeader('Accept-Charset', XHTTP_CHARSET); } req.setRequestHeader('Accept', '*/*'); if(typeof urlObj._c == 'number' || this.MLZW == true) { req.setRequestHeader('X-MIT-FESA-LZW', MIT.COMP.load(urlObj._c)); } req.send(null); } } return false; }, getXMLHttpObj:function() { var xmlhttp = false; if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); // this.getXMLHttpObj = function() { return new XMLHttpRequest(); } // For performance } catch (e) { xmlhttp = false; } } if(xmlhttp === false && typeof ActiveXObject != 'undefined') { var _XH_ACTIVE_X_IDENTS = [ 'MSXML2.XMLHTTP.6.0', "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP.2.0", "MSXML2.XMLHTTP.1.0", "MSXML2.XMLHTTP", "MICROSOFT.XMLHTTP.2.0", "MICROSOFT.XMLHTTP.1.0", "MICROSOFT.XMLHTTP.1", "MICROSOFT.XMLHTTP", 'MSXML2.DOMDocument.6.0', 'MSXML2.DOMDocument.5.0' ], _xh_ieProgId = undefined; for(var a=0;a<_XH_ACTIVE_X_IDENTS.length;a++) { var b=_XH_ACTIVE_X_IDENTS[a]; try { xmlhttp = new ActiveXObject(b); // this.getXMLHttpObj = function() { return new ActiveXObject(b); } // For performance _xh_ieProgId=b; break; } catch(c) {} } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); // this.getXMLHttpObj = function() { return new window.createRequest(); } // For performance } catch(e) { xmlhttp = false; } } } /*@cc_on @*/ /*@if (@_jscript_version>=5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); // this.getXMLHttpObj = function() { return new ActiveXObject("Msxml2.XMLHTTP"); } // For performance } catch(e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // this.getXMLHttpObj = function() { return new ActiveXObject("Microsoft.XMLHTTP"); } // For performance } catch(E) { xmlhttp = false; } } @end @*/ return xmlhttp; } }); (MIT.EFCT = { version:'1.2', init:function(divname, imgPath, imgS1, imgS2, imgDelim, imgStep) { this.imgPath = imgPath ? imgPath : ''; this.imgS1 = imgS1 ? imgS1 : 0; this.imgS2 = imgS2 ? imgS2 : 0; this.imgDelim = imgDelim ? imgDelim : '-'; this.imgStep = imgStep ? imgStep : '-'; objs = $g(divname).getElementsByTagName("img"); for (obj in objs) { if(typeof objs[obj].tagName != 'undefined') { if(objs[obj].tagName.toString().toLowerCase() == "img") { MIT.EFCT.doMac(objs[obj].getAttribute('id')); } } } }, doMac:function(imgID) { var i = $g(imgID); imgTitle = i.getAttribute('alt'); imgUrl = i.getAttribute('efct'); i.src = this.imgPath + imgUrl + this.imgDelim + this.imgS1 + '.png'; i.alt = imgTitle; i.border = '0'; i.height = this.imgS1; i.width = this.imgS1; i.style.position = 'relative'; i.style['bottom']= '0px'; i.style['left'] = '0px'; i.onmouseover = function(){return MIT.EFCT.setTimedScale(imgID, 20, MIT.EFCT.imgS2, MIT.EFCT.imgS1, 1, 1);} i.onmouseout = function(){return MIT.EFCT.setTimedScale(imgID, 20, MIT.EFCT.imgS1, MIT.EFCT.imgS2, 0, 1);} $c('img').src = this.imgPath + imgUrl + this.imgDelim + MIT.EFCT.imgS2 + '.png'; }, setTimedScale:function(iID, timeInt, from, to, ittr, ne) { var i = $g(iID); if(i == null) return false; imgTitle = i.getAttribute('alt'); imgUrl = i.getAttribute('efct'); g = 1; if(ittr == 1) { to += this.imgStep; if(to > from) { to = from; i.src = this.imgPath + imgUrl + this.imgDelim + to + '.png'; g = 0; } } else if(ittr == 0) { to -= this.imgStep; if(to < from) { to = from; i.src = this.imgPath + imgUrl + this.imgDelim + to + '.png'; g = 0; } } i.style['bottom']= (Math.floor(Math.abs(MIT.EFCT.imgS2 - MIT.EFCT.imgS1) / 2) - Math.floor(Math.abs(to - MIT.EFCT.imgS2) / 2)) + 'px'; i.width = to; i.height = to; if(g) { window.setTimeout('MIT.EFCT.setTimedScale("' + iID + '", ' + timeInt + ', ' + from + ', ' + to + ', ' + ittr + ', 0)', timeInt); } } }); /* U+015e - Ş U+015f - ş U+00dc - Ü U+00fc - ü U+0131 - ı U+0130 - İ U+011e - Ğ U+011f - ğ U+00c7 - Ç U+00e7 - ç */ (MIT.VARS = { version:'0.7', control:{8:1,9:1,13:1,37:1,38:1,39:1,40:1,46:1}, numeric:'[0-9,.-]|\x60|\x61|\x62|\x63|\x64|\x65|\x66|\x67|\x68|\x69', literal:'[A-Za-zÝÛIÞ¿Ü;]', allowedChars:function(e, chars) { ret = true; var regxp = new RegExp(chars,'g'); if(typeof(MIT.VARS.control[e.keyCode]) == 'undefined') { ret = regxp.test(String.fromCharCode(e.keyCode)); //alert(ret); if(!ret) { //alert(e.keyCode + ' : ' + String.fromCharCode(e.keyCode)); } } return ret; }, auto_currency:function(id) { var variable = document.getElementById(id); num = variable.value; num = num.toString().replace(/\$|\,/g, ''); if (isNaN(num)) { num = "0"; } sign = (num == (num = Math.abs(num))); num = Math.floor(num * 100 + 0.50000000001); cents = num % 100; num = Math.floor(num / 100).toString(); if (cents < 10) { cents = "0" + cents; } for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++) { num = num.substring(0, num.length - (4 * i + 3)) + ',' + num.substring(num.length - (4 * i + 3)); } variable.value = (((sign) ? '' : '-') + num); } }); (MIT.EVNT = { version:'0.2', add : function(o, t, f, l) { var d = 'addEventListener', n = 'on' + t, rO = o, rT = t, rF = f, rL = l; if (o[d] && !l) return o[d](t, f, false); if (!o._evts) o._evts = {}; if (!o._evts[t]) { o._evts[t] = o[n] ? { b: o[n] } : {}; o[n] = new Function('e', 'var r = true, o = this, a = o._evts["' + t + '"], i; for (i in a) {' + 'o._f = a[i]; r = o._f(e||window.event) != false && r; o._f = null;' + '} return r'); if (t != 'unload') this.add(window, 'unload', function() { try { this.remove(rO, rT, rF, rL); } catch (e) {} }); } if (!f._i) f._i = this.add._i++; o._evts[t][f._i] = f; }, remove : function(o, t, f, l) { var d = 'removeEventListener'; if (o[d] && !l) return o[d](t, f, false); if (o._evts && o._evts[t] && f._i) delete o._evts[t][f._i]; } }); MIT.EVNT.add._i = 1; (MIT.SMSG = { version : '1.1', yPos : 0, xPos : 0, load:function() { MIT.EVNT.add(window, "load", MIT.SMSG.init); }, init:function() { divsmsg_overlay = $c('div'); divsmsg_overlay.id = 'smsg_overlay'; tblsmsg_window = $c('table'); tbodysmsg_window = $c('tbody'); tblsmsg_window.width = '100%'; tblsmsg_window.id = 'smsg_window'; tblsmsg_window.name = 'smsg_window'; tblsmsg_window.height = '100%'; tblsmsg_window.border = '0'; tblsmsg_window.cellpadding = '0'; tblsmsg_window.cellspacing = '0'; $s(tblsmsg_window, 'width', '100%'); $s(tblsmsg_window, 'height', '100%'); $s(tblsmsg_window, 'position', isIE ? 'absolute' : 'fixed'); $s(tblsmsg_window, 'left', '0px'); $s(tblsmsg_window, 'top', '0px'); $s(tblsmsg_window, 'z-index', '101'); $s(tblsmsg_window, 'display', 'none'); tblsmsg_window.appendChild(tbodysmsg_window); _trsmsg_window = $c('tr'); _tdsmsg_window = $c('td'); tbodysmsg_window.appendChild(_trsmsg_window); _trsmsg_window.appendChild(_tdsmsg_window); _tdsmsg_window.valign = 'middle'; _tdsmsg_window.align = 'center'; _tdsmsg_window.innerHTML = '' + '' + '' + '' + '' + '' + '
BaşlıkKapat
'; $s(divsmsg_overlay, 'display', 'none'); $s(divsmsg_overlay, 'margin', 'auto'); $s(divsmsg_overlay, 'position', isIE ? 'absolute' : 'fixed'); $s(divsmsg_overlay, 'height', '100%'); $s(divsmsg_overlay, 'width', isIE ? screen.availWidth : '100%'); $s(divsmsg_overlay, 'left', '0px'); $s(divsmsg_overlay, 'top', '0px'); $s(divsmsg_overlay, 'z-index', '100'); $s(divsmsg_overlay, 'background-color', '#000000'); $s(divsmsg_overlay, 'opacity', '0.5'); $n('body')[0].appendChild(divsmsg_overlay); $n('body')[0].appendChild(tblsmsg_window); MIT.EVNT.add($g(tblsmsg_window.id), 'click', MIT.SMSG.hide); }, prepareIE: function(height, overflow) { bod = $n('body')[0]; bod.style.height = height; bod.style.overflow = overflow; htm = $n('html')[0]; htm.style.height = height; htm.style.overflow = overflow; }, getScroll: function() { if ($g('smsg_overlay').style.display == 'none') { if (typeof document.body != 'undefined') { this.yPos = document.body.scrollTop; } else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.scrollTop != 'undefined') { this.yPos = document.documentElement.scrollTop; } else if (typeof self.pageYOffset != 'undefined') { this.yPos = self.pageYOffset; } } }, setScroll: function(x, y) { window.scrollTo(x, y); }, hideSelects: function(visibility) { selects = document.getElementsByTagName('select'); for(i = 0; i < selects.length; i++) { selects[i].style.visibility = visibility; } }, hide:function() { if ($g('smsg_overlay').style.display != 'none') { if (isIE) { this.setScroll(0, this.yPos); this.prepareIE('', ''); this.hideSelects('visible'); } $s($g('smsg_overlay'), 'display', 'none'); $s($g('smsg_window'), 'display', 'none'); } }, show:function(title, data, width) { //this.hide(); $g('smsg_ajaxContent').innerHTML = data; $g('smsg_ajaxWindowTitle').innerHTML = title; if (isIE) { this.getScroll(); this.setScroll(0, 0); this.prepareIE('100%', 'hidden'); this.hideSelects('hidden'); } $s($g('smsg_overlay'), 'display', ''); $s($g('smsg_window'), 'display', ''); }, alert:function(data, width) { //this.hide(); $g('smsg_ajaxContent').innerHTML = ' 
' + data + '
 
'; $g('smsg_ajaxWindowTitle').innerHTML = 'Uyarı'; if (isIE) { this.getScroll(); this.setScroll(0, 0); this.prepareIE('100%', 'hidden'); this.hideSelects('hidden'); } $s($g('smsg_overlay'), 'display', ''); $s($g('smsg_window'), 'display', ''); } }); (MIT.URL = { version:'0.1.5', encode:function (string) { return string; //return escape(this._utf8_encode(string)); }, decode:function (string) { return string; //return this._utf8_decode(unescape(string)); }, _utf8_encode:function (string) { string = string.replace("/\r\n/g","\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, _utf8_decode:function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } }); (MIT.COMP = { version:'0.8.6', load:function(charCode) { if(!this.newCharsCompress || !this.newCharsDeCompress || this.newCharsCompress.length != this.charCode || this.newCharsDeCompress.length != this.charCode) { this.newCharsCompress = []; this.newCharsDeCompress = []; this.charCode = charCode ? charCode : CFG_FESA_COMPRESS; for (var i = 0; i < this.charCode; i++) { var unichar = String.fromCharCode(i); this.newCharsCompress[unichar] = i; this.newCharsDeCompress[i] = unichar; } } return this.charCode; }, compress : function(str, charCode) { this.load(charCode); var dico = this.newCharsCompress; var res = ""; var txt2encode = str; var splitStr = txt2encode.split(""); var len = splitStr.length; var nbChar = this.charCode; var buffer = ""; for (var i = 0; i <= len; i++) { var current = splitStr[i]; if (dico[buffer + current] !== undefined) { buffer += current; } else { res += String.fromCharCode(dico[buffer]); dico[buffer + current] = nbChar; nbChar++; buffer = current; } } return res; }, decompress : function(str, charCode) { this.load(charCode); var dico = this.newCharsDeCompress; var txt2encode = str; var splitStr = txt2encode.split(''); var length = splitStr.length; var nbChar = this.charCode; var buffer = ''; var chaine = ''; var result = ''; for (var i = 0; i < length; i++) { var code = txt2encode.charCodeAt(i); var current = dico[code]; if (buffer == '') { buffer = current; result += current; } else { if (code <= this.charCode - 1) { result += current; chaine = buffer + current; dico[nbChar] = chaine; nbChar++; buffer = current; } else { chaine = dico[code]; if (chaine == undefined) { chaine = buffer + buffer.slice(0, 1); } result += chaine; dico[nbChar] = buffer + chaine.slice(0, 1); nbChar++; buffer = chaine; } } } return result; } }); MIT.FESA.load(); MIT.SMSG.load(); MIT.COMP.load(); if(typeof window.MIT == 'undefined' || !window.MIT) { window.MIT = MIT; } if(typeof document.MIT == 'undefined' || !document.MIT) { document.MIT = MIT; }