var isIE;
var isIE6;
var isIE7;

function btnLargeRed() {	
	// alert("IE: " + isIE + " IE6: " + isIE6);
	$$("div.buttonlargered").each(function(div) {
		div.select("input").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -28px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
		div.select("button").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -28px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});
	});	
}

function btnLargeBlue() {	
	$$("div.buttonlargeblue").each(function(div) {
		div.select("input").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -28px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
		div.select("button").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -28px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
	});	
}

function btnSmall() {	
	$$("div.buttonsmall").each(function(div) {
		div.select("input").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -20px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
		div.select("button").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -20px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
	});	
}


function btnSmallBlue() {	
	$$("div.buttonsmallblue").each(function(div) {
		div.select("input").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -20px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
		div.select("button").each(function(input) {
			input.observe('mouseover', function(event) {
				event.element().style.backgroundPosition = '0px -20px';
			});
			input.observe('mouseout', function(event) {
				event.element().style.backgroundPosition = '0px 0px';
			});
		});	
	});	
}

function browserFunc() {
	isIE = !window.opera && navigator.userAgent.indexOf('MSIE') != -1;
	isIE6 = isIE && !window.XMLHttpRequest;
	isIE7 = isIE && typeof(window.XMLHttpRequest) == 'object';
	// alert("IE: " + isIE + " IE6: " + isIE6 + " IE7: " + isIE7);
	
	if (isIE6) IE6mouseover();
}

function IE6mouseover() { // Mouseover Functions für IE 6
	btnLargeRed();
	btnLargeBlue();
	btnSmall();
	btnSmallBlue();
}


Event.observe(window, 'load', browserFunc, true);

