function createRequest(){
  if(window.ActiveXObject)  {
    oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  }  else if(window.XMLHttpRequest)  {
    oXmlHttp = new XMLHttpRequest();
  }

	return oXmlHttp;
	//alert(typeof(oXmlHttp));
}

function setBody(url,id){
	var oXmlHttp = createRequest();
		//alert(typeof(oXmlHttp));
		oXmlHttp.open("get",url,true);
	oXmlHttp.onreadystatechange = function (){
		if(oXmlHttp.readyState==4){
			var divloadarea = document.getElementById(id);
			//alert(typeof(divloadarea));
			divloadarea.innerHTML=oXmlHttp.responseText;
		}else {
			var loadingMsg = "<br/><br/> <img src='http://cimg2.163.com/stock/2007/6/18/20070618161443b1392.gif' align='absmiddle' /> Êý¾Ý¶ÁÈ¡ÖÐ...";
			var divloadarea = document.getElementById(id);
			divloadarea.innerHTML=loadingMsg;
		}
	};
	oXmlHttp.send(null);
}

function initDefault(){
	setBody("/static/advisor.html",'allFundInfList');
	UserCookie.init();
}

function getContent(url){
	var oXmlHttp = createRequest();
	oXmlHttp.open("get",url,true);
	oXmlHttp.onreadystatechange = function (){
		if(oXmlHttp.readyState==4){
			if(oXmlHttp.status == 200){
				return oXmlHttp.responseText;
			}
		}
	};
	oXmlHttp.send(null);
	return null;
}