var wv_vars = typeof(wv_vars) == "undefined" ? new Array() : wv_vars;
wv_vars["ui_width"] = "430";
wv_vars["ui_height"] = "378";
wv_vars["ui_version"] = "UI0001";
wv_vars["ui_newwindow"] = "yes";
wv_vars["ui_accountid"] = "200106287386";
wv_vars["ui_host"] = "as00.estara.com";
wv_vars["ui_maxreferrer"] = 350;
wv_vars["ui_window"] = null;
wv_vars["ui_host_param"] = "";
wv_vars["ui_window"] = null;
function webCall() {
  if (wv_vars["ui_window"] == null || wv_vars["ui_window"].closed) {
    var _1 = arguments;
    _1[_1.length++] = "calltype=webcall";
    wv_vars["ui_window"] = wv_start(_1);
  }
}
function webCallBack() {
  var _2 = arguments;
  _2[_2.length++] = "calltype=webcallback";
  wv_vars["ui_window"] = wv_start(_2);
}
function webVoicePop() {
  var _3 = arguments;
  _3[_3.length++] = "calltype=webvoicepop";
  wv_start(_3);
}
function wv_start(a) {
  var _5 = "webVoiceWindow";// + (new Date()).getTime() + Math.round(Math.random() * 1000000);
  var _6 = (window.location).toString();
  var _7 = escape(_6);
  if (_7.length > wv_vars["ui_maxreferrer"]) {
    var _8 = _6.indexOf("?");
    _6 = _8 > 0?_6.substring(0, _8) + "---TRUNCATED":"UNAVAILABLE - URL IS TOO LONG";
    _7 = escape(_6);
    if (_7.length > wv_vars["ui_maxreferrer"]) {
      _6 = "UNAVAILABLE - URL IS TOO LONG";
    }
  }
  var _9 = typeof (document.title) != "undefined"?document.title:"UNKNOWN";
  if (escape(_9).toString().length > 255) {
    _9 = (document.title).toString().substring(0, 243) + "---TRUNCATED";
  }
  var _a = wv_vars["ui_newwindow"];
  var _b = wv_vars["ui_width"];
  var _c = wv_vars["ui_height"];
  var _d = wv_vars["ui_version"];
  var _e = wv_vars["ui_accountid"];
  var _f = "";
  var _10 = "";
  var _11 = "";
  var _12 = (typeof (document.location.protocol) != "undefined" && document.location.protocol == "file:")?"http":"";
  for (var i = 0; i < a.length; i++) {
    var _14 = a[i].toString();
    var _15 = _14.indexOf("=");
    if (_15 != -1) {
      var _16 = (_14.substring(0, _15)).toLowerCase();
      var _17 = _14.substring(_15 + 1, _14.length);
      switch (_16) {case "wndname":_5 = _17;break;case "referrer":_6 = _17;break;case "pagetitle":_9 = _17;break;case "newwindow":_a = _17;break;case "width":_b = _17;break;case "height":_c = _17;break;case "accountid":_e = _17;break;case "wv_ui":_d = _17;break;case "features":_f = _17;break;case "baseurl":_10 = _17;break;case "protocol":_12 = _17;break;case "ppwinname":if (_17 == "") {
        _17 = "PagePushWindow" + (new Date()).getTime() + Math.round(Math.random() * 1000000);
        this.name = _17;
      }default:_11 += "&" + _16 + "=" + escape(_17);break;}
    } else {
      alert("ERROR: Invalid argument passed to webXXX() function - Arg" + i + " is missing '=' sign : " + _14);
      return null;
    }
  }
  if (_12 != "") {
    _12 += ":";
  }
  if (_10 == "") {
    _10 = _12 + "//" + wv_vars["ui_host"] + "/UI/" + _d + "/" + _d + ".php";
  }
  if (_f == "") {
    _f = "width=" + _b + ",height=" + _c + ",menubar=no,toolbar=no,directories=no,scrollbars=no,status=no,left=0,top=0,resizable=no";
  }
  _11 = _10 + (_10.indexOf("?") == -1?"?":"&") + "donotcache=" + escape((new Date()).getTime()) + "&accountid=" + escape(_e) + "&referrer=" + escape(_6) + "&pagetitle=" + escape(_9) + wv_vars["ui_host_param"] + _11;
  if (_a != "yes") {
    window.location = _11;
  } else {
    try {
      var webVoicePopWindow = window.open(_11, _5, _f);
      webVoicePopWindow.focus();
      return webVoicePopWindow;
    } catch(err) {
    }
  }
  return null;
}
function webChatPop()
{
  var wv_argscopy = arguments;
  wv_argscopy[wv_argscopy.length++] = "calltype=webchatpop";
  wv_argscopy[wv_argscopy.length++] = "wndname=eStaraChat_200106287386";
  wv_vars["ui_width"] = 500;
  wv_vars["ui_height"] = 500;
  wv_start(wv_argscopy);
}
