function init()
{
	//changeinputfields("password", "Passwort", true);
	//changeinputfields("username", "Benutzername", false);
	//changeinputfields("searchtoken", "Suchbegriff", false);
	//changeinputfields("newsletter", "E-Mail-Adresse", false);
	ie_buttonhover();
}

function ie_buttonhover()
{
	if ( Prototype.Browser.IE )
	{
		if ( $('home') ) { my_button = $('home').select('button'); }
		if ( $('sub') ) {  my_button = $('sub').select('button'); }
		if ( $('konfigurator') ) {  my_button = $('konfigurator').select('button'); }
		if ( my_button )
		{
			for ( i=0; i < my_button.length; i++ )
			{
				my_button[i].onmouseover = function() { this.addClassName('over'); }
				my_button[i].onmouseout = function() { this.removeClassName('over'); }
			}
		}
	}
}

function changeinputfields(my_el, my_value, my_el_pw)
{
	my_el = $(my_el);
	if ( my_el )
	{

		// password
		if ( my_el_pw && !Prototype.Browser.IE )
		{
			if ( my_el.value == my_value ) {
				my_el.type = "text";
			}
		}

		my_el.onfocus = function()
		{
			this.value = ( this.value == my_value ) ? '' : this.value;
			this.select();
			this.up().className = 'inputcontainer_over';
			if ( my_el_pw && !Prototype.Browser.IE )
			{
				this.type = "password";
			}
		}

		my_el.onblur = function()
		{
			this.value = ( this.value.match(/\S/)) ? this.value : my_value;
			this.up().className = 'inputcontainer';

			if ( my_el_pw && !Prototype.Browser.IE )
			{
				this.type = ( this.value == my_value ) ? '' : this.type = "password";
			}
		}

		my_el.onchange = function()
		{
			// password
			if ( my_el_pw && !Prototype.Browser.IE )
			{
				this.type = ( this.value == my_value ) ? '' : this.type = "password";
			}
		}

	}
}

function toggle_teasertopages() {
	var my_el = $('teasertopages');
	if (my_el){
		my_el.toggle();
	}
}

//Event.observe (window, "load", init);