﻿﻿document.domain="xunlei.com";
var picRoot='flag/';
var actionUrl='http://olympic.xunlei.com:8080/olympic/OlympicSeedServlet';
var VOTE_URL='http://olympic.xunlei.com:8080/olympic/OlympicBlueVoteServlet?seed_id=';
//var VOTE_URL='http://192.168.8.26:8080/olympic/OlympicBlueVoteServlet?seed_id=';
var detailActionUrl='http://olympic.xunlei.com:8080/olympic/OlympicDetailServlet?seed_id=';
var getSeedUrl='http://olympic.xunlei.com:8080/olympic_blue/jsp/myopus.jsp';
var detailViewPage='http://activity.xunlei.com/olympic2008/detail.html';


var resultCoinInterval = 0;
var resultCoinTimer = 0;

isFun 	 = function(a){ return typeof a == "function"; };
isNull 	 = function(a){ return typeof a == "object" && !a; };
isNumber = function(a){ return typeof a == "number" && isFinite(a);};
isObject = function(a){ return (a && typeof a == "object") || isFun(a);};
isString = function(a){ return typeof a == "string";};
isArray  = function(a){ return isObject(a) && a.constructor == Array; };
isUndef  = function(a){ return typeof a == "undefined";};

function $(id)
{
	return document.getElementById(id);
}

function getCalender()
{
	if(($("startTime").value == null)||($("startTime").value == '')||($("startTime").value == '按发布宣言的日期搜索'))
	{
		var date = formatDate(new Date());
		$("startTime").value = date;
	}
    OpenDate($("startTime"));
}

function formatDate(myDate){
	yy= myDate.getFullYear();
	mm= (myDate.getMonth()+1) < 10?('0'+(myDate.getMonth()+1)): (myDate.getMonth()+1);
	dd= (myDate.getDate()<10)?('0'+myDate.getDate()):myDate.getDate();
	return yy+"-"+mm+"-"+dd; 
}

function $A(iterable)
{
	if (!iterable)
		return [];
	if (iterable.toArray)
    	return iterable.toArray();
	if (isString(iterable) || isUndef(iterable.length))
		return [iterable];
		
	var results = [];
	for (var i=0; i<iterable.length; i++)
		results.push(iterable[i]);
	return results;
}

function IsValid( oField ) 
{ 
	var re= /select|update|delete|exec|count|'|"|=|;|>|<|%/i; 
	var sMsg = "请您不要在参数中输入特殊字符和SQL关键字！" 
	if ( re.test(oField.value) ) 
	{ 
		alert( sMsg ); 
		oField.value = ''; 
		oField.focus(); 
		return false; 
	} 
}

function onUrlJump(sJumpToUrl, bOpenInNewWindow)
{
	var sComment = "?";
	if(sJumpToUrl.indexOf("?") != -1)
	{
		sComment = "&";
	}
	if(sJumpToUrl == "#")
	{
		sJumpToUrl = "";
	}
	sJumpToUrl = sJumpToUrl + sComment + "timer=" + new Date().getTime();

	if(bOpenInNewWindow)
	{
		window.open(sJumpToUrl);
	}
	else
	{
		window.location.href=sJumpToUrl;
	}
}

function getCookie(name)
{
	var search;
	search = name + "=";
	offset = document.cookie.indexOf(search);
	if (offset != -1) {
		offset += search.length;
		end = document.cookie.indexOf(";", offset);
		if (end == -1)
			end = document.cookie.length;
		return unescape(document.cookie.substring(offset, end));
	}
	else
		return "";
}
function setCookie(name,value,hours){
	if(arguments.length>2){
		var expireDate=new Date(new Date().getTime()+hours*3600000);
		document.cookie = name + "=" + escape(value) + "; path=/; domain=xunlei.com; expires=" + expireDate.toGMTString() ;
	}else
		document.cookie = name + "=" + escape(value) + "; path=/; domain=xunlei.com"; 
}


function onSeedSevletLoad()
{
	var oPopDiv = $('prompt_div');
	oPopDiv.style.position = "absolute";
	oPopDiv.style.left = (document.documentElement.clientWidth/2 + document.documentElement.scrollLeft -207) +"px";
	oPopDiv.style.top = (document.documentElement.clientHeight/2 + document.documentElement.scrollTop-142) +"px";
}

