/*			window.addEvent('domready', function() {
			
			// Define mySlider and hide it
			if (Cookie.get("state") == 'hide') {
				var mySlider = new Fx.Slide('feature',{duration: 1000, transition: Fx.Transitions.expoOut}).hide();
			} else {
				var mySlider = new Fx.Slide('feature',{duration: 1000, transition: Fx.Transitions.expoOut}).show();
			}			

			// Click event to toggle mySlider (Slide In/Out depending the actual state)
			              $('nav_ToggleSlider').addEvent('click', function() {
			                   if (mySlider.wrapper.offsetHeight == 0 || mySlider.wrapper.offsetWidth == 0)
			                        Cookie.set('state', 'show', {path: '/', duration: 999});
			                   else
			                        Cookie.set('state', 'hide', {path: '/', duration: 999});
			                   mySlider.toggle();
			              });

		});
*/
function ReloadTextDiv()
{
document.getElementById('TextDisplay').innerHTML = '<p>'+document.getElementById('DynamicText').value.replace(/(\n|\r)/g,'<br />').replace(/(<br \/>){2,}/gi,'<'+'/p><p>')+'<'+'/p>';}

  function styleswitch(mode, setstyle){
    var i, a;
	var stylepath = '/a/css/global/';
    // setting the path to the CSS directory
    var cookstyle = Cookie.get('Stylesheet');
    // getting current cookie value for the stylesheet 
    if (cookstyle == false ) {
                              for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
                              if(a.getAttribute("rel").indexOf('style') != -1
                              && a.getAttribute("media").indexOf('screen') != -1
                              && a.getAttribute("title")
                              // find default stylesheet, which is defined in the head section of the document
                              ) {
                                cookstyle = a.getAttribute("title"); 
                                Cookie.set('Stylesheet', cookstyle, {duration:365, path:'/'});
                                //set the default stylesheet as a cookie value
                                }
                               }
                             }
                             
    switch (mode) {
                  case 'set':
                    new Asset.css(stylepath + setstyle +'.css', {id: setstyle});
                    // loads the new stylesheet
                    Cookie.set('Stylesheet', setstyle, {duration:365, path:'/'});
                    // sets the active stylesheet into a cookie value
                  break;
                case 'noset':
                    new Asset.css(stylepath + setstyle +'.css', {id: setstyle});
                    // only apply the new stylesheet, without saving it in a cookie value
                    break;
                default:
                    setstyle = cookstyle
                    new Asset.css(stylepath + cookstyle +'.css', {id: cookstyle});
                    // sets the current cookie value as active stylesheet
                   break;
				   }

  // ....
  return null;
  }
  window.addEvent('domready', styleswitch);

	window.addEvent('domready', function(){

		var mySlide = new Fx.Slide('about');

		$('toggle').addEvent('click', function(e){
			e = new Event(e);
			mySlide.toggle();
			$('toggle').toggleClass('on');

			e.stop();
		});

		var mySlide = new Fx.Slide('about', {duration: 750}).hide();

	}); 	



	var scroll = new Fx.Scroll('comments', {
		wait: false,
		duration: 2500,
		offset: {'x': -200, 'y': -50},
		transition: Fx.Transitions.Quad.easeInOut
	});

	$('link1').addEvent('click', function(event) {
		event = new Event(event).stop();
		scroll.toElement('content1');
	});

function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}