// JavaScript Document
/*function login_forum(){
		$.ajax({
			   type:"POST",
			   url:"forum.php",
			   data:='name='+document.getElementById("txtname").value+'txtpassword='+document.getElementById("txtpassword").value,
			   success:function(html){
				   $("#response").html(html);
			   }
			   });
{
	*/
	function insert_userforum(){
		
		$.ajax({
			   	type:"GET",
				url:"insert_userforum.php",
				data:'username='+document.getElementById("txtusername").value+ '&password='+document.getElementById("txtpassword").value+'&emailaddress='+document.getElementById("txtemailaddress").value,
				success:function(html){
					$("#insert").html(html);
				}
			   });
	}
	function edit_forum(forumid){
	
		$.ajax({
			   	type:"GET",
				url:"edit_forum.php",
				data:'forumid='+ forumid ,
				success:function(html){
					$("#insert").html(html);
				}
			   });
	}
	var poupwin;
	function poupwindow(url,winname,w,h,t,l,scroll){
		//alert('aa');
		var settings='height='+h+',width='+w+',top='+ t+ ',left='+ l+',scrollbars='+ scroll +',resizable';
		poupwin=window.open(url,winname,settings);
	}
	function delete_forum(forumid,forumname){
		
		var y;
		y=confirm("Do you want to Delete  "+forumname+"?");
		if(y==true){
			$.ajax({
			   
			   	type:"GET",
				url:"delete_forum.php",
				data:'forumid='+ forumid+'forum_name='+forumname,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
	}
	
	function delete_category1(cateid,catename){
		var y;
		y=confirm("Do you want to Delete "  + catename+"?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_category.php",
				data:'cateid='+ cateid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
	}
	function delete_topic(topicid,topicname){
		var y;
		y=confirm("Do you want to Delete "  + topicname+"?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_topic.php",
				data:'topicid='+ topicid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
	}
	function update_thread(threadid){
		
		$.ajax({
			   
			   	type:"GET",
				url:"update_thread.php",
				data:'threadid='+threadid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
	}
	function delete_thread(threadid){
		var y;
		y=confirm("Do you want to Delete this thread?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_thread.php",
				data:'threadid='+ threadid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
			
	}
	function delete_user1(userid,username){
		//alert(userid);
		var y;
		y=confirm("Do you want to Delete "+ username+"?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_fileuser.php",
				data:'newuserid='+ userid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
	}
	/*function delete_user1(userid,username){
		var y;
		y=confirm("Do you want to Delete this user?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_user.php",
				data:'userpostid='+ userid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
			
	}
	function delete_users(userid,usernames){
		var y;
			y=confirm("Do you want to Delete  " + usernames +"?");
		if(y==true){
		$.ajax({
			   
			   	type:"GET",
				url:"delete_user.php",
				data:'userpostid='+ userid,
				success:function(html){
					$("#insert").html(html);
				}
			   });
		}
	}*/