function checklogin(){
	var sUserName = getCookie('usrname');
	if((sUserName == null) || (sUserName == ''))
	{ 
			onGetLogin();
	}
}

function showview()
{
	var sUserName = getCookie('usrname');
	if((sUserName == null) || (sUserName == ''))
	{ 
			genPrompDiv("block");
			changeSelTab('none');
	}
}

function genPrompDiv(visiable)
{
	if($('prompt_div') == null)
	{
		var oPopDiv = document.createElement("DIV");
		//oPopDiv.id = "prompt_div";
		oPopDiv.innerHTML ='<div id="prompt_div"><h5>温馨提示：</h5><p class="p_ts">您还没登录，您可以选择</p><p><span>·</span>马上<a href="javascript:onGetLogin();void(0);" title="登录">登录</a>，赢取丰富的奖品</p><p><span>·</span>以游客身份<a href="javascript:genPrompDiv(\'none\');void(0);" title="继续参加活动">继续参加活动</a>，这样无法获取加油币</p><p class="p_close"><a href="javascript:genPrompDiv(\'none\');void(0);" title="关闭窗口">×关闭窗口</a></p></div>';
		document.body.appendChild(oPopDiv);
		oPopDiv.style.position = "absolute";
		oPopDiv.style.left = (document.documentElement.clientWidth/2 + document.documentElement.scrollLeft -207) +"px";
		oPopDiv.style.top = (document.documentElement.clientHeight/2 + document.documentElement.scrollTop-142) +"px";
		
		//Insertion.bottom(document.body,Login.backDiv);
		oPopDiv.style.zIndex  = 2001;
	}
	if($('prompt_back_div') == null)
	{
		var oPopBackDiv = document.createElement("DIV");
		oPopBackDiv.id = "prompt_back_div";
		oPopBackDiv.style.backgroundColor = "Black";
		oPopBackDiv.style.filter = "alpha(opacity=40)";
		oPopBackDiv.style.MozOpacity="0.4";
		oPopBackDiv.style.position = "absolute";
		oPopBackDiv.style.left = "0px";
		oPopBackDiv.style.top = "0px";

		document.body.appendChild(oPopBackDiv);
		oPopBackDiv.style.zIndex =2000;
		oPopBackDiv.style.width = Math.max(document.body.scrollWidth, document.documentElement.clientWidth) +"px";
		oPopBackDiv.style.height = Math.max(document.body.scrollHeight, document.documentElement.clientHeight)+"px";
	}
	/*if(visiable=='none')
	{
		$('mapswf').style.visibility='visible';
	}
	else
	{
		$('mapswf').style.visibility='hidden';
	}*/
		if(visiable=='none')
		  changeSelTab('block');
	$('prompt_div').style.display=visiable;
	$('prompt_back_div').style.display=visiable;
}

function changeSelTab(visiable)
{
	try{	
		if(document.getElementById("address"))
			document.getElementById("address").style.display=visiable;
		if(document.getElementById("opustype"))
			document.getElementById("opustype").style.display=visiable;
		if(document.getElementById("subjecttype"))
			document.getElementById("subjecttype").style.display=visiable;
	}catch(e)
	{
	}
}

