// JavaScript Document
var callpath="include/";
$(document).ready(function(){ 
　　$("#imgBtn").click(function(){ 
		var txtval1 = $("#txtNickName").val();
		var txtval2 = $("#txtRealName").val();
		var txtval3 = $("#txtTele").val();
		var txtval4 = $("#txtEmail").val();
		var txtval5 = $("#txtBlogSite").val();
		var arr = [txtval1, txtval2, txtval3,txtval4,txtval5];
		postvalidateval("tdmsg",callpath+"insertblogdatabefore.php",arr);
　　});
}); 
function postvalidateval(id,posturl,arr){
	$.ajax({ 
		type: "post",  
		url : posturl, 
		data: "fdata="+arr, 
		success: function(txt)
		{
			//alert(txt);
			if(txt=="ok")
			{
				postval(id,callpath+"insertblogdata.php",arr);
			}
			else
			{
				alert(txt);
			}
		}   
	});
}
function postval(id,posturl,arr){
	$.ajax({ 
		type: "post",  
		url : posturl, 
		data: "fdata="+arr, 
		success: function(txt)
		{
			//document.write(txt);
			location.href="blog_sub_2.html";
		}   
	});
}