﻿ function list(fid,num,obj,letter,news_type,position)
    {
    	
        $.ajax({
				type:"get",
				url:"module/list.asp",
				dataType:"html",
				data:"fid="+fid+"&num="+num+"&letter="+letter+"&type="+news_type+"&position="+position,
				error:function(){
					alert("error");
				},
				success:function(json){		
				    if (position != "content")
				    {
				        /*if (news_type == "pic" || news_type == "pic_small")
				        {
				            var returnValue = json.split("*");
				            for (var i=0;i<3;i++)
					        {
					            if (news_type == "pic")
					                $("#show > div").eq(i).html(returnValue[i]);
					            if (news_type == "pic_small")
					                $("#fouse_pic > li").eq(i).html(returnValue[i]);
					        }
				        }					
					    else
					    {*/
				            $("#"+obj).html(json);
					    //}
				    }
				    else
				    {				    
				        show_list(json,news_type);
				    }
				}
			});
	}
	function content(id,obj,letter,position,table,isDelHtml)
	{
	    $.ajax({
				type:"get",
				url:"module/content.asp",
				dataType:"html",
				data:"id="+id+"&position="+position+"&letter="+letter+"&table="+table+"&isDelHtml="+isDelHtml,
				error:function(){
					alert("error");
				},
				success:function(json){		
				    if (position != "content")
				    {
				    	if(id == 1){
				    		json = json.split("*");
				    		$("#aboutpic").html(json[0]);
				    		$("#aboutcontent").html(json[1]);
				    	}
				        $("#"+obj).html(json);
				    }
				    else
				    {
				        var returnValue = json.split("*");
				        //$("#title").html(returnValue[0]);
				        if(table == "news")
				        	$("#arcbody").html("<h2>"+returnValue[0]+"</h2>"+returnValue[1]);
				        else if (table == "pic"){
				        	$("#pic").html('<img src="'+returnValue[2]+'" alt="'+returnValue[0]+'" border="0"/>');
				        	$("#content").html(returnValue[1]);
				        }
				        else if (table == "aboutclass"){
				        	$("#arcbody").html(returnValue[0]);
				        }
				      
				       // $("#class_mc").html("<a href ='index.html'>首页</a> > "+returnValue[2]);
				    }
				}
			});
	}
	function message(fid,page)
	{
	    $.ajax({
				type:"get",
				url:"module/message.asp",
				dataType:"html",
				data:"fid="+fid+"&page="+page,
				error:function(){
					alert("error");
				},
				success:function(json){	
					var returnVal = json.split("*");
					
				    $("#message_list").html(returnVal[0]);
				    $("#page").html(returnVal[1]);
					//$("#gname").val(returnVal[2]);
				}
			});
	}
	function GetQueryString(sProp)    
	{     
		var re = new RegExp("[&,?]"+sProp + "=([^\\&]*)", "i");     
		var a = re.exec(document.location.search);   
		if (a == null)     
			return "";     
		return a[1];     
	} 
	function show_list(str,news_type)
       {
            var returnValue = str.split("*");
            if(news_type == "pic")
            	$("#pic_list").html(returnValue[0]);
            else
            	$("#arc_list").html(returnValue[0]);
            $("#page").html(returnValue[1]);
           // $("#class_mc").html("<a href ='index.html'>首页</a> > "+returnValue[2]);
       }
	