function inboxAlert(title,show,url)
{
	$("#TB_ajaxContent").html('');
	$("#showAlert").html("<p style='padding:10px;color:#f00;font-size:18px;font-family:黑体;line-height:200%'>" + show + "</p>");
	tb_show(title,'#TB_inline?height=100&width=280&inlineId=showAlert',false);
	if(typeof url != 'undefined' && typeof url != 'null' && url == '0'){return false;}
	if(typeof url == 'undefined' || typeof url == 'null' || url == ''){setTimeout("alertreload(0)", 1501);}else{setTimeout("alertreload('"+url+"')", 1501);}
}

function alertreload(u) {
	if(u==0){window.location.reload();}else{window.location.href=u;}
}

function ImgError(obj, url)
{
	if(url != obj.src) {if(url==0) $('#avator').html(''); else obj.src = url;}
}
function setImage(img,width,height)
{
	if(img.width > width)
	{
		var iw = img.width;
		var ih = img.height;

		img.width=width;
		img.height = width * ih / iw;
	}

	if(height && img.height > height)
	{
		iw = img.width;
		ih = img.height;

		img.height=height;
		img.width = height * iw / ih;
	}
}


function AddFavorite(url, title)
{
	var userAgent = navigator.userAgent.toLowerCase();
	if (userAgent.indexOf('msie') != -1) userAgent = 'ie';
	if ('ie' == userAgent) {
		window.external.addFavorite(url, title);
		return false;
	}
	return true;
}