function replace_flash() {
	var header = new FlashObject("ecoanimal_final.swf", "flash_header", "640px", "572px", "6.0.65", "#FFFFFF", false );
    header.addParam("quality", "high");
    header.addParam("menu", "false");
    header.addParam("wmode", "transparent");
    header.addParam("FlashVars", "/worldwide/.php");
	header.addVariable("xml_path", "/worldwide/");
	header.addVariable("xml_filename", "/worldwide/flashmapdata.php");
//	eco_xml.load("/worldwide/flashmapdata.php");
    header.write("header");
}

function replace_flash_admin() {
	var flash = new FlashObject("ecoanimal_final.swf", "flash_header", "640px", "572px", "6.0.65", "#FFFFFF", false );
    flash.addParam("quality", "high");
    flash.addParam("menu", "false");
    flash.addParam("wmode", "transparent");
    flash.addParam("FlashVars", "flashmapdata.php&show_admin=yes");
	flash.addVariable("xml_path", "/admin/map/add/");
	flash.addVariable("xml_filename", "flashmapdata.php");
//	eco_xml.load("/admin/map/add/flashmapdata.php");
    flash.write("flash");
}

function populate_admin_box(string1,string2,string3) {
		field = getElement('region');
		field.value = string1;
		field = getElement('x_coord');
		field.value = string2;
		field = getElement('y_coord');
		field.value = string3;
		
	}
	
	function getElement(id){
	    if(document.getElementById){
	        getElement = function(id){ return document.getElementById(id); }
	    }else if(document.all){
	        getElement = function(id){ return document.all[id]; };
	    }else if(document.layers){
	        getElement = function(id){ return document.layers[id]; };
	    }else{
	        getElement = function() { return null; }
	    }
	
	    // When we get here, the getElement function has been replaced.
	    // So we return the result of the new function.
	    return getElement(id);
	}

var newwindow;
function pop1(url)
{
	newwindow=window.open(url,'name','height=150,width=300,left=400,top=300');
	if (window.focus) {newwindow.focus()}
}