	//	----------- Image basic functions, change and replace -----------
	function newImage(arg) {
		if (document.images) {
			rslt = new Image();
			rslt.src = arg;
			return rslt;
		}
	}
	
	function changeImages() {
		if (document.images && (preloadFlag == true)) {
			for (var i=0; i<changeImages.arguments.length; i+=2) {
				document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			}
		}
	}
	
	var preloadFlag = false;
	function preloadImages() {
		if (document.images) {
			preloadFlag = true;
		}
	}

	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}


	//	Create and set up main image over / out arrays
	mainImageoff = new Array();
	mainImageon = new Array();
	
	//	Set up main image over / out arrays
	mainImageoff[0] = "graphics/nav_main_apotheke_off.png";
	mainImageon[0] = "graphics/nav_main_apotheke_on.png";
	mainImageoff[1] = "graphics/nav_main_produkte_off.png";
	mainImageon[1] = "graphics/nav_main_produkte_on.png";
	mainImageoff[2] = "graphics/nav_main_service_off.png";
	mainImageon[2] = "graphics/nav_main_service_on.png";
	mainImageoff[3] = "graphics/nav_main_aktuelles_off.png";
	mainImageon[3] = "graphics/nav_main_aktuelles_on.png";
	mainImageoff[4] = "graphics/nav_main_kontakt_off.png";
	mainImageon[4] = "graphics/nav_main_kontakt_on.png";
	

	//	----------- Image mouse over and out, active image functions -----------
	//	MouseOver function, set mouse over image number as parameter
	function setSubImagesMouseOver(MouseOverImage, ImageListOn, ImageListOff, ImageActive, PrefixString)
	{
		//	Loop all five buttons
		for (i = 0; i < 5; i++)
		{
			//	Continue if button is not a blank image
			if (ImageListOn[i] != "")
			{
				//	Continue if parameter mouse over image is current loop image number
				if (MouseOverImage == i)
				{
					//	Set mouse over image by current image loop number
					changeImages(PrefixString + i, ImageListOn[i]);
				}
				//	Continue if parameter mouse over image is noz current loop image number
				else
				{
					//	Continue if loop image number is not the active image
					if (ImageActive != i)
					{
						//	Set mouse out image by current image loop number
						changeImages(PrefixString + i, ImageListOff[i]);
					}
				}
			}
		}
	}
	
	
	//	MouseOut function
	function setSubImagesMouseOut(ImageListOn, ImageListOff, ImageActive, PrefixString)
	{
		//	Loop all five buttons
		for (i = 0; i < 5; i++)
		{
			//	Continue if button is not a blank image
			if (ImageListOn[i] != "")
			{
				//	Continue if loop image number is the active image
				if (ImageActive == i)
				{
					//	Set mouse over image by current image loop number
					changeImages(PrefixString + i, ImageListOn[i]);
				}
				//	Continue if loop image number is not the active image
				else
				{
					//	Set mouse out image by current image loop number
					changeImages(PrefixString + i, ImageListOff[i]);
				}
			}
		}
	}
	
	
	//	Set active sub image function
	function setSubImageActive(ArrayNumber)
	{
		//changeImages('subbutton0' + subImageActive, subImageoff[subImageActive]);
		
		//	Set active image
		subImageActive = ArrayNumber;
				
		//	Apply mouse out function, disable previous inactive image
		setSubImagesMouseOut(subImageon, subImageoff, subImageActive, 'subbutton0');
	}
	
	
	//	Set active main image function
	function setMainImageActive(ArrayNumber)
	{
		//	Set active image
		mainImageActive = ArrayNumber;
				
		//	Apply mouse out function, disable previous inactive image
		setSubImagesMouseOut(mainImageon, mainImageoff, mainImageActive, 'mainbutton0');
	}
	
	
	//	Change sub section image
	function setSubSectionImage(ImageFileName)
	{
		//	Set sub section image
		changeImages("subimagesection", ImageFileName);
	}
	
	
