 //Funktionen fuer onMouseOver-Effekte
var cssPfad = '/';
var bildPfad = '/images/cm/button/'; // Hier wird der Bildpfad eingetragen, in dem sich die buttons befinden

	buttonOn = new Array();
	buttonOff = new Array();
function preloadImages()
{
if (document.images) //Bilder eingeschaltet bzw. ueberhaupt vorhanden?
	{ for (i =0; i<document.images.length;i++) // zählt die Anzahl der bilder auf der Seite
		{ if ((document.images[i].name.indexOf('_button')!=-1))
			{ stopPoint = document.images[i].name.indexOf('_button'); //bilder mit Namenversehen <img... name="..._button"! ->es wird nach "_button" gesucht & gezählt an wievielter stelle die Zeichen "_button" losgehen das ist dann das ende der variable
			  bildName=document.images[i].name.substring(0,stopPoint);	// es werden die zeichen von 0 bis zum stoppoint gezählt-> die buchstaben innerhalb ergeben bildname
			  buttonOn[document.images[i].name] = new Image();
			  buttonOn[document.images[i].name].src = bildPfad + bildName + '_on.gif';	 //pfad/entstandener bildName mit _on.gif
			  buttonOff[document.images[i].name] = new Image();
			  buttonOff[document.images[i].name].src = bildPfad + bildName + '_off.gif'; //pfad/entstandener bildName mit _off.gif

			}
		}
	}

}
function lightUp(which)
{if (document.images)
	{
		whichButton = which +"_button";
		newButton =  buttonOn[whichButton];
		if(buttonOn[whichButton]) document.images[whichButton].src=buttonOn[whichButton].src;
		return true;
	}
}
function darken(which)
{if (document.images)
	{
         	whichButton = which +"_button";
		newButton = buttonOff[whichButton];
		if(buttonOff[whichButton]) document.images[whichButton].src=buttonOff[whichButton].src;
		return true;
	}
}

/// Bonusprogramm Popup
function pop_up(url,name,width,height)
{
	my_pop_up= window.open(url,name,'width='+ width + ',height=' + height + ',left=0,top=0,scrolling=auto,resizable=yes');
}
/// Bonusprogramm Popup
function pop_survey(url,name,width,height)
{
	my_pop_up= window.open(url,name,'width='+ width + ',height=' + height + ',left=0,top=0,scrollbars=1,scrolling=auto,resizable=yes');
}
// Popup Hilfe beim Warenkorb
function pop_upHilfe(url,name,width,height)
{
	my_pop_up= window.open(url,name,'width='+ width + ',height=' + height + 'left=0,top=0,scrollbars=1,resizable=no');
}

// Radiobuttonsaktivieren
function checkradio(feld,formname){
document.formel.elements[formname][feld].click();
}
function checkbox(formname,checkout){
if ((document.formel.elements[formname].checked == true) && (checkout >=0)){
document.formel.elements[formname].click();
}
if ((document.formel.elements[formname].checked == false)&& (checkout ==1))
{
document.formel.elements[formname].click();
}
}

// CSS MAC PC?
system = navigator.platform.substring(0,3);

var whichCss = '';
var version = parseFloat(navigator.appVersion.substr(0,navigator.appVersion.indexOf(' ')));

if (system == "Mac"){ //Mac
		if ((document.getElementById)&&(document.all)){ //IE 5
		var whichCss = 'standard.css';
		document.write('<link rel="stylesheet" href="'+cssPfad+whichCss+'" type="text/css">');
				}
		else if (document.all){ //IE
		var whichCss = 'standard_mac.css';
		document.write('<link rel="stylesheet" href="'+cssPfad+whichCss+'" type="text/css">');
		}
		else if (document.layers){ //NS4x
		var whichCss = 'standard_mac.css';
		document.write('<link rel="stylesheet" href="'+cssPfad+whichCss+'" type="text/css">');
		}
		else if (document.getElementById){ //NS6
		var whichCss = 'standard.css';
		document.write('<link rel="stylesheet" href="'+cssPfad+whichCss+'" type="text/css">');
		}
	}
else if (system == "Win"){ //Win all
		var whichCss = 'standard.css';
		document.write('<link rel="stylesheet" href="'+cssPfad+whichCss+'" type="text/css">');
			}
// direktsuche nichts ausgewaehlt
function ausgewaehlt(){
if (document.qform.Quickaccess.options[document.qform.Quickaccess.selectedIndex].value != ""){
if (document.qform.Quickaccess.options[document.qform.Quickaccess.selectedIndex].value == "jobs")
{window.open("http://www.blume2000.de/franchise/ueber_uns/jobs_blume2000.html");}
else if (document.qform.Quickaccess.options[document.qform.Quickaccess.selectedIndex].value == "filialsuche")
{window.open("http://www.blume2000.de/franchise/aktuell/startseite.html");}
else {document.qform.Quickaccess.form.submit();}
}
}