function onCheckHeadStatus()
{
	var sUserName = getCookie('usrname');
	if((sUserName == null) || (sUserName == ''))
	{
    $('login_bar').style.display = "none";
		$('logStatus').innerHTML = '<a href="javascript:parent.onGetLogin();void(0);">登录</a>&nbsp;|&nbsp;<a href="http://i.xunlei.com/register/register.htm" target="_blank">注册</a></a>';
	}
	else
	{
        var OLY_COIN = getCookie("OLY_COIN");
		//$('login_bar').innerHTML = '<font color="black"><p>欢迎您,'+sUserName+'!</p><p>您的加油币共<span id="oly_coin"></span>个</p></font>';
        if(OLY_COIN == null || OLY_COIN == "")
        {
            $('login_bar').style.display = "inline";
            getOlympicCoin(sUserName);
			//每隔1秒取一次返回值
            resultCoinInterval = setInterval("getResultCoin()",1000);
            setCookie("OLY_COIN",document.getElementById("oly_coin").innerHTML);
        }
        else
        {
            $('login_bar').style.display = "inline";
            //alert("sUserName = " + sUserName + "    OLY_COIN = " + OLY_COIN);
            $("user_id").innerHTML = sUserName;
            $("oly_coin").innerHTML = OLY_COIN;
        }
        
        document.getElementById('logStatus').innerHTML = '<a href ="http://olympic.xunlei.com:8080/olympic_blue/jsp/myopus.jsp" target="_blank">我的作品</a>&nbsp;|&nbsp;<a href="javascript:onHeadLogout();void(0);">退出</a>';
	}
	try{
		parent.onGetPageLoad();
	}
	catch(e)
	{
	}
}
function getResultCoin()
{
	var resultCoin = document.getElementById("oly_coin").innerHTML;
	if(resultCoin != "" || resultCoinTimer > 3)
	{
		clearInterval(resultCoinInterval);
		setCookie("OLY_COIN",resultCoin);
	}
	else
	{
		resultCoinTimer++;
	}
}
function getOlympicCoin(sUserName)
{
    var im_o = document.createElement("script");
    im_o.charset="GBK";
    im_o.src = "http://olympic.xunlei.com:8080/olympic/OlympicUserScore?usrname=" + sUserName;
    document.body.appendChild(im_o);
}
function onHeadLogout()
{
	setCookie("sessionid","");	
	setCookie("usrname","");
    setCookie("OLY_COIN","");
	onCheckHeadStatus();
	refreshCmtPage();
}
function refreshCmtPage()
{ 
	var commentIframe = top.document.getElementById("commentIframe");
	if(commentIframe){
		 top.document.frames("commentIframe").location.reload();
	}
}
function onGetSeed()
{ 
	var sUserName = getCookie('usrname');
	if((sUserName == null) || (sUserName == ''))
	{
		genPrompDiv("block");
	}
	else
	{
		setToGetPage();
	}
}


function setToGetPage()
{
	top.location.href=getSeedUrl;
}

function onGetLogin()
{
	genPrompDiv('none');
	changeSelTab('none');
	Login.showInterface(refreshPage);
}

function refreshPage()
{
	top.location.href=top.location.href;
}

function onDetailPageLoad()
{
/*	try
	{
		oContentArgs=window.opener.getValue();
	}
	catch(e)
	{*/
		oContentArgs=new Array();
		var oArgNames=new Array();
		oArgNames.push("seed_id");
		oArgNames.push("user_name");
		oArgNames.push("ennounce");
		oArgNames.push("country_id");
		oArgNames.push("country_name");
		oArgNames.push("country_flag");
		oArgNames.push("vote_count");
		for(var i=0;i<oArgNames.length;i++)
		{
			var reg = new RegExp("(^|&)"+ oArgNames[i] +"=([^&]*)(&|$)");
 		  	var r = window.location.search.substr(1).match(reg);
	 	   	if (r!=null)
	 	   	{
	 	   		var sValue=r[2];
	 	   		sValue=unescape(sValue);
	 	   		oContentArgs[oArgNames[i]]=sValue;
	 	   	}
		}
	//}
	if(oContentArgs!=null)
	{
		var sID=(oContentArgs["seed_id"]==null?"":oContentArgs["seed_id"])
		var sUserID=(oContentArgs["user_name"]==null?"":oContentArgs["user_name"]);
		var sContent=(oContentArgs["ennounce"]==null?"":oContentArgs["ennounce"]);
		var sCountryID=(oContentArgs["country_id"]==null?"":oContentArgs["country_id"]);
		var sCountryName=(oContentArgs["country_name"]==null?"":oContentArgs["country_name"]);
		var sCountryFlag=(oContentArgs["country_flag"]==null?"":oContentArgs["country_flag"]);
		var iVoteCount=(oContentArgs["vote_count"]==null?"":oContentArgs["vote_count"]);
		
		if(document.all)//FF兼容
		{
			$("seed_id").innerText=sID;
		}
		else
		{
			$("seed_id").textContent=sID;
		}

		if((sUserID == null) || (sUserID == ""))
		{
			var im_o = document.createElement("script");
			im_o.charset="GBK";
			im_o.src = detailActionUrl + sID;
			document.body.appendChild(im_o);
		}
		else
		{
			if(document.all)//FF兼容
			{
				$("ennounce").innerText=sContent;
				$("user_name").innerText=sUserID;
				$("country_name").innerText=sCountryName;
				$('country_flag').src=picRoot+sCountryFlag;
				$("vote_count").innerText=iVoteCount + "人";
			}
			else
			{
				$("ennounce").textContent=sContent;
				$("user_name").textContent=sUserID;
				$("country_name").textContent=sCountryName;
				$('country_flag').src=picRoot+sCountryFlag;
				$("vote_count").textContent=iVoteCount + "人";
			}
		}
	}
}

