// JavaScript Document
doSetElement = 'normal_element';
function urlSelector(url) {
	if (url == '') return false;	
	window.opener.getDataIM(url);
}
function getDataIM(url){
	if(doSetElement='normal_element'){
		setToNormalElement(url)	;
	}
	//self.close();
}
function xajax(controller,ajax_reply){
		
	startLoading(ajax_reply);	
	$.ajax({
		type: "GET",
		url: controller,
		success: function(html){
			$("#"+ajax_reply).html(html);
			endLoading(ajax_reply);
		},
		error:function(){
			endLoading(ajax_reply);
		}
	});
	
}
function pajax(controller,ajax_reply,indicator){
	//$("#"+ajax_reply).html('<img src="/images/indicator.gif" width="16" height="16" alt="" />');
	if(indicator!=""){
		$("#"+indicator).html('<div class="ajax_loader"><img src="/images/yajax_load.gif" width="16" height="16" alt="" /></div>');
	}
	$.ajax({
		type: "GET",
		url: controller,
		cache: false,
		success: function(html){
			$("#"+ajax_reply).html(html);			
		},
		error:function(){
			$("#"+ajax_reply).html('error');
		}
	});
}
function startLoading(aid)
{ 
	$('#load_'+aid).show();
}
function endLoading(aid)
{ 
	$('#load_'+aid).hide();
}
