var OtherLogins={};
var logType;
var OpenedWindow;
var l={};
var a;

OtherLogins[0] = {
	name: "ÐÂÀËÎ¢²©",
	width: 600,
	height: 450,
	logType: 1
};
OtherLogins[1] = {
	name: "qzone",
	width: 600,
	height: 450,
	logType: 2
};
OtherLogins[2] = {
	name: "ÈËÈËÍø",
	width: 450,
	height: 400,
	logType: 4
};
OtherLogins[3] = {
	name: "MSN",
	width: 450,
	height: 400,
	logType: 4
};
OtherLogins[4] = {
	name: "ÌÚÑ¶Î¢²©",
	width: 814,
	height: 835,
	logType: 5
};


LoginType= "/OtherLogin/";

function h(m) {
	var n = OtherLogins[m];
	this.name = n.name;
	this.bind = n.bind;
	this.setting = n.setting;
	this.width = n.width;
	this.height = n.height;
	this.type = m;
	this.logType = n.logType;
	this.callback = null
};

h.prototype.loginBlank = function(m) {
	this.callback = m;
	if (a) {
		a.close()
	}
	a = window.open(LoginType + "?type=" + this.type, this.name, "width=" + this.width + ",height=" + this.height + ",menubar=0,scrollbars=0,status=1,titlebar=0,toobar=0,location=1,resizable=yes")
}        


function getInstance (m) {
	if (!l[m]) {
		l[m] = new h(m);
	}
	return l[m];
}

$(document).ready(function(){
	$("#sinaLink").click(function(event) {
		getInstance(0).loginBlank();
		//z.preventDefault()
	});
	$("#qqLink").click(function(event) {
		//m();
		getInstance(1).loginBlank();
		//z.preventDefault()
	});
	
	$("#xnLink").click(function(event) {
		//m();
		getInstance(2).loginBlank();
		//z.preventDefault()
	});
	$("#msnLink").click(function(event) {
		//m();
		getInstance(3).loginBlank();
		//z.preventDefault()
	});
	$("#tweiboLink").click(function(z) {
		//m();
		getInstance(4).loginBlank();
		//z.preventDefault()
	});    		 	   
});

