﻿// JScript 文件
var IBestDomain = location.hostname;	//"192.168.0.21";
var webheader = getRootUrl();	//"http://192.168.0.21/";
var skinFolder = "App_Themes/Default";
var calendar = webheader + "App_Themes/";
var dotnetIdPrefix = "ctl00_ContentPlaceHolder1_";
var dotnetNamePrefix = "ctl00$ContentPlaceHolder1$";
var reporthost ="192.168.1.100";
var reportport ="211";
var IMServer = "http://192.168.0.21/WebIM/";
var rebackinfo=60000;

window.onload=function(){
    var objMsg = document.getElementById("ctl00$txtIBestMsg");
    if(objMsg != null && objMsg.value != "")
    {
        alert(objMsg.value);
        objMsg.value = "";
    }
}

/// <summary>
/// This function will return root path URL for current request,
/// including http protocal, domain, and port, end with fwd-slash
/// </summary>
function getRootUrl() {
    var protocol = location.protocol;
    var host = location.host;
    var url = protocol + "//" + host + "/";
    var wholeUrl = location.href;
    if(wholeUrl.toUpperCase().indexOf("/ZJSTEELWEB/") != -1)
    {
         url += "ZjSteelWeb/"
    }
    return url;
}