// Windows, IE 5.5 / 5.01 / 6, Firefox 1.0.1, Opera// Mac, Safari 1.2.4 / Netscape 7.2 / Firefox 1.0.2//// IE6	document.documentElement.scrollTop// IE5+	document.body.scrollTop// Saf	window.pageYOffset// NN	window.pageYOffset// FF	window.pageYOffsetvar topAlert1 = 0; // variables to interpret scrollTop or pageYOffset are interpreted problematically, if they stay 0 the scroll won't stop, topAlert is set to 1 if the scrollTop stays 0var alertCounter1 = 0;var alertCounterCheck1 = 0;var topAlert2 = 0;var alertCounter2 = 0;var alertCounterCheck2 = 0;var topAlert3 = 0;var alertCounter3 = 0;var alertCounterCheck3 = 0;function scrollPage() {	if (document.valuesform.json.value == 1) {		var scrollDelay = 16; // > 0		// Safari, Navigator, Firefox		if (!topAlert1 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && document.getElementById(scrollElement).offsetTop != null && window.pageYOffset != null) {			// checks if scroll is moving			if (alertCounterCheck1 < 3) {				alertCounterCheck1++;				if (window.pageYOffset == 0) {					alertCounter1++;				}				if (alertCounterCheck1 > 1 && alertCounter1 == alertCounterCheck1) {					topAlert1 = 1;				}			}			if (window.pageYOffset < document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.ceil((document.getElementById(scrollElement).offsetTop - window.pageYOffset) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (window.pageYOffset == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			} else if (window.pageYOffset > document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.floor((document.getElementById(scrollElement).offsetTop - window.pageYOffset) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (window.pageYOffset == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			}		// IE6		} else if (!topAlert2 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && document.getElementById(scrollElement).offsetTop != null && document.documentElement.scrollTop != null) {			// checks if scroll is moving			if (alertCounterCheck2 < 3) {				alertCounterCheck2++;				if (document.documentElement.scrollTop == 0) {					alertCounter2++;				}				if (alertCounterCheck2 > 1 && alertCounter2 == alertCounterCheck2) {					topAlert2 = 1;				}			}			if (document.documentElement.scrollTop < document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.ceil((document.getElementById(scrollElement).offsetTop - document.documentElement.scrollTop) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (document.documentElement.scrollTop == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			} else if (document.documentElement.scrollTop > document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.floor((document.getElementById(scrollElement).offsetTop - document.documentElement.scrollTop) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (document.documentElement.scrollTop == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			}		// IE6-		} else if (!topAlert3 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && document.getElementById(scrollElement).offsetTop != null && document.body.scrollTop != null) {			// checks if scroll is moving			if (alertCounterCheck3 < 3) {				alertCounterCheck3++;				if (document.body.scrollTop == 0) {					alertCounter3++;				}				if (alertCounterCheck3 > 1 && alertCounter3 == alertCounterCheck3) {					topAlert3 = 1;				}			}			if (document.body.scrollTop < document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.ceil((document.getElementById(scrollElement).offsetTop - document.body.scrollTop) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (document.body.scrollTop == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			} else if (document.body.scrollTop > document.getElementById(scrollElement).offsetTop) {				window.scrollBy(0,Math.floor((document.getElementById(scrollElement).offsetTop - document.body.scrollTop) / scrollDelay));				scrollGo = setTimeout('scrollPage()',16);				if (document.body.scrollTop == document.getElementById(scrollElement).offsetTop) {					clearTimeout(scrollGo);					document.valuesform.scrollingon.value = 0;					if (document.valuesform.toload.value != 0) {						loadProject(document.valuesform.toload.value);						document.valuesform.toload.value = 0;					}				}			}		} else {			document.valuesform.json.value = 0;		}	}}var topAlertIm1 = 0; // variables to interpret scrollTop or pageYOffset are interpreted problematically, if they stay 0 the scroll won't stop, topAlert is set to 1 if the scrollTop stays 0var alertCounterIm1 = 0;var alertCounterCheckIm1 = 0;var topAlertIm2 = 0;var alertCounterIm2 = 0;var alertCounterCheckIm2 = 0;var topAlertIm3 = 0;var alertCounterIm3 = 0;var alertCounterCheckIm3 = 0;function scrollImage() {	if (document.valuesform.json.value == 1) {		if (document.valuesform.textloading.value == 0 && document.valuesform.imageloading.value == 0) {			var scrollDelay = 4; // > 0			// Safari, Navigator, Firefox			if (!topAlertIm1 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && window.frames[0].document.images[goImage - 1].offsetTop >= 0 && window.frames[0].window.pageYOffset != null) {				// checks if scroll is moving				if (alertCounterCheckIm1 < 3) {					alertCounterCheckIm1++;					if (window.frames[0].window.pageYOffset == 0) {						alertCounterIm1++;					}					if (alertCounterCheckIm1 > 1 && alertCounterIm1 == alertCounterCheckIm1) {						topAlertIm1 = 1;					}				}				if (window.frames[0].window.pageYOffset < window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.ceil((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].window.pageYOffset) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].window.pageYOffset == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				} else if (window.frames[0].window.pageYOffset > window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.floor((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].window.pageYOffset) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].window.pageYOffset == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				}			// IE6			} else if (!topAlertIm2 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && window.frames[0].document.images[goImage - 1].offsetTop != null && window.frames[0].document.documentElement.scrollTop != null) {				// checks if scroll is moving				if (alertCounterCheckIm2 < 3) {					alertCounterCheckIm2++;					if (window.frames[0].document.documentElement.scrollTop == 0) {						alertCounterIm2++;					}					if (alertCounterCheckIm2 > 1 && alertCounterIm2 == alertCounterCheckIm2) {						topAlertIm2 = 1;					}				}				if (window.frames[0].document.documentElement.scrollTop < window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.ceil((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].document.documentElement.scrollTop) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].document.documentElement.scrollTop == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				} else if (window.frames[0].document.documentElement.scrollTop > window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.floor((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].document.documentElement.scrollTop) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].document.documentElement.scrollTop == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				}			// IE6-			} else if (!topAlertIm3 && document.getElementById && window.scrollBy && setTimeout && clearTimeout && window.frames[0].document.images[goImage - 1].offsetTop != null && window.frames[0].document.body.scrollTop != null) {				// checks if scroll is moving				if (alertCounterCheckIm3 < 3) {					alertCounterCheckIm3++;					if (window.frames[0].document.body.scrollTop == 0) {						alertCounterIm3++;					}					if (alertCounterCheckIm3 > 1 && alertCounterIm3 == alertCounterCheckIm3) {						topAlertIm3 = 1;					}				}				if (window.frames[0].document.body.scrollTop < window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.ceil((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].document.body.scrollTop) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].document.body.scrollTop == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				} else if (window.frames[0].document.body.scrollTop > window.frames[0].document.images[goImage - 1].offsetTop) {					window.frames[0].window.scrollBy(0,Math.floor((window.frames[0].document.images[goImage - 1].offsetTop - window.frames[0].document.body.scrollTop) / scrollDelay));					scrollGo = setTimeout('scrollImage()',16);					if (window.frames[0].document.body.scrollTop == window.frames[0].document.images[goImage - 1].offsetTop) {						clearTimeout(scrollGo);						document.valuesform.scrollingon.value = 0;						threeMoment();					}				}			} else {				document.valuesform.json.value = 0;			}		}	}}function oneMoment() {	var oneMoment = '<h2 class="menu-item"' + '>previous image, next image, one moment please <' + '\/h2' + '>';	if (document.getElementById) {		document.getElementById('navimage').innerHTML = oneMoment;	} else if (document.all) {		document.all.navimage.innerHTML = oneMoment;	}}function threeMoment() {	var threeMoment = '<h2 class="menu-item"' + '><a href=".\/' + 'project1\/' + 'index.html" onClick="previousImage(' + ');if(document.valuesform.json.value == 1' + '){return false;' + '}">previous image' + '<\/' + 'a>, <a href=".\/' + 'project1\/' + 'index.html" onClick="nextImage(' + ');if(document.valuesform.json.value == 1' + '){return false;' + '}">next image<' + '\/a' + '>, '+ document.valuesform.imagecurrent.value + ' of ' + document.valuesform.imagetotal.value + '<' + '\/h2' + '>';	if (document.getElementById) {		document.getElementById('navimage').innerHTML = threeMoment;	} else if (document.all) {		document.all.navimage.innerHTML = threeMoment;	}}/************************************************ IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)* Visit DynamicDrive.com for hundreds of original DHTML scripts* This notice must stay intact for legal use***********************************************///Input the IDs of the IFRAMES you wish to dynamically resize to match its content height://Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:var iframeids=["galerie04"]//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):var iframehide="yes"var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]var FFextraHeight=parseFloat(getFFVersion)>=0.1? 0 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsersfunction resizeCaller() {var dyniframe=new Array()for (i=0; i<iframeids.length; i++){if (document.getElementById)resizeIframe(iframeids[i])//reveal iframe for lower end browsers? (see var above):if ((document.all || document.getElementById) && iframehide=="no"){var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])tempobj.style.display="block"}}}function resizeIframe(frameid){var currentfr=document.getElementById(frameid)if (currentfr && !window.opera){currentfr.style.display="block"if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntaxcurrentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntaxcurrentfr.height = currentfr.Document.body.scrollHeight;if (currentfr.addEventListener)currentfr.addEventListener("load", readjustIframe, false)else if (currentfr.attachEvent){currentfr.detachEvent("onload", readjustIframe) // Bug fix linecurrentfr.attachEvent("onload", readjustIframe)}}}function readjustIframe(loadevt) {var crossevt=(window.event)? event : loadevtvar iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElementif (iframeroot)resizeIframe(iframeroot.id);}function loadintoIframe(iframeid, url){if (document.getElementById)document.getElementById(iframeid).src=url}if (window.addEventListener)window.addEventListener("load", resizeCaller, false)else if (window.attachEvent)window.attachEvent("onload", resizeCaller)elsewindow.onload=resizeCaller
