$(document).ready(function() { 
 
	//dotiahneme ak nemame 
	//if($.promt == undefined) importScript("/modules/jquery/js/jquery-impromptu.3.0.min.js");
   
    $.listen('click','a.getBoxSetup',function(event) 
    { 
       	 var structureID = $("#structureID").val();
       	 var pageType = $("#pageType").val();
       	 var pageValue = $("#pageValue").val();
       	 var thisObj = $(this);     	 
       	 var boxResult =  thisObj.parent().find(".boxResult"); 
 
       	 $.ajax({  
             type: "POST",
             url: "/modules/boxs/ajax.php", 
             data:"w=getOption&structureID="+structureID+"&pageType="+pageType+"&pageValue="+pageValue,
             beforeSend: function()
             { 
       		 	boxResult.html("Loading...");          	 
             },   
             success: function(msg)
             {  // 0 - result text, 1 - pageType 2- pageValue
            	 msg = msg.split(";*");
            	 boxResult.html(msg[0]);
            	 $("#pageType").val(msg[1]);
            	 $("#pageValue").val(msg[2]);
	         }   
          });
    	        
    });	
    
});
 

 


