// HACK MENU IE6
window.addEvent('domready',function()
{
//ANIM HEADER
//	alert($('pathway').innerHTML);

	var pathway= '';
	$('pathway').getChildren().each(function(el, index)
	{
		pathway+= el.getProperty('href')+'::'+el.getText();
		if(index < $('pathway').getChildren().length - 1)
		{
			pathway+='|';
		}
	});
	var flashvars = {
		pathway:pathway
	};
	var params = {
		menu: "false",
		allowScriptAccess:"always"
	};
	var attributes = {
		id: "header_anim",
		name: "header_anim"
	};
	swfobject.embedSWF("fileadmin/templates/flash/isalys_header.swf", "anim_header", "800", "292", "9.0.0","fileadmin/templates/js/expressInstall.swf", flashvars, params, attributes);

	// IE6 INPUTS HOVER 
	if(window.ie6)
	{
		// MENU
		navTab = $$('#menu ul li');
		navTab.each(function(el)
		{
			el.addEvent('mouseenter', function(e)
			{
				this.addClass('over');
			});
			el.addEvent('mouseleave', function(e)
			{
				this.removeClass('over');
			});
		});
		// FORMULAIRES
		$$('input' ).each(function(el)
		{
			switch(el.getProperty('type'))
			{
				case 'password':
				case 'text':
					el.addEvent('mouseover', function(){this.toggleClass('hovered');});
					el.addEvent('mouseout', function(){this.toggleClass('hovered');});
					el.addEvent('focus', function(){this.toggleClass('focused');});
					el.addEvent('blur', function(){this.toggleClass('focused');});
					break;
			}
		});
		$$('textarea').each(function(el)
		{
			el.addEvent('mouseover', function(){this.toggleClass('hovered');});
			el.addEvent('mouseout', function(){this.toggleClass('hovered');});
			el.addEvent('focus', function(){this.toggleClass('focused');});
			el.addEvent('blur', function(){this.toggleClass('focused');});
		});
	}else{
		$$('input' ).each(function(el)
		{
			switch(el.getProperty('type'))
			{
				case 'password':
				case 'text':
					el.fx = new Fx.Styles(el,{duration:400, wait:false});
					el.addEvent('mouseover', function(){
						if(this.focused==false || !this.focused){
							this.fx.start(
							{
								'background-color':"#ddf3f2"
							});
						}
					});
					el.addEvent('mouseout', function(){
						if(this.focused==false || !this.focused){
							this.fx.start(
							{
								'background-color':"#cfe0e0"
							});
						}
					});
					el.addEvent('focus', function(){
						this.focused = true;
						this.fx.start(
						{
							'background-color':"#FFFFFF"
						});
					});
					el.addEvent('blur', function(){
						this.focused = false;
						this.fx.start(
						{
							'background-color':"#cfe0e0"
						});
					});
					break;
			}
		});
		$$('textarea').each(function(el)
		{
			el.fx = new Fx.Styles(el,{duration:400, wait:false});
			el.addEvent('mouseover', function(){
				if(this.focused==false || !this.focused){
					this.fx.start(
					{
						'background-color':"#ddf3f2"
					});
				}
			});
			el.addEvent('mouseout', function(){
				if(this.focused==false || !this.focused){
					this.fx.start(
					{
						'background-color':"#cfe0e0"
					});
				}
			});
			el.addEvent('focus', function(){
				this.focused = true;
				this.fx.start(
				{
					'background-color':"#FFFFFF"
				});
			});
			el.addEvent('blur', function(){
				this.focused = false;
				this.fx.start(
				{
					'background-color':"#cfe0e0"
				});
			});
		});
	}

});
