// The chart object
function chart(name) {
	this.name = name;
 
	this.image_saved = function(id) {
		alert('saved:'+this.name+', id:'+id );
	};
}
 
// create a new chart object
var my_chart = new chart('chart 1');
 
function done(id)
{
	alert("Finished upload. Id:"+id);
}
 
function post_image(debug)
{	
	//
	// My computer at home is called 'eden'
	// so I want to POST the image to the
	// ofc_upload_image.php script. I am also
	// passing the name of the image file in
	// as a GET variable.
	//
	url = "http://www.gtseo.nl" + ROOT_PATH + "module/open-flash-chart/php-ofc-library/ofc_upload_image.php?name=tmp.png";
 
	//
	// call the save function in the flash chart,
	// ofc == open flash chart
	//
	var ofc = findSWF("zoekterm_chart");
 
	// call the done() function when the image has been POSTed
	x = ofc.post_image( url, 'done', debug );
}
 
function post_image_2(debug)
{
 
	url = "http://www.gtseo.nl" + ROOT_PATH + "module/open-flash-chart/php-ofc-library/ofc_upload_image.php?name=tmp.png";
	var ofc = findSWF("zoekterm_chart");
	// call our objects image_saved() method when finished
	x = ofc.post_image( url, 'my_chart.image_saved', debug );
}
 
function ofc_ready()
{
	alert('ofc_ready');
}
 
function findSWF(movieName) {
	if (navigator.appName.indexOf("Microsoft")!= -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}// The chart object
function chart(name) {
	this.name = name;
 
	this.image_saved = function(id) {
		alert('saved:'+this.name+', id:'+id );
	};
}
 
// create a new chart object
var my_chart = new chart('chart 1');
 
function done(id)
{
	alert("Finished upload. Id:"+id);
}
 
function save_image( chart_id )
{	
	post_image(true);	
}


function post_image(debug)
{
	//
	// My computer at home is called 'eden'
	// so I want to POST the image to the
	// ofc_upload_image.php script. I am also
	// passing the name of the image file in
	// as a GET variable.
	//
	url = "http://www.gtseo.nl" + ROOT_PATH + "module/open_flash_chart/php-ofc-library/ofc_upload_image.php?name=tmp.png";
 
	//
	// call the save function in the flash chart,
	// ofc == open flash chart
	//
	var ofc = findSWF("zoekterm_chart");
 
	// call the done() function when the image has been POSTed
	x = ofc.post_image( url, 'done', debug );
}
 
function post_image_2(debug)
{
 
	url = "http://www.gtseo.nl" + ROOT_PATH + "module/open_flash_chart/php-ofc-library/ofc_upload_image.php?name=tmp.png";
	
	var ofc = findSWF("zoekterm_chart");
	
	// call our objects image_saved() method when finished
	x = ofc.post_image( url, 'my_chart.image_saved', debug );
}
 
function ofc_ready()
{
	//alert('ofc_ready');
}
 
function findSWF(movieName) {
	if (navigator.appName.indexOf("Microsoft")!= -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}
