﻿// JScript 文件
var xmlHttp

function showBolgInfo()
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="GetUserInfo.aspx";
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
xmlHttp.onreadystatechange=stateChanged;
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{
var xmlDoc=xmlHttp.responseXML.documentElement;
document.getElementById("ToWriteBlogs").href="http://group.datihu.com/hutong/Useradmin/newarticle.aspx";
document.getElementById("MyBlog").href="http://group.datihu.com/hutong/myhutong_"+decodeURI(xmlDoc.getElementsByTagName("HuTongID")[0].childNodes[0].nodeValue)+".html";
document.getElementById("MyHuTong").href="http://group.datihu.com/hutong/mygroup_"+decodeURI(xmlDoc.getElementsByTagName("HuTongID")[0].childNodes[0].nodeValue)+"_1_0.html";

if(xmlDoc.getElementsByTagName("HuTongInfo")[0].childNodes[0].childNodes[0].nodeValue!="0")
{
document.getElementById("hutong1").href="http://group.datihu.com/group/group_"+decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[0].childNodes[0].childNodes[0].nodeValue)+".html";
}
else
{
document.getElementById("hutong1").href="#";
}
document.getElementById("hutong1").title=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[0].childNodes[2].childNodes[0].nodeValue);
document.getElementById("hutongimage1").src=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[0].childNodes[1].childNodes[0].nodeValue);

if(xmlDoc.getElementsByTagName("HuTongInfo")[1].childNodes[0].childNodes[0].nodeValue!="0")
{
document.getElementById("hutong2").href="http://group.datihu.com/group/group_"+decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[1].childNodes[0].childNodes[0].nodeValue)+".html";
}
else
{
document.getElementById("hutong2").href="#";
}
document.getElementById("hutong2").title=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[1].childNodes[2].childNodes[0].nodeValue);
document.getElementById("hutongimage2").src=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[1].childNodes[1].childNodes[0].nodeValue);

if(xmlDoc.getElementsByTagName("HuTongInfo")[2].childNodes[0].childNodes[0].nodeValue!="0")
{
document.getElementById("hutong3").href="http://group.datihu.com/group/group_"+decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[2].childNodes[0].childNodes[0].nodeValue)+".html";
}
else
{
document.getElementById("hutong3").href="#";
}
document.getElementById("hutong3").title=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[2].childNodes[2].childNodes[0].nodeValue);
document.getElementById("hutongimage3").src=decodeURI(xmlDoc.getElementsByTagName("HuTongInfo")[2].childNodes[1].childNodes[0].nodeValue);

}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}


