/**
 *
 * 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.
 *
 */

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 undefined;

var CFG_FESA_COMPRESS = 1024;

var $ = document;

function _(x)
{
  var ret = null;
    ret = $.getElementById(x);
    if(MIT.DOMM.enabled === true)
    {
      ret = MIT.DOMM.setRetElements(ret);
    }
  return ret;
}

function $n(x)
{
  return $.getElementsByTagName(x);
}

function $gn(x)
{
  return $.getElementsByName(x);
}

if(isIE)
{
  function $c(x)
  {
    ret = $.createElement('<' + x.toUpperCase() + '>');
    if(MIT.DOMM.enabled === true)
    {
      ret = MIT.DOMM.setRetElements(ret);
    }
    return ret;
  }
}
else
{
  function $c(x)
  {
    ret = $.createElement(x);
    if(MIT.DOMM.enabled === true)
    {
      ret = MIT.DOMM.setRetElements(ret);
    }
    return ret;
  }
}


var __CSSList = {
  'float':{'styleFloat':'%', 'cssFloat':'%', 'float':'%'},
  'opacity':{'-moz-opacity':'%', 'opacity':'%', 'filter':'alpha(opacity=%)'}
};

function fixCSS(o, k, s)
{
  if(typeof __CSSList[k] != 'undefined')
  {
    var bro   = 0;
    var nVal  = '';
    for (var 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 kArr  = [];
  var nText = '';
  if (typeof(o) == 'string' && o != '')
  {
    o = _(o);
    if(typeof(o) != 'object')
    {
      return false;
    }
  }
  var n = '';
  kArr = k.split('-');
  for (x in kArr)
  {
    nText = kArr[x];
    if(x > 0)
    {
      nText = nText.substr(0, 1).toUpperCase() + nText.substr(1, nText.length);
    }
    n += nText;
  }

  fixCSS(o, k, s);
  if(n)
  {
    fixCSS(o, n, s);
  }
}


function _void()
{
  return;
}

var XHTTP_CHARSET = '';
/*
var XHTTP_CHARSET = 'UTF-8';
var XHTTP_CHARSET = 'WINDOWS-1254';
var XHTTP_CHARSET = 'ISO-8859-9';
*/

var MIT = {};

(MIT.CORE = {
  version     : '2.0.7',
  debug       : false,
  SCRIPT_F    : '<MIT',
  SCRIPT_E    : 'MIT>',
  sChrs       : '_qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM',
  genUID:function(iLen)
  {
    var sRnd      = '';
    var randomPoz = 0;
    for (var i = 0; i < iLen; i++)
    {
      randomPoz = Math.floor(Math.random() * MIT.CORE.sChrs.length);
      sRnd += MIT.CORE.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 (var 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 (var val in xDataArr)
    {
      xVal = xDataArr[val].split('=');
      sonData.push(xVal[0] + '=' + MIT.CORE.FixDATA(xVal[1]));
    }
    return xUrl + '?' + sonData.join('&');
  },
  getElementInForm:function(formName, type, retType)
  {
    var retType     = typeof(retType)  == 'string' ? retType  : 'text';
    var type        = typeof(type)     == 'string' ? type     : '*';
    var allowedType = new Array();
    var formObj     = typeof(formName) == 'object' ? formName : document.getElementById(formName);
    if (type == '*')
    {
      allowedType['text']     = 1;
      allowedType['password'] = 1;
      allowedType['checkbox'] = 1;
      allowedType['radio']    = 1;
      allowedType['hidden']   = 1;
    }
    else
    {
      allowedType[type]       = 1;
    }

    x_inputs    = new Array();
    arrTextarea = formObj.getElementsByTagName("textarea");
    for(var 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(var 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 (var 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(var xPuts = 0; xPuts < arrInputs.length; xPuts++)
    {
      if(typeof arrInputs[xPuts] == 'object')
      {
        if(allowedType[arrInputs[xPuts].type.toString().toLowerCase()] == 1)
        {
          if(arrInputs[xPuts].style.display.toString().toLowerCase() != 'none' && arrInputs[xPuts].disabled == false)
          {
            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));
            }
          }
        }
      }
    }

    if(retType == 'text')
    {
      var ret = x_inputs.join("&");
    }
    else
    {
      var ret = x_inputs;
    }
    return ret;
  },
  excludeScript:function(strData)
  {
    var scrpt = '';
    var strDataArr = strData.split(this.SCRIPT_F);
    if(strDataArr.length > 1)
    {
      for(var 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     : '2.2.1',
  rootURL     : '',
  cursorWait  : true,
  MLZW        : false,
  load:function()
  {
    MIT.FESA._req = MIT.FESA.getXMLHttpObj();
  },
  setForm:function(xObj)
  {
    var 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()';
    }

    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
    {
      if(MIT.FESA.cursorWait)
      {
        $s($n('html')[0], 'cursor', 'wait');
      }
      var req = MIT.FESA.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
            {
              var reqStr = req.responseText == null ? '' : (reqStr = '' + req.responseText.toString()) ? reqStr : reqStr = String(req.responseText) ? reqStr : reqStr = req.responseText ? reqStr : '';
              try {
                var 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);
              var strData = strArr[0];
              var 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){}
              }
            }
            if(typeof(MIT.FESA.ticker) == 'function')
            {
              MIT.FESA.ticker();
            }
          }
          else
          {
            if(typeof urlObj.onError == 'function')
            {
              urlObj.onError(req.status, req.statusText);
            }
          }
      if (req.async)
      {
        req = null;
      }
          if(MIT.FESA.cursorWait)
          {
            $s($n('html')[0], 'cursor', '');
          }
        }
      }

      if(typeof(urlObj.form) != 'undefined')
      {
        if(urlObj.form != '')
        {
          urlObj.data = MIT.CORE.getElementInForm(urlObj.form);
        }
      }

      var delimChar = '?';

      if(urlObj.url.indexOf('?') > 0)
      {
        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(typeof urlObj.data == 'object')
      {
        tmp_url = [];
        for (var d in urlObj.data)
        {
          tmp_url.push(MIT.URL.encode(d) + '=' + MIT.URL.encode(urlObj.data[d]));
        }
        urlObj.data = tmp_url.join('&');
      }

      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(MIT.FESA.MLZW == true && typeof urlObj._c != 'number')
      {
        urlObj._c = CFG_FESA_COMPRESS;
      }

      var REQUEST_URL = MIT.FESA.rootURL + urlObj.url;

      if (urlObj.method == 'p')
      {
        req.open('POST', REQUEST_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' || MIT.FESA.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', REQUEST_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' || MIT.FESA.MLZW == true)
        {
          req.setRequestHeader('X-MIT-FESA-LZW', MIT.COMP.load(urlObj._c));
        }

        req.send('' + null);
      }
      else if(urlObj.method == 'g')
      {
        req.open('GET', REQUEST_URL, true);
        if(XHTTP_CHARSET != '')
        {
          req.setRequestHeader('Accept-Charset', XHTTP_CHARSET);
        }
        req.setRequestHeader('Accept', '*/*');
        if(typeof urlObj._c == 'number' || MIT.FESA.MLZW == true)
        {
          req.setRequestHeader('X-MIT-FESA-LZW', MIT.COMP.load(urlObj._c));
        }

        req.send(null);
      }
      else if(urlObj.method == 'o')
      {
        req.open('OPTIONS', REQUEST_URL, true);
        req.setRequestHeader('Accept', '*/*');
        req.send('' + null);
      }
    }
    return false;
  },
  getXMLHttpObj:function()
  {
    var xmlhttp = false;
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
    {
      try
      {
        xmlhttp = new XMLHttpRequest();
        MIT.FESA.getXMLHttpObj = function()
        {
          return new XMLHttpRequest();
        }
      }
      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);
          MIT.FESA.getXMLHttpObj = function()
          {
            return new ActiveXObject(b);
          }
          _xh_ieProgId=b;
          break;
        } catch(c) {}
      }
      if (!xmlhttp && window.createRequest)
      {
        try
        {
          xmlhttp = window.createRequest();
          MIT.FESA.getXMLHttpObj = function()
          {
            return new window.createRequest();
          }
        }
        catch(e)
        {
          xmlhttp = false;
        }
      }
    }
    /*@cc_on @*/
    /*@if (@_jscript_version>=5)
    try
    {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
      MIT.FESA.getXMLHttpObj = function()
      {
        return new ActiveXObject("Msxml2.XMLHTTP");
      }
    }
    catch(e)
    {
      try
      {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        MIT.FESA.getXMLHttpObj = function()
        {
          return new ActiveXObject("Microsoft.XMLHTTP");
        }
      }
      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 = _(divname).getElementsByTagName("img");
    for (var 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            = _(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     = _(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));
      /*
      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 : '2.0',
  yPos : 0,
  xPos : 0,
  load:function()
  {
    MIT.EVNT.add(window, "load", MIT.SMSG.init);
  },
  init:function()
  {
    var divsmsg_overlay = $c('div');
    divsmsg_overlay.id = 'smsg_overlay';

    var tblsmsg_window = $c('table');
    var 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);

    var _trsmsg_window = $c('tr');
    var _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 = '<table onclick="event.cancelBubble=true;" onkeypress="if(event.keyCode == 27){MIT.SMSG.hide()};" bgColor="#FFFFFF" cellpadding="3" cellspacing="0" style="border:4px solid #AFAFAF;">' +
    '<tr bgColor="#CFCFCF">' +
    '<td id="smsg_ajaxWindowTitle" align="left">Başlık</td>' +
    '<td align="right"><a onclick="MIT.SMSG.hide()" href="javascript:_void();">Kapat</a></td>' +
    '</tr>' +
    '<tr><td colspan="2" id="smsg_ajaxContent"></td></tr>' +
    '</table>';

    $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(_(tblsmsg_window.id), 'click', MIT.SMSG.hide);
  },
  prepareIE: function(height, overflow)
  {
    var bod = $n('body')[0];
    bod.style.height = height;
    bod.style.overflow = overflow;

    var htm = $n('html')[0];
    htm.style.height = height;
    htm.style.overflow = overflow;
  },
  getScroll: function()
  {
    if (_('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(var i = 0; i < selects.length; i++)
    {
      selects[i].style.visibility = visibility;
    }
  },
  hide:function()
  {
    if (_('smsg_overlay').style.display != 'none')
    {
      if (isIE)
      {
        this.setScroll(0, this.yPos);
        this.prepareIE('', '');
        this.hideSelects('visible');
      }
      $s(_('smsg_overlay'), 'display', 'none');
      $s(_('smsg_window'), 'display', 'none');
    }
  },
  show:function(title, data)
  {
    if(typeof data == 'object')
    {
      _('smsg_ajaxContent').innerHTML = 'Yükleniyor...';
      _('smsg_ajaxWindowTitle').innerHTML = title;
      data.onLoad = MIT.SMSG.url_Loaded;
      MIT.FESA.doReq(data);
    }
    else
    {
      _('smsg_ajaxContent').innerHTML = data;
      _('smsg_ajaxWindowTitle').innerHTML = title;
    }

    if (isIE)
    {
      this.getScroll();
      this.setScroll(0, 0);
      this.prepareIE('100%', 'hidden');
      this.hideSelects('hidden');
    }
    $s(_('smsg_overlay'), 'display', '');
    $s(_('smsg_window'), 'display', '');
  },
  url_Loaded:function(x)
  {
    _('smsg_ajaxContent').innerHTML = x;
  },
  alert:function(data)
  {
    _('smsg_ajaxContent').innerHTML = '&nbsp;<br>' + data + '<br>&nbsp;<br><center><button type="button" onclick="MIT.SMSG.hide()">Tamam</button></center>';
    _('smsg_ajaxWindowTitle').innerHTML = 'Uyarı';

    if (isIE)
    {
      this.getScroll();
      this.setScroll(0, 0);
      this.prepareIE('100%', 'hidden');
      this.hideSelects('hidden');
    }
    $s(_('smsg_overlay'), 'display', '');
    $s(_('smsg_window'), 'display', '');
  }
});

(MIT.URL = {
  version:'0.1.7',
  encode:function (string)
  {
    if(typeof encodeURIComponent == 'function')
    {
      string = encodeURIComponent(string);
    }
    else if(typeof escape == 'function')
    {
      string = escape(string);
    }
   return string;
  },
  decode:function (string)
  {
    if(typeof decodeURIComponent == 'function')
    {
      string = decodeURIComponent(string);
    }
    else if(typeof unescape == 'function')
    {
      string = unescape(string);
    }
   return 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.DOMM = {
  PREFIX : '_',
  enabled : true,
  doceElements : [],
  load : function()
  {
    this.enabled = true;
  },
  setRetElements : function(ret)
  {
    for(var elementKey = 0; elementKey < this.doceElements.length; elementKey++)
    {
      element = this.doceElements[elementKey];
      /*
      eval('ret.' + this.PREFIX + element + ' = ' + this.PREFIX + element + ';');
      ret[this.PREFIX + element] = eval(PREFIX + element);
      */
      ret[this.PREFIX + element] = window[this.PREFIX + element];
    }
    ret.html      = this.dom_html;
    ret.css       = this.dom_css;
    ret.add       = this.dom_add;
    ret.stext     = this.dom_stext;
    ret.remove    = this.dom_remove;
    ret.removeAll = this.dom_removeAll;
    ret.hlight    = this.dom_hlight;
    ret.click     = this.dom_click;
    return ret;
  },
  dom_add : function(obj)
  {
    if (typeof(obj) == 'object')
    {
      this.appendChild(obj);
    }
    return this;
  },
  dom_aget : function(skey)
  {
    skey   = typeof(skey) == 'string' ? skey : '';
    if(skey)
    {
      this.getAttribute(skey);
    }
    return this;
  },
  dom_aset : function(skey, svalue)
  {
    skey   = typeof(skey) == 'string' ? skey : '';
    svalue = typeof(svalue) == 'string' ? svalue : '';
    if(skey && svalue)
    {
      this.setAttribute(skey, svalue);
    }
    return this;
  },
/*
  dom_text : function(text)
  {
    text = typeof(text) == 'string' ? text : '';
    this.innerText = text;
    return this;
  },
*/
  dom_html : function(html)
  {
    html = typeof(html) == 'string' ? html : '';
    this.innerHTML = html;
    return this;
  },
  dom_css : function(css)
  {
    css = typeof(css) == 'string' ? css : '';
    this.className = css;
    return this;
  },
  dom_toggle : function(time)
  {
    time = typeof(time) == 'number' ? time : '';
    $s(this, 'display', (this.style.display == 'none', '', 'none'));
    return this;
  },
  dom_remove : function()
  {
    for(var i = 0; i < arguments.length; i++)
    {
      arg = arguments[i];
      if(typeof(arg) == 'string' || typeof(arg) == 'object')
      {
        id = typeof(arg) == 'object' ? arg : _(arg);
        this.removeChild(arg);
      }
      else if(typeof(arg) == 'number')
      {
        this.removeChild(arg);
      }
    }
    return this;
  },
  dom_removeAll : function()
  {
    return this.html();
  },
  dom_click : function(func)
  {
    if(typeof(func) == 'function')
    {
      MIT.EVNT.add(this, 'click', func);
    }
    else if(typeof(func) == 'string')
    {
      MIT.EVNT.add(this, 'click', new Function(func));
    }
    return this;
  },
  dom_hlight : function(renk1, renk2)
  {
    $s(this, 'background-color', '#' + renk2);
    MIT.EVNT.add(this, 'mouseover', function(){$s(this, 'background-color', '#' + renk1)});
    MIT.EVNT.add(this, 'mouseout',  function(){$s(this, 'background-color', '#' + renk2)});
    return this;
  },
  mit_doce : function()
  {
    var parentElement = null;
    if(typeof(this) == 'object' && typeof(this.tagName) == 'string')
    {
      parentElement = this;
    }
    var ownName = '';
    if(ownName == '')
    {
      return false;
    }

    ret = $c(ownName);

    var tHtml  = null;
    for(var i = 0; i < arguments.length; i++)
    {
      arg = arguments[i];
      if(typeof(arg) == 'string' || typeof(arg) == 'number')
      {
       tHtml  = arg;
      }
      else if(typeof(arg) == 'object' && typeof(arg.tagName) == 'string')
      {
       ret.appendChild(arg);
      }
      else if(typeof(arg) == 'object' && typeof(arg.tagName) == 'undefined')
      {
        var tAttr = arg;
        for (attr in tAttr)
        {
          ret.setAttribute(attr, tAttr[attr]);
        }
      }
    }

    if(tHtml != null)
    {
      ret.innerHTML = tHtml;
    }

    if(parentElement != null && (typeof(parentElement.appendChild) == 'function' || typeof(parentElement.appendChild) == 'object'))
    {
      parentElement.appendChild(ret);
    }

    return ret;
  },
  newDomElements : function()
  {
    var tagNameArr  = [];
    var ret         = false;

    if(arguments.length >= 1)
    {
      for (var arg = 0; arg < arguments.length; arg++)
      {
        tagNameArr.push(arguments[arg]);
      }
    }

    if(tagNameArr.length > 0)
    {
      for (var tagKey = 0; tagKey < arguments.length; tagKey++)
      {
        tagName = tagNameArr[tagKey];
        var funcStr = this.mit_doce.toString().replace('mit_doce()', '()');
        funcStr = funcStr.replace('var ownName = "";', 'var ownName = "' + tagName + '";');
        funcStr = funcStr.replace('var ownName = \'\';', 'var ownName = \'' + tagName + '\';');
        var evScript = 'var ' + this.PREFIX + tagName + ' = ' + funcStr + '; document.' + this.PREFIX + tagName + ' = ' + this.PREFIX + tagName + '; window.' + this.PREFIX + tagName + ' = ' + this.PREFIX + tagName + '; String.prototype.' + this.PREFIX + tagName + ' = ' + this.PREFIX + tagName + ';';
        eval(evScript);
        eval('var ret = typeof(' + this.PREFIX + tagName + ') == "function"');
        if(ret)
        {
          this.doceElements.push(tagName);
        }
      }
    }
    return ret;
  }
});
MIT.DOMM.enabled = true;
MIT.DOMM.newDomElements('table', 'tbody', 'tr', 'th', 'td', 'b', 'u', 'i', 'span', 'div', 'input', 'button', 'a', 'br');

MIT.FESA.load();
var doReq = MIT.FESA.doReq;
var doForm = MIT.FESA.setForm;

String.prototype.encode = function(){return MIT.URL.encode(this)};
String.prototype.decode = function(){return MIT.URL.decode(this)};

if(typeof window.MIT == 'undefined' || !window.MIT)
{
  window.MIT = MIT;
}

if(typeof document.MIT == 'undefined' || !document.MIT)
{
  document.MIT = MIT;
}