
	function zxObject (zxName, zxSource) {
		with (zxSource? zxSource : window.document) {
			if (getElementById) { return getElementById(zxName); } else if (all) { return all (zxName); } else if (layers) { return layers (zxName); }
		}
	}

	var xPos = new Array ("top:0;left:426px;", "top:62px;left:610px;", "top:186px;left:794px;border-right:none;", "top:0;left:794px;border-right:none;");	 //, "top:124px;left:978px;"
	var xSrc = new Array ('cranio.jpg', 'portal.jpg', 'needles.jpg', 'backpain.jpg', 'lowermassage.jpg', 'arch.jpg', 'uppermassage.jpg', 'headache.jpg', 'neckmanip.jpg', 'exercise.jpg', 'footsteps.jpg', 'water.jpg', 'cranio.jpg', 'needles.jpg', 'blank.jpg', 'blank.jpg');
	var xSrcStatic = new Array ('cranio.jpg', 'portal.jpg', 'needles.jpg', 'backpain.jpg', 'lowermassage.jpg', 'arch.jpg', 'uppermassage.jpg', 'headache.jpg', 'neckmanip.jpg', 'exercise.jpg', 'footsteps.jpg');
	//var xAlt = new Array ('', '', 'Kraniosakral terapi', 'Fysioterapi', 'Akupunktur', 'Osteopati', 'Klinikken', 'Billede 8', 'Billede 9', 'Billede 10', 'Billede 11', 'Billede 12', 'Billede 13', 'Billede 14', 'Billede 15', 'Billede 16');
	var iWait = 0;

	var PreLoad = new Array ();
	var bFrontpage = (document.location.href.match(/index/) || ! document.location.href.match(/\.htm$/));

	function BodyLoaded () {
		SetActiveLink ();
		if (! bFrontpage) {
			var iPicture = parseInt (Math.random() * xSrcStatic.length);
			var xNewSrc = new Array ();
			for (var i = 0; i < xPos.length; i++) {
				if (iPicture + i == xSrcStatic.length) { iPicture -= xSrcStatic.length; }
				xNewSrc.push (xSrcStatic[iPicture + i]);
			}
			xSrc = xNewSrc;
			//xSrc = Array ('needles.jpg', 'backpain.jpg', 'cranio.jpg', 'portal.jpg');
		}
		var sHtml = '';
		//var iLeft = 484;
		for (var i = 0; i < xSrc.length; i++) {
			PreLoad[i] = new Image();
			PreLoad[i].src = 'images/Thumbs/' + xSrc[i];
			//PreLoad[i].alt = xAlt[i];
			if (i < xPos.length) {
				sHtml += '<img name="SlideShow' + i + '" src="images/Thumbs/blank.jpg" alt="" style="' + xPos[i] + '">';	//top:0;left:' + iLeft + 'px;		' + PreLoad[i].src + '		' + PreLoad[i].alt + '
				//iLeft += 169;
			}
		}
		zxObject ('Thumbs').innerHTML = sHtml;
		iTimeout = setTimeout ('runSlideShow()', iWait);
	}

	var iThumb = 0;
	var iPicture = 0;	 //xPos.length
	var iTimeout;
	function runSlideShow () {
		var oThumb = document.images['SlideShow' + iThumb];
		if (document.all) {
			oThumb.style.filter="blendTrans(duration=2)";
			oThumb.style.filter="blendTrans(duration=3)";
			oThumb.filters.blendTrans.Apply();
		}
		oThumb.src = PreLoad[iPicture].src;
		//oThumb.alt = PreLoad[iPicture].alt;
		if (document.all) {
			oThumb.filters.blendTrans.Play();
		}
		iThumb += 1; if (iThumb >= xPos.length) { iThumb = 0; iWait = 5000; }
		iPicture += 1; if (iPicture >= xSrc.length) { iPicture = 0; }
		if (iThumb > 0 || bFrontpage) {
			iTimeout = setTimeout ('runSlideShow()', iWait);
		}
	}

//==================================================

	function IterateLinks (zxID) {
		var zxLocation = document.location.href + (document.location.href.match(/\/$/)? 'index.htm' : '');
		aObj = document.getElementById(zxID).getElementsByTagName('a');
		for(var i=0; i<aObj.length; i++) {
			if (zxLocation.indexOf(aObj[i].href)>=0) {
				aObj[i].style.color = "#CC8000";	//aObj[i].className='Active';
			}
		}
	}
	function SetActiveLink () {
		IterateLinks ('BarMenu');
		IterateLinks ('SideMenu');
	}