function onCopyDetailUrl()
{
	//js=document.all.ret_url.createTextRange();
	//js.execCommand("Copy");
	//document.all.ret_url.select();
	var sGenUrl = "";
	if(document.all)
	{
		sGenUrl = detailViewPage + '?seed_id='+$("seed_id").innerText;
	}
	else
	{
		sGenUrl = detailViewPage + '?seed_id='+$("seed_id").textContent;
	}
	if(copyToClipboard(sGenUrl) != false){
		alert("复制成功，请粘贴到您的QQ/MSN上给您的好友");
	}
}

function copyToClipboard(txt)
{
	if(window.clipboardData)
	{
		window.clipboardData.clearData();
		window.clipboardData.setData("Text",txt);
	}
	else if(navigator.userAgent.indexOf("Opera") != -1)
	{
		window.location = txt;
	}
	else if(window.netscape)
	{
		try
		{
			netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
		}
		catch(e)
		{
			alert("您的Firefox安全限制限制您进行剪贴板操作，请打开’about:config’将signed.applets.codebase_principal_support’设置为true’之后重试");
			return false;
		}
		var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
		if(!clip)
		{
			return;
		}
		var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
		if(!trans)
		{
			return;
		}
		trans.addDataFlavor('text/unicode');
		var str = new Object();
		var len = new Object();
		var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
		var copytext = txt;
		str.data = copytext;
		trans.setTransferData("text/unicode", str, copytext.length*2);
		var clipid = Components.interfaces.nsIClipboard;
		if(!clip)
		{	
			return false;
		}
		clip.setData(trans, null, clipid.kGlobalClipboard);
	}
}


function onShowContent(sID,sUserID,sContent,sCountryID,sCountryName,sCountryFlag,iVoteCount)
{
	//var sContent=document.getElementById("content_"+sID).innerText;
	var oArgs = new Array();
	oArgs["seed_id"]=sID;
	oArgs["user_name"]=sUserID;
	oArgs["ennounce"]=sContent;
	oArgs["country_id"]=sCountryID;
	oArgs["country_name"]=sCountryName;
	oArgs["country_flag"]=sCountryFlag;
	oArgs["vote_count"]=iVoteCount;
	
	if((sID != null)&&(sID != ''))
	{
		var sArgs = "?seed_id="+sID;
		sArgs += "&user_name="+escape(sUserID);
		sArgs += "&ennounce="+escape(sContent);
		sArgs += "&country_id="+sCountryID;
		sArgs += "&country_name="+escape(sCountryName);
		sArgs += "&country_flag="+sCountryFlag;
		sArgs += "&vote_count="+iVoteCount;
		var sFeatures = "height=560, width=750, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no";
		window.open(detailViewPage+sArgs);
		//var win=window.open("../detail.html"+sArgs,"detail_window",sFeatures);
	}
}
function onIndexShowContent(sID,sUserID,sContent,sCountryID,sCountryName,sCountryFlag,iVoteCount)
{
	onShowContent(sID,sUserID,sContent,sCountryID,sCountryName,sCountryFlag,iVoteCount);
}


function vote(itemid)
{
    var im_o = document.createElement("script");
    im_o.charset="GBK";
	im_o.src = VOTE_URL + itemid;
    document.body.appendChild(im_o);
}

function onSwitchSearchBox(visiable)
{
	$('search_seed_id').style.visibility=visiable;
	$('search_countryname').style.visibility=visiable;
	$('startTime').style.visibility=visiable;
//	$('gougou_search').style.visibility=visiable;
}

function onShowCountryLayer()
{
	$('country').style.display='inline';
	onSwitchSearchBox('hidden');
}

