/*

JavaScripts for all files of HG's WebSite

*/


// *********** Fill or Color Frames *********** 

	function FillFrames( logo, text, pos1, color1, pos2, color2, pos3, color3, pos4, color4 ) {
		if (logo) { parent.frames.Logo.location  = logo } ;
		if (text) { parent.frames.Main.location  = text } ;
		if (pos1) { parent.frames[pos1].document.bgColor = color1 } ;
		if (pos2) { parent.frames[pos2].document.bgColor = color2 } ;
		if (pos3) { parent.frames[pos3].document.bgColor = color3 } ;
		if (pos4) { parent.frames[pos4].document.bgColor = color4 } ;
	}
	
	function ColorFrame( pos, color ) {
		if (pos) { parent.frames[pos].document.bgColor = color } ;
	}
	

// *********** Toggle Logo Caption Visibility  *********** 

	function ToggleCaption( objID ) {
		if (objID.style.display == "none") {
			objID.style.display = "inline";
		}
		else {
			objID.style.display = "none";
		}
	}

	
// *********** Don't Allow Pinching Images *********** 

	function NoCopyMsg( e ) {
		if (navigator.userLanguage) {
			langCode = navigator.userLanguage; // IE
		}
		else {
			langCode = navigator.language; // NS
		}
		
		if (langCode == "de") {
			alert("Tut uns leid, Sie d\u00FCrfen dieses Bild nicht copieren.");
		} 
		else {
			alert("Sorry!  You may not copy this image.");
		} 
	return false;
	}

	function NoImgPinching() {
		if (document.images)
			for (i=0;i<document.images.length;i++)
				document.images[i].onmousedown = NoCopyMsg;
	}


// *********** Display Separate Window *********** 

	function SimpleWindow( url, hor, vert ) {
		window.open( url, '' , 'width=' + hor + ',height=' + vert + ',innerWidth=' + hor + ',innerHeight=' + vert + ',dependent,resizable,scrollbars' );
	// no spaces allowed in the "windowFeatures"-string !
	}


// *********** Display Window Size Alert *********** 

	function BrowserParams() {
		if (window.screen.availHeight < 740) {
			shVal = window.screen.height;
			
			if (navigator.userLanguage) {
				langCode = navigator.userLanguage; // IE
			}
			else {
				langCode = navigator.language; // NS
			}
			
			if (langCode == "de") {
				alert("Die Schirmh\u00F6he Ihres Monitors (" + shVal + " Pixel) reicht"
						+ "\nnicht aus zur korrekten Darstellung dieser WebSite."
						+ "\n(Mindestens 768 Pixel sind erforderlich).");
			} 
			else {
				alert("The screen height of your monitor (" + shVal + " pixels) is"
						+ "\ninsufficient for the proper display of this WebSite."
						+ "\n(At least 768 pixels are required.)");
			}
		}
	}
/*
The minimum inner height of the browser window for the correct display of the website is 640 pixels.
Toolbar height and surround of the browser window are about 140 pixels.
Consequently, the minimum "availHeight" of the screen must be 780 pixels.
A minimum "availHeight" of the screen of NS=748 pixels, IE=741 (12 inch TFT-Display height: 768 pixel) can be tolerated.
*/
