//<?php//
/**
 * ajax.js - AJAX Callback functions
 *
 * This file contains AJAX Callback functions
 *
 * @filesource
 */
 
/**
 * function refresh_drop_down_cb()
 *
 * This functions refreshes the the specified drop down
 *
 * - drop_down HTML markup of the new drop down
 * - id HTML element id in which the drop_down resides
 * - opener Boolean, true - if the drop_down exists in the opening window, false - if the drop_down exists in the current window
 * @param string Delimited as drop_down§id§opener
 * @see refreshDropDown()
 */

function refresh_drop_down_cb(args){
	
	var array = args.split("§");
	
	var drop_down = array[0];
	var id = array[1];
	var opener = array[2];
	
	if(opener = 'true'){
		window.opener.document.getElementById(id).innerHTML = drop_down;
	}else{
		document.getElementById(id).innerHTML = drop_down;
	}
}

function change_image_cb(id){
	document.getElementById('image_box').style.backgroundImage = 'url(files/photo_gallery'+id[0]+'.jpg)';
	document.getElementById('image_id').value = id[0];
	document.getElementById('title').innerHTML = id[1];
	document.getElementById('caption').innerHTML = id[2];
	
}
//?>//