//    Copyright 2008 Mathias Weyland
//    This file is part of Formulax.

//    Formulax is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.

//    Formulax is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with Formulax.  If not, see <http://www.gnu.org/licenses/>.

Event.observe(window, 'load', init, false);

function init(){
	$('submit').style.display = 'none';
	Event.observe('latex', 'keyup', render, false);
	Event.observe('large', 'click', render, false);
}

function render(){
	var url = 'ajax.php?PHPSESSID='+sid;
	var pars = {'latex': escape($F('latex')), 'large':$F('large')};
	var target = 'image';
	var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});
}

