 $(function() {
         $('#container > ul').tabs();  
   });
   
function swappass(){
	var passtip = document.getElementById("passtips");
	var pass = document.getElementById("pass");
	if ($("#pass").css("display")=="none"){
		$("#passtips").hide();
		$("#pass").show();
		$("#pass").focus();
	} 
	else if ($("#pass").val()==""){
		$("#pass").hide();
		$("#passtips").show();
	
	}
}


function onqianz(){
   fajax("qianzh.html","fqz");
}

function searchqz(){
	var f_d="sq="+$("#sq").val();
	fajax2("qianzh.asp","fqzr",f_d);
}

function tomoney(){
    var f_d="language=zh&amount="+$("#famount").val()+"&from="+$("#ffrom").val()+"&to="+$("#fto").val();
	fajax2("huobi.asp","fresult",f_d);
}

function frommoney(){
   fajax("huobi.html","fz");

}

function fajax2(furl,fout,fdata){
   $("#"+fout).html('<img name="" src="images/floading.gif" alt="正在查询，请稍等...    by firste"/>正在查询，请稍等...');
	$.ajax({
				type:"post",
				url:furl,
				// timeout: 2000,
				data:fdata,
				cache:false, 
				success:function(html){
					$("#"+fout).html(html);
				},
				error:function(){
					$("#"+fout).html("服务器错误，请联系技术员！"); 
					return false;
				}					
			});
}

var timerID = null;

var timerRunning = false;

var _area = 0;



function stopclock(){

    if(timerRunning)

        clearTimeout(timerID);

    timerRunning = false;

}

function fajax(furl,fout){
    $("#"+fout).html('<img name="" src="images/floading.gif" alt="正在加载，请稍等...    by firste"/>正在加载，请稍等...');
	$.ajax({
  			url: furl,
  			cache: false,
  			success: function(html){
    			$("#"+fout).html(html);
  			},
 			error:function(){
				$("#"+fout).html("服务器错误，请联系技术员！"); 
				return false;
			}
       }); 
}

function startclock(){

    stopclock();

    showlocaltime();
	
	fajax("wordtime.htm","ftime");
}



function showlocaltime(){

    var now = new Date();

	var _day = new Array(7);

	_day[0]='日';

	_day[1]='一';

	_day[2]='二';

	_day[3]='三';

	_day[4]='四';

	_day[5]='五';

	_day[6]='六';



	var hours = now.getHours();

    var minutes = now.getMinutes();

    var seconds = now.getSeconds();

    var timezone= now.getTimezoneOffset()/60;

	if (timezone == 0)

		{ var timeValue = "格林尼治";}

	else 

		{ var timeValue = ((timezone < 0)? "  东"+(-1)*timezone : "  西"+timezone) +'区';}



    timeValue  += '时间：'

		+'2008'+' 年'

		+eval(now.getMonth()+1)+'月'

		+now.getDate()+'日 星期'

		+_day[now.getDay()]+' '+hours;



    timeValue  += ((minutes < 10) ? ":0" : ":") + minutes;

    timeValue  += ((seconds < 10) ? ":0" : ":") + seconds+" ";
   $("#nnt").val(timeValue);

	timerID = setTimeout("showlocaltime()",1000);

    timerRunning = true;

}   