	function changecss(theClass,element,value) {
	//documentation for this script at http://www.shawnolson.net/a/503/
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 for (var S = 0; S < document.styleSheets.length; S++){
	  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
	   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
	   alert(document.styleSheets[S][cssRules][R].style[element]);
	    document.styleSheets[S][cssRules][R].style[element] = value;
	   }
	  }
	 }	
	}

var minfontsize=8;
var maxfontsize=20;
var curfontsize=12;
function increaseFontSize() {
	curfontsize++;
	changecss('.resizabletext','font-size', curfontsize+'px');
}
function decreaseFontSize() {
	curfontsize--;
	changecss('.resizabletext','font-size',curfontsize+'px');
}
/* 2008 WindSlice */

var stickyWin = null;

function create_sticky_win_on_event(e) {
	e.stop();
	if (stickyWin != null) { stickyWin.destroy(); stickyWin = null; }
	stickyWin = new StickyWin.Ajax({
				url: this.get('href')+'/ajax/true',
				caption: this.get('text'),					
				wrapWithUi: true,
				handleResponse: function(response){			
					var responseScript = '';
					this.Request.response.text.stripScripts(function(script){ responseScript += script; });
					if (this.options.wrapWithUi) response = StickyWin.ui(this.options.caption, response, this.options.uiOptions);
					this.setContent(response);						
					this.show();
					bind_stickywin_results($('mailform'));
				}
	}).update();
	return false;
}
function bind_stickywin_results(form) {
	form.set('action', form.get('action')+'/ajax/true');
	form.addEvent('submit', function(e) {
		e.stop();
		new Form.Request(form, form, 
			{	onSuccess: function(target, text, xml) {	bind_stickywin_results(form);	} 	}
		).send();
	});
}

function prefill(elementname, text) {
	window.addEvent('domready', function() {
		var element = $(elementname);
		if($defined(element))
		{
			if (!Browser.Engine.trident && element.get('type')=='password')
			{
				element.set('type', 'text');
				element.addEvent('focus', function(){	this.set('type', 'password'); this.removeEvents('focus'); this.value=''; } );
			} else {			
				element.addEvent('focus', function(){	this.removeEvents('focus'); this.value=''; } );
			}
			element.value=text;
		}
	});
}

function ajaxformloader(formname, divname){
	var form = $(formname);
	var div = $(divname);
	if ($defined(form) && $defined(div))
	{
		form.set('action', form.get('action')+'/ajax/true');
		form.addEvent('submit', function(e) {
			div.spin();
			e.stop();
			new Form.Request(form, div,
				{	onSuccess: function(target, text, xml) { ajaxformloader(formname, divname); div.unspin(); } }
			).send();
		});
	}
}

var ie6nomorecode = '\
  <div id="ie6nomore" style=\'z-index:15000; border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;\'>\
    <div style=\'position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;\'><a href=\'#\' onclick=\'javascript:this.parentNode.parentNode.style.display="none"; document.getElementById("ie6nomoremask").style.display="none"; return false;\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg\' style=\'border: none;\' alt=\'Close this notice\'/></a></div>\
    <div style=\'width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;\'>\
      <div style=\'width: 75px; float: left;\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg\' alt=\'Warning!\'/></div>\
      <div style=\'width: 275px; float: left; font-family: Arial, sans-serif; line-height:14px; \'>\
        <div style=\'font-size: 14px; font-weight: bold; margin-top: 12px;\'>Votre navigateur, vieux de 8 ans, n\'est plus supporté sur ce site!</div>\
        <div style=\'font-size: 12px; margin-top: 6px; line-height: 12px;\'>Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.</div>\
      </div>\
      <div style=\'width: 75px; float: left;\'><a href=\'http://fr.www.mozilla.com/fr/\' target=\'_blank\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg\' style=\'border: none;\' alt=\'Get Firefox 3.5\'/></a></div>\
      <div style=\'width: 75px; float: left;\'><a href=\'http://www.microsoft.com/downloads/details.aspx?FamilyID=341c2ad5-8c3d-4347-8c03-08cdecd8852b&DisplayLang=fr\' target=\'_blank\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg\' style=\'border: none;\' alt=\'Get Internet Explorer 8\'/></a></div>\
      <div style=\'width: 73px; float: left;\'><a href=\'http://www.apple.com/fr/safari/download/\' target=\'_blank\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg\' style=\'border: none;\' alt=\'Get Safari 4\'/></a></div>\
      <div style=\'float: left;\'><a href=\'http://www.google.com/chrome?hl=fr\' target=\'_blank\'><img src=\'http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg\' style=\'border: none;\' alt=\'Get Google Chrome\'/></a></div>\
    </div>\
  </div>';

window.addEvent('domready', function() { 
	if (Browser.Engine.trident && Browser.Engine.version < 5)
	{
		var tempdiv = new Element('div', {id: 'myFirstElement'});
		tempdiv.set('html', ie6nomorecode);
		tempdiv.inject($(document.body), 'top');
		$(document.body).set('mask', {id: 'ie6nomoremask'});
		$(document.body).mask();
	}
});