/**
 * Change product's image src and the href attribute of the wrapping link. <img> must have id='prodimg' and <a> must have id='prodlink'
 * @param string imageUrl
 * @param string linkUrl
 * @return void
 */
function changeProductImage(imageUrl, linkUrl) {
	document.getElementById('prodlink').href = linkUrl;
	document.getElementById('prodimg').src = imageUrl;
}


/**
 * This is called when a master/slave selectbox was changed. The function changes
 * the formular's action field to value 'select_ms' and submit the formular.
 * @param HTML theForm: Pointer to the formular in document. Call function like this: submitMSselection(this.form);
 * @return void
 */
function submitMSselection(theForm) {
	theForm.action.value = 'select_ms'; // change action field
	theForm.submit(); // submit form
}



/*
 * start banner flow on start page
 */
$(document).ready(function(){
	$("#myController").jFlow({
		controller: ".jFlowControl", // must be class, use . sign
		slideWrapper : "#jFlowSlider", // must be id, use # sign
		slides: "#mySlides",  // the div where all your sliding divs are nested in
		selectedWrapper: "jFlowSelected",  // just pure text, no sign
		width: "675px",  // this is the width for the content-slider
		height: "254px",  // this is the height for the content-slider
		duration: 800,  // time in miliseconds to transition one slide
		prev: ".jFlowPrev", // must be class, use . sign
		next: ".jFlowNext", // must be class, use . sign
		auto: true	
    });
});

