// JavaScript Document
ajaxGet = function(element,file) {
	var ajax = new Ajax();
	var handler = function(str) { document.getElementById(element).innerHTML = str; }
	ajax.doGet(file,handler);
}
ajaxPost = function(element,formname,file) {
	var form = document.getElementById(formname);
	var ajax = new Ajax();
	var handler = function(str) {
		document.getElementById(element).innerHTML = str;
	}
	var formData = '';
	var ajax = new Ajax();
	formData = formData2QueryString(form);
	ajax.doPost(file, formData, handler);
}
clearElement = function(element) {
	document.getElementById(element).innerHTML = "";
}
disableElement = function(element) {
	document.getElementById(element).disabled = true;	
}
enableElement = function(element) {
	document.getElementById(element).disabled = false;	
}
hideElement = function(element) {
	document.getElementById(element).style.display = "none";	
}
showElement = function(element) {
	document.getElementById(element).style.display = "block";	
}
swapElements = function(hide,show) {
	document.getElementById(hide).style.display = "none";	
	document.getElementById(show).style.display = "block";	
}
loading = function(element) {
	document.getElementById(element).innerHTML = "<p class=\"center\"><img src=\"/2011/images/processing.gif\" alt=\"processing\" width=\"262\" /></p>";
}
function popup(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600');");
}
function popup2(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300');");
}
function popup3(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=1024,height=600');");
}
function popup4(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=300,height=500');");
}
function popup_fixed(page, name, height, width) {
	var size = "height=" + height + ",width=" + width;
	window_handle = window.open(page,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no," + size);
}

