function inlucdFile(fileUrl){
	$.post("/ajax.do?method=includeFile&fileUrl="+fileUrl,null,function(msg){
		$("#fileId").html(msg);		
	});
}

function inlucdFile1(fileUrl){
	$.post("/ajax.do?method=includeFile&fileUrl="+fileUrl,null,function(msg){
		$("#fileId1").html(msg);		
	});
}
function inlucdBook(fileUrl,id){
	$.post("/ajax.do?method=includeFile&fileUrl="+fileUrl,null,function(msg){
		msg=msg.replace(/^\s*|\s*$/g, "");
		var str2=id+"' class='nowLi";
		var newstr=msg.replace(id,str2);
		$("#fileId1").html(newstr);		
	});
}

function inlucdTels(fileUrl,url){
	$.post("/ajax.do?method=includeFile&fileUrl="+fileUrl,null,function(msg){
		msg=msg.replace("###url###",url);
		$("#fileId").html(msg);		
	});
}

function inlucdFile2(fileUrl){
	$.post("/ajax.do?method=includeFile&fileUrl="+fileUrl,null,function(msg){
		$("#fileId2").html(msg);		
	});
}

function relative(htmlId,words){
	var wordsContent=encodeURI(encodeURI(words));
	$.post("/ajax.do?method=relative&words="+wordsContent,null,function(msg){
		$("#"+htmlId).html(msg);				
	});
}

function prevAndNext(id,str){
	$.post("/ajax.do?method=prevAndNext&id="+id+"&str="+str,null,function(msg){
		if(msg!=""){			
			$("#prev").html(msg.split('###')[0]);	
			$("#next").html(msg.split('###')[1]);
		}
			
	});
}
function teacherPrevAndNext(id){
	$.post("/ajax.do?method=teacherPrevAndNext&id="+id,null,function(msg){
		if(msg!=""){			
			$("#prev").html(msg.split('###')[0]);
			$("#next").html(msg.split('###')[1]);
		}
			
	});
}
function studentWorkPrevAndNext(id,str){
	$.post("/ajax.do?method=studentWorkPrevAndNext&id="+id+"&str="+str,null,function(msg){
		if(msg!=""){			
			$("#prev").html(msg.split('###')[0]);	
			$("#next").html(msg.split('###')[1]);
		}
			
	});
}
function starPrevAndNext(id){
	$.post("/ajax.do?method=starPrevAndNext&id="+id,null,function(msg){
		if(msg!=""){			
			$("#prev").html(msg.split('###')[0]);
			$("#next").html(msg.split('###')[1]);
		}
			
	});
}