function onHideCountryLayer()
{
	$('country').style.display='none';
	onSwitchSearchBox('visible');
}

function onSelectCountry(name,id,pic,percent,count)
{
	$('countryid').value=id;
	$('countryname').value=name;
	$('nationalFlag').src=picRoot+pic;
	if(document.all)
	{
		$('greenPercent').innerText=percent;
		$('seedCount').innerText=count;
	}
	else
	{
		$('greenPercent').textContent=percent;
		$('seedCount').textContent=count;
	}
	onHideCountryLayer();
}

function onSwitchContinent(id)
{
	var tab = $(id);
	var sTabName = tab.id.substring(0, tab.id.length - 5);
	for(var i = 1; i <= 5; i++)
	{
		$(sTabName + i + '_tab_line').className='';
		$(sTabName + i + '_tab_layer').style.display='none';
	}
	
	$(tab.id+'_line').className='selected';
	$(tab.id+'_layer').style.display='inline';
}

function onShowSearchCountryLayer()
{
	$('search_country').style.display='inline';
	/*try
	{
		$('mapswf').style.visibility='hidden';
	}
	catch (e){}*/
	onSwitchSearchBox('hidden');
}

function onHideSearchCountryLayer()
{
	$('search_country').style.display='none';
	/*try
	{
		$('mapswf').style.visibility='visible';
	}
	catch (e){}*/
	onSwitchSearchBox('visible');
}

function onSelectSearchCountry(name,id)
{
	$('search_countryid').value=id;
	$('search_countryname').value=name;
	onHideSearchCountryLayer();
}

function setUserName()
{
	var sUserName = getCookie('usrname');
	if((sUserName != null) && (sUserName != ''))
	{
		$('username').readOnly = true;
		$('username').value=sUserName;
		$('is_xl').value='1';
	}
}
function onGetPageLoad()
{
	var sUserName = getCookie('usrname');
	if((sUserName == null) || (sUserName == ''))
	{
		$('username').readOnly = false;
		$('is_xl').value='0';
		//Login.showInterface(setUserName);
	}
	else
	{
		setUserName();
	}
}

function onSubmitEnounce()
{
	if(($('username').value == null) || ($('username').value == ""))
	{
		alert('姓名不能为空!');
		$('username').focus();
		return false;
	}
	else if($('username').value.length>50)
	{
		alert('姓名不能超过50个字符!');
		$('username').focus();
		return false;
	}
	if(($('countryid').value == null) || ($('countryid').value == ""))
	{
		alert('出使国家不能为空!');
		return false;
	}
	if(($('enounce').value == null) || ($('enounce').value == ""))
	{
		alert('留言不能为空!');
		$('enounce').focus();
		return false;
	}
	else if($('enounce').value.length>100)
	{
		alert('留言不能超过100个字符!');
		$('enounce').focus();
		return false;
	}
	$('dataform').action=actionUrl;
	$('dataform').submit();
}

