/*
Script: conference.js
		generate conferences list

License:
        MIT-style license.

About:
		conference.js for mootools framework <http://www.mootools.net/> (c) 2007 Valerio Proietti, MIT-style license.
		Class created by Sylvain Barraud, Yvan Cottet and Gregory Paccaud, <http://www.esl.ch/>.
		Last modification, 6 july 2009.

Version: 1.0

Note:
		XHTML doctype is required.
		
*/

/*
Class: Conference
		generate conferences list.

Arguments:
		 

Example:
		
		
		
Note:
		Don't forget to insert "<script language="Javascript" type="text/javascript" src="js/mootools.js"></script>" into the head page before this js file.
*/

var Newsletter = new Class({
	
	Implements : Options,
	/*
		Initialize
	*/
	
	
	options: {
		
	},
	
	initialize : function(options) {
		myURI = new URI(window.location.href);
		this.createForm(myURI.getData('lang'),myURI.getData('item_categoryID'));
	},
	
	createForm : function(lang, id){
		var myform = new Element('form',{
			'id':'myform',
			'styles': {
				'position':'absolute',
				'top':50,
				'left':650
			},
			'action':'http://main.esl-lan.net/data/newsletter/index.php',
			'method':'get',
			'target':'_blank'
		}).set('html',
		'<input type="hidden" name="lang" value="'+lang+
		'"><input type="hidden" name="id" value="'+id+
		'">'+
		'<input type="submit" value="Générer la newsletter" />'
		).inject($$('html')[0]);
	}
	
});

window.addEvent('domready',function(){
	if(window.location.hostname == 'main.esl-lan.net') new Newsletter();
});

