function HomePage() {
	if(document.all){document.body.style.behavior='url(#default#homepage)';document.body.setHomePage('http://forum.jinti.net');}
	else alert("对不起！您目前使用的浏览器无法进行此操作。");
}
function Favorite(url,title) {
	if(document.all)window.external.AddFavorite(url,title); 
	else if(window.sidebar)window.sidebar.addPanel(title,url,"");
	else alert("对不起！您目前使用的浏览器无法进行此操作。");
}
function Tip(content) {
	Tools.TipWin.open("", '<span style="color:#FF6600;font-weight:bold;">'+content+'</span>');
}
var AjaxError = "";
function GetWebService(request) {
	var ID = 0;
	var Msg = "对不起！服务器正在维护，请稍后再操作。";
	var isSucceed = "False";
	if (Tools.isIE) {
		var objXML = new ActiveXObject("Microsoft.XmlDom");
		objXML.loadXML(request);			
		var xml = objXML.documentElement;
		if (xml!=null) {
			ID=xml.selectSingleNode("/Result/ID").text;
			Msg=xml.selectSingleNode("/Result/Msg").text;
			isSucceed=xml.selectSingleNode("/Result/isSucceed").text;
		}
	}
	else {
		var objXML;
		try {
			objXML = (new DOMParser()).parseFromString(request,"text/xml");
			var xml = objXML.documentElement;
			for (var i=0;i<xml.childNodes.length;i++) {
				switch (xml.childNodes[i].nodeName) {
					case ("ID"):
						ID=xml.childNodes[i].firstChild.nodeValue;
						break;
					case ("Msg"):
						Msg=xml.childNodes[i].firstChild.nodeValue;
						break;
					case ("isSucceed"):
						isSucceed=xml.childNodes[i].firstChild.nodeValue;
						break;
					default:
						break;
				}
			}
		}
		catch (ex) { }
	}
	if (Msg=="对不起！服务器正在维护，请稍后再操作。") AjaxError = request;
	return {ID:ID,Msg:Msg,isSucceed:isSucceed};
}
function MaxImg(obj, width, height) {
	var max_width = width;
	if (obj.offsetWidth>max_width) {
		obj.resized=true;
		obj.height=obj.height*max_width/obj.width;
		obj.width=max_width;
	}
	if (height) {
		var max_height = height;
		if (obj.offsetHeight>max_height) {
			obj.resized=true;
			obj.width=obj.width*max_height/obj.height;
			obj.height=max_height;
		}
	}
}