﻿
//===================================================
//===================数据更新的处理==================
//===================================================

function LeftLoadingPic(LoadingFont){
    
    var LeftLoadingPicCode = "<img src=\"../../../alxAll/image/Public/LeftLoading.gif\" width=\"16\" height=\"16\" border=\"0\">";

    var LeftLoadingPics = "<span style='vertical-align:middle;text-align:center;'>" +
                          "" + LoadingFont + LeftLoadingPicCode + 
                          "</span>";

    return LeftLoadingPics;
}

function MainLoadingPic(LoadingFont){

    var MainLoadingPicCode = "<span style='vertical-align:middle;text-align:center;margin-top:3px'>" +
                             "   <img src=\"../../../alxAll/image/Public/MainLoading.gif\" width=\"300px\" height=\"13\" border=\"0\">" + 
                             "</span>";
                             
    var MainLoadingTableCode = "" +
				"<table cellSpacing='0' cellPadding='0' border='0' class='G_Tab_Self_Loading' height='20px' align='center'>" +
				"   <tr>" +
				"		<td colspan='3' class='G_Tab_Top_Loading'></td>" +
				"	</tr>" +
				"	<tr>" +
				"		<td class='G_Tab_Left_Loading'></td>" +
				"		<td class='G_Tab_Center_Loading'>" +
				"		    <div class='G_div_Center_Loading'>" +
				"               <span>&nbsp;&nbsp;" + LoadingFont + MainLoadingPicCode + "</span>" +
				"           </div>" +
                "       </td>" +
				"		<td class='G_Tab_Right_Loading'></td>" +
				"	</tr>" +
				"	<tr>" +
				"		<td colspan='3' class='G_Tab_Bottom_Loading'></td>" +
				"	</tr>" +
			    "</table>";

    return MainLoadingTableCode;
}
//===================================================


//===================================================
//==========国内短线版面数据的加载与即时更新=========
//===================================================
function doLoadMainInfoData_Short(){
	
    if(document.getElementById("LabMainInfo_Short")){
        document.getElementById("LabMainInfo_Short").style.display = "block";
        document.getElementById("LabMainInfo_Short").innerHTML = MainLoadingPic("国内短线线路数据加载中...请稍候...");
    }

	var request_url ='../../DealAjax/DealSomeNews.aspx';
	var request_method ='post';
	var request_pars ='DealModel=LoadMainInfoData_MoreForOneForYk';
	request_pars +='&ModelName=Short';
	var request_asynchronous =true;    
	var myAjax = new Ajax.Request(
		request_url,
		{
			method:request_method,
			parameters:request_pars,
			asynchronous:request_asynchronous,       
			onComplete:function(Response){
			
				var result = Response.responseText;
				
				var ArrResult = new Array();
				ArrResult = result.split("[!#!]");
				
				if(ArrResult.length==1){
					var MainInfo_Short = ArrResult[0].toString();
				
	                if(document.getElementById("LabMainInfo_Short")){
	                    document.getElementById("LabMainInfo_Short").innerHTML = MainInfo_Short;	
    
                        if(document.getElementById("LabMainInfo_Long")){
                            document.getElementById("LabMainInfo_Long").style.display = "block";
                            document.getElementById("LabMainInfo_Long").innerHTML = MainLoadingPic("国内长线线路数据加载中...请稍候...");
                        }

                        //国内长线版面数据的加载与即时更新
                        doLoadMainInfoData_Long();
	                }
				}
			}
		}    
	);
}
//===================================================


//===================================================
//==========国内长线版面数据的加载与即时更新=========
//===================================================
function doLoadMainInfoData_Long(){
	
	var request_url ='../../DealAjax/DealSomeNews.aspx';
	var request_method ='post';
	var request_pars ='DealModel=LoadMainInfoData_MoreForOneForYk';
	request_pars +='&ModelName=Long';
	var request_asynchronous =true;    
	var myAjax = new Ajax.Request(
		request_url,
		{
			method:request_method,
			parameters:request_pars,
			asynchronous:request_asynchronous,       
			onComplete:function(Response){
			
				var result = Response.responseText;
				
				var ArrResult = new Array();
				ArrResult = result.split("[!#!]");
				
				if(ArrResult.length==1){
					var MainInfo_Long = ArrResult[0].toString();
				
	                if(document.getElementById("LabMainInfo_Long")){
	                    document.getElementById("LabMainInfo_Long").innerHTML = MainInfo_Long;	

                        if(document.getElementById("LabMainInfo_Out")){
                            document.getElementById("LabMainInfo_Out").style.display = "block";
                            document.getElementById("LabMainInfo_Out").innerHTML = MainLoadingPic("出境线路数据加载中...请稍候...");
                        }

                        //出境线路版面数据的加载与即时更新
                        doLoadMainInfoData_Out();
	                }
				}
			}
		}    
	);
}
//===================================================


//===================================================
//==========出境线路版面数据的加载与即时更新=========
//===================================================
function doLoadMainInfoData_Out(){
	
	var request_url ='../../DealAjax/DealSomeNews.aspx';
	var request_method ='post';
	var request_pars ='DealModel=LoadMainInfoData_MoreForOneForYk';
	request_pars +='&ModelName=Out';
	var request_asynchronous =true;    
	var myAjax = new Ajax.Request(
		request_url,
		{
			method:request_method,
			parameters:request_pars,
			asynchronous:request_asynchronous,       
			onComplete:function(Response){
			
				var result = Response.responseText;
				
				var ArrResult = new Array();
				ArrResult = result.split("[!#!]");
				
				if(ArrResult.length==1){
					var MainInfo_Out = ArrResult[0].toString();
				
	                if(document.getElementById("LabMainInfo_Out")){
	                    document.getElementById("LabMainInfo_Out").innerHTML = MainInfo_Out;
	                    
                        //加载最新快捷查询树数据
                        //doLoadQiucklySearch_Tree();
	                    
                        //===================================================
                        //景区链接数据的加载
                        document.getElementById("LabWebConnection").innerHTML = MainLoadingPic("景区链接数据加载中...");
        
                        doLoadJqLjData();
                        //===================================================
	                }
				}
			}
		}    
	);
}
//===================================================


//===================================================
//================相关信息加载提示===================
//===================================================
function doSomeInfoShow(){

    if(document.getElementById("LabMainInfo_Short")){
        document.getElementById("LabMainInfo_Short").style.display = "block";
    }

    if(document.getElementById("LabMainInfo_Long")){
        document.getElementById("LabMainInfo_Long").style.display = "none";
    }

    if(document.getElementById("LabMainInfo_Out")){
        document.getElementById("LabMainInfo_Out").style.display = "none";
    }
}
//===================================================

//===================================================
//==========窗体加载时加载首页相关数据===============
//===================================================
doLoadMainInfoDatas = function(){

    //相关信息加载提示
    doSomeInfoShow();
    
    //国内短线版面数据的加载与即时更新
    doLoadMainInfoData_Short();
}
//===================================================
//===================================================