/*All the initial variant and function define in this file
    1. varInit.js is put at the head
    2. var Object put at the bottom
    3. biilib put at the the end
*/
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
var is_ie = /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
var is_ff = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
var is_ie8 = false;
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ieversion>=8)
    is_ie8 = true;
 else if (ieversion>=7)
    is_ie7 = true;
 else if (ieversion>=6)
    is_ie6 = true;
 else if (ieversion>=5)
  alert("You're using IE5.x/n upgrade your browser for best")
}

var xmlHttp; //user for ajax
function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch (e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch (e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}

function $id(id){return document.getElementById(id)}

var pX,pY;  //use for detect mouse position
var scrollX,scrollY;    //use for object scroll detect
var bodyWidth, bodyHeight;  //use for getBodySize, return bodyWidth and bodyHeight
var _documentfocus;         //use for chat script, effect when window blur and call newMessComingAlerts to alert user
var _alertTimeOut;          //Time object for window focus or blur event
var _oldTitle = document.title; 
var _parentScrollTop = 0;
var _parentScrollLeft = 0;