var  Login = {
	popDiv:null,
	loginRet:false,
	callBackFunc:function(){},
	showInterface: function(callBackFunc){
		if(Login.popDiv==null){
			Login.popDiv = document.createElement("DIV");
			Login.popDiv.id = "login_pop_id";
			Login.popDiv.innerHTML ='<div class="login_bg"><div class="login_c"><h6><span><a href="javascript:Login.exit();void(0);" class="a_ a_close"></a></span>迅雷用户登录</h6><div class="login"><form id="loginform" action="http://login.xunlei.com/bloglogin/"  target="login_submit_iframe" method="post" onsubmit="return Login.validateInput();"><fieldset><input type="hidden" name="login_from_blog" value="true"><ul><li><label for="u">请输入您的帐号：</label><input id="u" name="u" type="text" value="" class="input_lo"  maxlength="50" /></li><li><label>请输入您的密码：</label><input name="p" type="password" maxlength="50"  class="input_lo"/></li><li><label>输入验证码：</label><input name="verifycode" type="text" maxlength="10"  class="input_lo yz" /><img id="verify_code" /><a href="#" onclick="$(\'verify_code\').src=\'http://verify.xunlei.com/image?cachetime=\'+new Date().getTime();return false;">换张图片</a></li><li class="ct"><input type="submit" class="button_comm" value="登录" /><input type="reset" class="button_comm" value="重置" /></li><li class="ct"><a href="http://i.xunlei.com/register/password_1.htm" target="_blank">忘记密码啦？</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="http://i.xunlei.com/register/register.htm" target="_blank">快速注册</a></li></ul></fieldset></form><iframe name="login_submit_iframe" style="display:none" onload="Login.checkRet()"></iframe></div></div></div>';
			
		//Insertion.bottom(document.body, Login.popDiv);	
		document.body.appendChild(Login.popDiv);
		Login.popDiv.style.position = "absolute";
		
		Login.backDiv = document.createElement("DIV");
		Login.backDiv.style.backgroundColor = "Black";
		Login.backDiv.style.filter = "alpha(opacity=40)";
		Login.backDiv.style.MozOpacity="0.4";
		Login.backDiv.style.position = "absolute";
		Login.backDiv.style.left = "0px";
		Login.backDiv.style.top = "0px";

		document.body.appendChild(Login.backDiv);
		//Insertion.bottom(document.body,Login.backDiv);
		Login.backDiv.style.zIndex =1000;
		Login.popDiv.style.zIndex  = 1001;
		
		}
		else
		{
			Login.popDiv.style.display =Login.backDiv.style.display ="";
		}
		/*if($('mapswf'))
		{
			$('mapswf').style.visibility='hidden';
		}*/
		
		if(! isUndef(callBackFunc))
			Login.callBackFunc = callBackFunc;	
		if(window.attachEvent){
			window.attachEvent("onresize",this.setPos);
			window.attachEvent("onscroll",this.setPos);
		}else{
			window.addEventListener("onresize",this.setPos,false);
			window.addEventListener("onscroll",this.setPos,false);
		}
		//window.onscroll =window.onresize=this.setPos;
		this.setPos();
		$('verify_code').src='http://verify.xunlei.com/image?cachetime='+new Date().getTime();
		$("u").focus();	
	},
	validateInput: function(){
		if($("loginform").u.value.length == 0)
		{
			alert("请您输入用户名!")
			return false;		
		}
		if($("loginform").p.value.length == 0)
		{
			alert("请您输入密码!")
			return false;		
		}
		if($("loginform").verifycode.value.length == 0)
		{
			alert("请您输入验证码!")
			return false;		
		}	

		this.disablePopDiv(true);
		Login.loginRet = true;
		return true;
	},
	setPos:function(){
		Login.popDiv.style.left = (document.documentElement.clientWidth/2 + document.documentElement.scrollLeft -207) +"px";
		Login.popDiv.style.top = (document.documentElement.clientHeight/2 + document.documentElement.scrollTop-142 + 43) +"px";
		Login.backDiv.style.width = Math.max(document.body.scrollWidth, document.documentElement.clientWidth) +"px";
		Login.backDiv.style.height = Math.max(document.body.scrollHeight, document.documentElement.clientHeight)+"px";
	},
	
	exit: function(){
		$("loginform").reset();
		changeSelTab('block');
		Login.popDiv.style.display =Login.backDiv.style.display ="none";
		
		this.disablePopDiv(false);
		if(window.detachEvent){
			window.detachEvent("onresize",this.setPos);
			window.detachEvent("onscroll",this.setPos);
		}else{
			window.removeEventListener("onresize",this.setPos,false);
			window.removeEventListener("onscroll",this.setPos,false);
		}
		/*if($('mapswf'))
		{
			$('mapswf').style.visibility='visible';
		}*/
	},
	
	disablePopDiv: function(tag){
		/*$A(Login.popDiv.getElementsByTagName("INPUT")).each(function(eachInput){
			eachInput.style.disabled = tag;
		});*/
	},
	
	checkRet: function(){
		if(Login.loginRet){
			var  verifyRet = getCookie("blogresult");
			if(verifyRet=="0"){
				alert("登陆成功");
				//LoginBanner.set();
				changeSelTab('block');			
				Login.exit();
				Login.callBackFunc();
				return;			
			}
			if(verifyRet=="1")
				alert("验证码错误");
			else if(verifyRet=="2")
				alert("密码错误");
			else
				alert("登陆失败");
			this.disablePopDiv(false);
			$('verify_code').src='http://verify.xunlei.com/image?cachetime='+new Date().getTime();
		}
	}	
}
