
function GetService(slan){
    $("#servicecontent").html(loadcontent+"...");
        rnd= Math.floor(Math.random()*10000);
    $.ajax({
        url:"Ajax.aspx?action=Service&lan="+slan+"&id="+rnd,
        type:"GET",
        dataType:"html",
        error:function(xml){
           //ErrorHandler(loadcontenterr+":"+xml,true);
        },
        success:function(xml){   
            $("#servicecontent").html(xml);          
    	}
	});
}


function GetNotice(slan){
	$("#noticecontent").html(loadcontent+"...");
    $.ajax({
        url:"ajax.aspx?action=notice&lan="+slan+"&id="+Math.floor(Math.random()*10000),
        type:"GET",
        dataType:"html",
        error:function(xml){
          // ErrorHandler(loadcontenterr+xml,true);
        },
        success:function(xml){           
          var  n=xml.split("|");
          if(n.length>0){
            websiteclose=n[1];
            if(n[0]!="none"){
				Isnotice=true;
                noticeHandle();
                $("#noticecontent").html(n[2]); 
               
            }else{
			   Isnotice=false;
               $("#notice").css({"display":"none","z-index":"-1"});
            }
          } 
          if(websiteclose=="block"){
               document.getElementById("net1").disabled=true;
          }else{
               document.getElementById("net1").disabled=false;
          }
    }});
}
function GetmoneyNotice(slan){
      $.ajax({
        url:"ajax.aspx?action=moneynotice&lan="+slan+"&id="+Math.floor(Math.random()*10000),
        type:"GET",
        dataType:"html",
        error:function(xml){
           //ErrorHandler(loadcontenterr+xml,true);
        },
        success:function(xml){           
          moneyNotice=xml;
          SetLanChange();
    }});
}

function noticeHandle(){
	if (Isnotice) {
		var h = $("#header").height() + $("#picheader").height() + $("#nav").height() + $("#center").height() + $("#foot").height();
		clientWidth = window.document.documentElement.clientWidth > $("#main").width() ? window.document.documentElement.clientWidth : $("#main").width();
		clientHeight = window.document.documentElement.clientHeight > h ? window.document.documentElement.clientHeight : h;
		$("#notice").css({
			"top": (clientHeight - $("#notice").height()) / 2 + "px",
			"left": (clientWidth - $("#notice").width()) / 2 + "px"
		});
		$("#noticebg").css({
			"display":"block",
			"height": clientHeight + "px",
			"width": clientWidth + "px",
			"left": "0px"
		});		
		$("#notice").fadeIn(500);
	}
}

function Getweblan(slan){
	$.ajax({
		url: "../Ajax.aspx?action=l&lan=" + slan + "&id=" + Math.floor(Math.random() * 10000),
		type: "GET",
		dataType: "html",
		error: function(xml){
			
		},
		success: function(xml){
			lanpagetitle = xml;
			document.title=xml;
		}
	});
}
	


