﻿profcall(meth,newdata)
{
switch (meth)
{
case "":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#aprocatmod").click(function(){
			terramod("aprocatmod");
		});
	});
	break;

case "set":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});	
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});	
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
			
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;

case "nevset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#nevsetokbtn").click(function(){
				profcall("nevsetok",jQuery("#nevtextbox").val());
			});
	});
	break;
	
case "mailset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#mailsetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#mailsetokbtn").click(function(){
				profcall("mailsetok",jQuery("#mailtextbox").val());
			});
	});
	break;

case "webset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#websetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#websetokbtn").click(function(){
				profcall("websetok",jQuery("#webtextbox").val());
			});
	});
	break;

case "tarthelyset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#tarthelysetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#tarthelysetokbtn").click(function(){
				profcall("tarthelysetok",jQuery("#tarthelytextbox").val());
			});
	});
	break;

case "msnset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#msnsetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#msnsetokbtn").click(function(){
				profcall("msnsetok",jQuery("#msntextbox").val());
			});
	});
	break;

case "telset":
	jQuery.post("pages/hu/userprof.php",{meth : meth}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#telsetcancelbtn").click(function(){
				profcall("set");
			});
		jQuery("#telsetokbtn").click(function(){
				profcall("telsetok",jQuery("#teltextbox").val());
			});
	});
	break;

case "nevsetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, newuser : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;

case "mailsetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, newmail : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});			
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;
	
case "websetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, webnew : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;

case "tarthelysetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, newtart : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});			
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;
	
case "msnsetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, newmsn : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;
	
case "telsetok":
	jQuery.post("pages/hu/userprof.php",{meth : meth, newtel : newdata}, function(data){
		jQuery("#midh").html(data);
		jQuery("#midh").show("blind");
		jQuery("#nevsetbtn").click(function(){
				profcall("nevset");
			});
		jQuery("#mailsetbtn").click(function(){
				profcall("mailset");
			});
		jQuery("#websetbtn").click(function(){
				profcall("webset");
			});
		jQuery("#tarthelysetbtn").click(function(){
				profcall("tarthelyset");
			});
		jQuery("#msnsetbtn").click(function(){
				profcall("msnset");
			});
		jQuery("#telsetbtn").click(function(){
				profcall("telset");
			});
	});
	break;
}
}