(function()
{
  var isIE = (document.all && window.clientInformation) ? parseInt(window.clientInformation.userAgent.substr(window.clientInformation.userAgent.indexOf('MSIE ') + 5, 3)) : 0;
  var uAgent = navigator.userAgent;
  var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
  var isMSIE5 = isMSIE && (uAgent.indexOf('MSIE 5') != -1);
  var isMSIE5_0 = isMSIE && (uAgent.indexOf('MSIE 5.0') != -1);
  var isMSIE7 = isMSIE && (uAgent.indexOf('MSIE 7') != -1);
  var isSafari = uAgent.indexOf('Safari') != -1;
  var isOpera = uAgent.indexOf('Opera') != -1;
  var isGecko = uAgent.indexOf('Gecko') != -1 && !isSafari && !isOpera;
  var isMac = uAgent.indexOf('Mac') != -1;
  var isNS7 = uAgent.indexOf('Netscape/7') != -1;
  var isNS71 = uAgent.indexOf('Netscape/7.1') != -1;
  var winLocationHref = window.location.href;
  var winLocationDomain = winLocationHref.replace(/^(https?\:\/\/[^\/\:]+)(\/|\:)?.*$/i, '$1');

  var $ = function (id) { return document.getElementById(id); };
  var $addHandler = function (o, e, h) { if (isIE) o.attachEvent('on' + e, h); else o.addEventListener(e, h, false); };
  var $removeHandler = function (o, e, h) { if (isIE) o.detachEvent('on' + e, h); else o.removeEventListener(e, h, false); };
  var $stopEvent = function (e) { if (e.stopPropagation) e.stopPropagation(); else e.cancelBubble = true; if (e.preventDefault) e.preventDefault(); else e.returnValue = false; };
  var $getInnerWidth = function () { return ((isIE) ? ((document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.clientWidth) : (($getScrollHeight() > window.innerHeight) ? window.innerWidth - BonaPage.getScrollBarWidth() : window.innerWidth)) };
  var $getInnerHeight = function () { return ((isIE) ? ((document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight) : (($getScrollWidth() > window.innerWidth) ? window.innerHeight - BonaPage.getScrollBarWidth() : window.innerHeight)) };
  var $getScrollLeft = function () { return ((typeof(window.pageXOffset) == 'number') ? window.pageXOffset : ((document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : ((document.body && document.body.scrollLeft) ? document.body.scrollLeft : 0))) };
  var $getScrollTop = function () { return ((typeof(window.pageYOffset) == 'number') ? window.pageYOffset : ((document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : ((document.body && document.body.scrollTop) ? document.body.scrollTop : 0))) };
  var $setScrollTop = function (n) { if (typeof(window.pageYOffset) == 'number') window.pageYOffset = n; else if (document.documentElement && document.documentElement.scrollTop) document.documentElement.scrollTop = n; else if (document.body && document.body.scrollTop) document.body.scrollTop = n };
  var $getScrollWidth = function () { return document.body.scrollWidth; }
  var $getScrollHeight = function () { return document.body.scrollHeight; }
  var $getFirstChildByTagName = function (o, t) { var c = o.firstChild; while (c && c.nodeName.toUpperCase() != t.toUpperCase()) c = c.nextSibling; return (c && c.nodeName.toUpperCase() == t.toUpperCase()) ? c : null; }
  var $getNextSiblingByTagName = function (o, t) { var c = o.nextSibling; while (c && c.nodeName.toUpperCase() != t.toUpperCase()) c = c.nextSibling; return (c && c.nodeName.toUpperCase() == t.toUpperCase()) ? c : null; }
  var $getElementXY = function (o) { var p; x = 0; y = 0; if (o.offsetParent) { p = o; while (p.offsetParent) { p = p.offsetParent; x += p.offsetLeft; y += p.offsetTop; } } x += o.offsetLeft; y += o.offsetTop; o.X = x; o.Y = y; return {X : x, Y : y}; }
  var $getElementStyle = function (obj, att) { return ((isIE) ? obj.currentStyle[att] : getComputedStyle(obj, null)[att]); };
  var $getElementStyleInt = function (obj, att) { return parseInt($getElementStyle(obj, att)); };
  var $setElementOpacity = function (obj, op) { if (isIE) { obj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + op + ')'; } else { obj.style.MozOpacity = op / 100; obj.style.KhtmlOpacity = op / 100; obj.style.opacity = op / 100; } };
  var $getHashFromArray = function (arr) { var i, obj = new Object(); for (i = 0; i < arr.length; i++) obj[arr[i]] = true; return obj; };
  var $getHashFromArrayObjects = function (arr, key) { var i, obj = new Object(); for (i = 0; i < arr.length; i++) obj[arr[i][key]] = arr[i]; return obj; };
  var $reloadCurrentPage = function() { window.location.replace(window.location.toString().replace(/#.*$/mg, "")); };
  var $getUniqueIdentifier = function() { return Math.random() * (new Date()).getTime() * 10000; };
  var $preventPressEnter = function (e) { if (!e && window.event) e = window.event; if (e) { var key = (isIE) ? e.keyCode : e.which; if (key == 13) { if (isIE) { e.cancelBubble = true; e.returnValue = false; } else { e.stopPropagation(); e.preventDefault(); } return false; }}}
  
  if(!window.PageUI)
  {
    PageUI = new Object();
  }
  
  PageUI.createEmLink = createEmLink;
  
  
  function createEmLink (st)
  {
    var str = '';
    
    if (st == 0)
    {
      str += '<a href="';
      str += 'm' + 'a' + 'i' + 'l' + 't' + 'o' + ':';
      str += 'd' + 'e' + 'n' + 'f' + 'o';
      str += '@';
      str += 'm' + 'a' + 'i' + 'l';
      str += '.' + 'r' + 'u';
      str += '">';
    }
    else if (st == 1)
    {
      str += '</a>';
    }
    
    document.write(str);
  }
  
  
}) ();