
	function updateDwld(id)
	{
		aframe_get('empty_cont', 'index.php?module=subtitles&action=download_ajax&id='+id, true);
	}

	var aframe_count_new = 0;	// for dinamic creation of aframes
	/**
	*	initializes aframe
	*/
	function aframe_init(parent, url){
		aframe_count_new--;
	
		var aframe_new_id = "div_aframe_"+aframe_count_new;
		var aframe_new = document.createElement('div');
		aframe_new.setAttribute("id", aframe_new_id);
		$(parent).appendChild(aframe_new);
	
		//new Insertion.Bottom(parent, 's');
	
		var ajax = new Ajax.Updater( aframe_new_id, url, {method: 'get', parameters: 'aframe_target='+aframe_new_id, evalScripts: true } );	
	}
	/**
	*	removes aframe
	*/
	function aframe_remove(aframe_id){		
		var aframe = $(aframe_id);
		if (aframe != null){
			var parent = aframe.parentNode;			
			if (parent != null){
				parent.removeChild( aframe );			
			}
		}
	}
	/**
	*	form submittion (post)
	*/
	function aframe_form_submit(aframe_id, evalScripts)
	{
		var parameters = 'aframe_target='+aframe_id;
		var form_id = 'form_'+aframe_id;
		var form = $( form_id );
		
		if (form != null)
		{
			var url = form.action;
			var method = form.method;
			parameters = parameters + '&' + Form.serialize(form_id);
			var ajax = new Ajax.Updater( aframe_id, url, {method: method, parameters: parameters, evalScripts: evalScripts } );
			new Form.disable(form_id);
		}
	}
	/**
	*	link (get)
	*/
	function aframe_get(aframe_id, url, evalScripts){
		var parameters = 'aframe_target='+aframe_id;
		var ajax = new Ajax.Updater( aframe_id, url, {method: 'get', parameters: parameters, evalScripts: evalScripts } );	
	}



