function getObject(id) {
	var oLayer;
	if (document.layers) {
		oLayer = document.layers[id].document;
	}
	else if (parseInt(navigator.appVersion)>=5 && navigator.appName=="Netscape") {
		oLayer = document.getElementById(id);
	}		
	else if (document.all) {
		oLayer = document.all[id];
	}
	return oLayer;
}
function mapOn(current) {if (document.images) {	object = getObject("mapImage");	object.src = eval(current + '_lit.src');}}
function mapOff(current) {if (document.images) { object = getObject("mapImage");	object.src = eval(current + '_off.src');}}
	
 function windowOpen(page, title, attributes) {
	window.open(page, title, attributes);
 }
 
 function windowClose() {
	window.close();
 }
 
function closeLayer() {
 	outpostCloseLayer("showMaps");
} 
 
function ajaxGetContent(category, sub_category, item) {
	new Ajax.Updater("showMaps", sys_site +"getContent.php", {
		method: 'post',
		asynchronous: false,
		evalScripts: true,
		parameters : { category: category, sub_category: sub_category, item: item }
	});
 	outpostOpenLayer("showMaps");
}

 
 function ajaxDeleteContent(item_id) {
 
	if (confirm("Are you sure you want to delete this Item?")) {
		new Ajax.Request(sys_site +"secure/deleteContent.php", {
			method: 'post',
			asynchronous: false,
			parameters : { item_id: item_id },
			onSuccess: function(transport) { 
				document.location = sys_site + "/index/ACE Networks/Manage/Networks";
			},
			onFailure: function(transport, e) { alert(e); },
			onException: function(transport, e) { alert(e); }
		});
	}
 }
