function createXMLHttpRequest() {
	if (window.XMLHttpRequest) { //www.x5mp3.com
		XMLHttpReq = new XMLHttpRequest();
	} else if (window.ActiveXObject) { //IE 浏览器
		try {
			XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				XMLHttpReq = new ActiveXObject("Micrsost.XMLHTTP");
			} catch (e) {}
		}
	}
}
var cache = new Array();
function getHttpObject() {
	var objType = false;
	try {
		objType = new ActiveXObject('Msxml2.XMLHTTP');
	} catch (e) {
		try {
			objType = new ActiveXObject('Microsoft.XMLHTTP');
		} catch (e) {
			objType = new XMLHttpRequest();
		}
	}
	return objType;
}
function vip_code() {
	var code = $("#code").val();
	if (code == '') {
		$.tipMessage('请先输入激活码！', 1, 3000);
	} else {
		$.getJSON(site_domain+"plug/vip_code/ajax.php?code=" + code + "&random=" + Math.random() + "&callback=?", function (data) {
			if (data['error'] == '10001') { 
				$.tipMessage('激活码已过期！', 1, 3000);
			} else if (data['error'] == '10002') { 
				$.tipMessage('您没有权限使用该激活码！', 1, 3000);
			} else if (data['error'] == '10003') { 
				$.tipMessage('激活码已被使用！', 1, 3000);
			} else if (data['error'] == '10004') { 
				$.tipMessage('恭喜，激活成功！', 0, 3000, 0,function() {location.href = location.href;});
			} else if (data['error'] == '10005') { 
				user.userNotLogin('您未登录无法执行此操作！');
				return false;
			} else {
				$.tipMessage('您请求的页面出现异常错误！', 1, 3000);
			}
		});
	}
}
