//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// by quirksmode http://www.hypergeneric.com/corpus/javascript-inner-viewport-resize/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function GetInnerSize () {
		var x,y;
		if (self.innerHeight) // all except Explorer
		{
			x = self.innerWidth;
			y = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			x = document.documentElement.clientWidth;
			y = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
			x = document.body.clientWidth;
			y = document.body.clientHeight;
		}
		return [x,y];
	}

	function ResizeToInner (w, h, x, y) {
		// make sure we have a final x/y value
		// pick one or the other windows value, not both
		if (x==undefined) x = window.screenLeft || window.screenX;
		if (y==undefined) y = window.screenTop || window.screenY;
		// for now, move the window to the top left
		// then resize to the maximum viewable dimension possible
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth,screen.availHeight);
		// now that we have set the browser to it's biggest possible size
		// get the inner dimensions.  the offset is the difference.
		var inner = GetInnerSize();
		var ox = screen.availWidth-inner[0];
		var oy = screen.availHeight-inner[1];
		// now that we have an offset value, size the browser
		// and position it
		window.resizeTo(w+ox, h+oy);
		window.moveTo(x,y);
	}

	// following only does resite to w and h
	function ResizeOnly (w, h,x,y) {
		// make sure we have a final x/y value
		// pick one or the other windows value, not both
		x = window.screenLeft || window.screenX;
		y = window.screenTop || window.screenY;
		// for now, move the window to the top left
		// then resize to the maximum viewable dimension possible
		window.moveTo(0,0);
		window.resizeTo(screen.availWidth,screen.availHeight);
		// now that we have set the browser to it's biggest possible size
		// get the inner dimensions.  the offset is the difference.
		var inner = GetInnerSize();
		var ox = screen.availWidth-inner[0];
		var oy = screen.availHeight-inner[1];
		// now that we have an offset value, size the browser
		// and position it
		window.resizeTo(w+ox, h+oy);
		window.moveTo(x,y);
	}

	function quanten_resize()
	{
		ResizeToInner (1024, 647, 0, 0);
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//function roll(img_name1, img_src1, img_name2, img_src2)
	function roll(img_name1, img_src1)
	{
		//alert("roll: " + img_src1);
	   //////document[img_name1].src = img_src1;
	   //document.getElementById(img_name1).src = img_src1;
	   if(div_ref(img_name1)) div_ref(img_name1).src = img_src1;

	   //document[img_name2].src = img_src2;
	}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// hide mail address, could be even in 2 functions
	function noSpam()
	{
		var locationstring;
		locationstring = "";
		locationstring += "";
		locationstring += "ma";
		locationstring += "";
		locationstring += "il";
		locationstring += "";
		locationstring += "to";
		locationstring += ":";
		locationstring += "";
		locationstring += "info";
		locationstring += "";
		locationstring += "@";
		locationstring += "";
		locationstring += "m-";
		locationstring += "pire";
		locationstring += ".";
		locationstring += "";
		locationstring += "co";
		locationstring += "m";
		locationstring += "?";
		locationstring += "sub";
		locationstring += "ject";
		locationstring += "=";
		locationstring += "1001";
		locationstring += " suns";
		locationstring += " shine!";
		locationstring += "";
		locationstring += "";
		locationstring += "";
		window.location = locationstring;
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//var allDivs = document.getElementsByTagName('div');
//var divWithId = document.getElementById('MyDivsId');



	// http://www.wendenburg.de/jstipps/divref.php

	 // Funktion zur Referenzierung von Div-Layern
	function div_ref (id) {
		if      (document.layers && document.layers[id])         return document.layers[id];         // NC 4
		else if (document.all && document.all[id])            return document.all[id];            // IE 4
		else if (document.getElementById && document.getElementById(id)) return document.getElementById(id); // DOM
		else                              return null;
	}

    // Funktion zur Referenzierung von Div-Layern mit Zugriff auf CSS-Eigenschaften
	function div_ref_style (id) 
	{
    	var ret;
		if      (document.layers && document.layers[id])         ret = document.layers[id].style;
		else if (document.all && document.all[id])            ret = document.all[id].style;
		else if (document.getElementById && document.getElementById(id)) ret = document.getElementById(id).style;
		else                              ret = null;

        //alert ("id: " + id + " ret: " + ret)

        return ret;
	}

// Funktion zum Zeigen und Verstecken von Div-Layern
	function show_hide (id,stat) {
		if(div_ref_style(id)) div_ref_style(id).visibility =  stat? "visible" : "hidden";
	}

	function div_on_off (id,stat) {
		if(div_ref_style(id)) div_ref_style(id).visibility =  stat? "visible" : "hidden";
	}

	////////////////////////////////////////
	// function div_switch
	// somehow this must sty local here
	// may only include DIVs that are in local file!!!!

	function div_toggle_OLDXXXX(e)
	{
		e.style.visibility = e.style.visibility == "visible" ? "hidden" : "visible"
	}

	function div_off_OLDXXXXX(e)
	{
		e.style.visibility =  "hidden"
	}


	// document.getElementById('DivIntrotext').style.visibility = 'visible';
	function div_on(div_name_str)
	{
		//alert("div_on");
		//document.getElementById(div_name_str).style.visibility = 'visible';
		div_on_off (div_name_str,1);
	}

	function div_off(div_name_str)
	{
		div_on_off (div_name_str,0);
	}

	function div_toggle(div_name_str)
	{
		//document.getElementById(div_name_str).style.visibility = document.getElementById(div_name_str).style.visibility == "visible" ? "hidden" : "visible"
		if(div_ref_style(div_name_str)) div_ref_style(div_name_str).visibility = div_ref_style(div_name_str).visibility == "visible" ? "hidden" : "visible"
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// this will write a layer plus a shaded block same size, needs stylesheet
	function div_shadow(id, text)
	{
		var s = "";
		//alert("div_shadow: id: " + id + " text: " + text);

		s = s + "<div id=\'" + id + "\'>";
		s = s + 	"<div class=\'textbox\'>";
		s = s + 		text;
		s = s + 	"<\/div>";
		s = s + 	"<div class=\'darkbox\'>";
		s = s + 		text;
		s = s + 	"<\/div>";
		s = s + "<\/div>";
		s = s + "";

		//alert("s: " + s);

		document.write(s);
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
	function mytest(s)
	{
		alert("mytest: " + s);
	}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// google translate

	function write_iframe(url)
	{
		var t = "";

		t = "";
		t = t + "<iframe src=\"";
		t = t + url;
		t = t + "\"  ";


		t = t + "style=\"";
		//t = t + "position:absolute;";
		t = t + "position:relative;";
		t = t + "margins:0px;padding:0px;";
		t = t + "top:0px; left:0px; width:1024px; height:647px;";
		t = t + "border-width:0px;border-color:#ff0033; border-style:dotted;";
		t = t + "overflow:auto;";
		t = t + "\"";

		t = t + ">";

		t = t + "your browser does NOT support IFRAMES"
		t = t + "</iframe><br />";

		//alert("write_iframe: " + t);

		document.write(t);
	}

	function gtrans_create_url(url, slang, tlang)
	{
		// returns a URL that will translate a google text
		// THIS IS CRUCIAL AND GOOGLE SPECIFIC
		// fr de ar iw hewbrew hi ja ru  zh-CN zh-TW es
		// http://translate.google.com/translate_c?hl=en&sl=en&tl=de&u=http://quantengeist.com/fallingforest/480x360/text_uk.html

		//            http://66.102.9.104/translate_c?hl=en&sl=en&tl=de&u=http://quantengeist.com/fallingforest/480x360/text_uk.html
		//http://66.102.9.104/translate_c?hl=en&sl=en&tl=es&u=http://quantengeist.com/fallingforest/480x360/text_uk.html&usg=ALkJrhgTZRFeSd4ZRTuDv1Dz8XJwflnlIA

		var t = "";

		t = t + "http://translate.google.com/translate_c?hl=en";
		//t = t + "http://66.102.9.104/translate_c?hl=en";
		t = t + "&sl=";
		t = t + slang;
		t = t + "&tl=";
		t = t + tlang;
		t = t + "&u=";
		t = t + url;
		//t = t + "&usg=ALkJrhgTZRFeSd4ZRTuDv1Dz8XJwflnlIA";

		//alert(t);

		return(t);
	}

	function gtrans_write_iframe(url, slang, tlang)
	{
		//document.write("translated: " + slang + " >> " + tlang + " <i>" + url + "</i>");
		//document.write("translated: " + slang + " >> " + tlang);
		write_iframe( gtrans_create_url(url, slang, tlang) );
	}

	function gtrans_create_page(url, slang, tlang)
	{
		// creates a page that shows the appropriate translation in an IFRAME with gtrans_write_iframe
		//alert("gtrans_create_page");
		document.open();
		document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
		document.write("<html><head>");
		document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />");
		document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"http://quantengeist.com/quanten.css\">");
		document.write("<title>Quantengeist translated</title>");
		document.write("</head>");
		document.write("<body style=\"overflow:scroll;\">");

		document.write("<div style=\"position:absolute;margins:0px;padding:0px;top:0px; left:0px; width:1024px;\">");
			gtrans_write_iframe(url, slang, tlang);
		document.write("</div>");

		document.write("<div style=\"position:absolute;margins:0px;padding:0px;top:0px;left:0px;width:1024px;background-color:black;\">");
			document.write("<a href=\"javascript:history.back();\">go back</a> ");
			document.write("| robotranslated: " + slang + " >> " + tlang + " | <i>" + url + "</i><br />");
		document.write("</div>");

		document.write("</body>");
		document.write("</html>");
		document.close();
	}

	function gtrans_write_link(url, slang, tlang)
	{
		// ease the use of gtrans_write_menu
		var t = "";

		t = t + "<a href=\"javascript:gtrans_create_page(\'";
		t = t + url;
		t = t + "\',\'";
		t = t + slang;
		t = t + "\',\'";
		t = t + tlang;
		t = t + "\');\">";
		t = t + tlang;
		t = t + "</a>";
		t = t + "  ";
		t = t + "";
		//alert("gtrans_write_link: " + t);
		document.write(t);
	}

	function gtrans_write_link_original(url, slang)
	{
		// ease the use of gtrans_write_menu
		var t = "";

		t = t + "<a href=\"";
		t = t + url;
		t = t + "\">";
		t = t + slang;
		t = t + "</a>";
		t = t + "  ";
		t = t + "";
		//alert("gtrans_write_link: " + t);
		document.write(t);
	}
	function gtrans_write_menu(url, slang, desc)
	{
		// this func writes a menue for text and several translations
		// fr de ar iw hewbrew hi ja ru  zh-CN zh-TW es
		document.write(desc + " ");
		gtrans_write_link_original(url, slang);	//orig textpage
		document.write(" > ");
		gtrans_write_link(url,slang,'fr');
		gtrans_write_link(url,slang,'de');
		gtrans_write_link(url,slang,'es');
		gtrans_write_link(url,slang,'ru');
		gtrans_write_link(url,slang,'ja');
		gtrans_write_link(url,slang,'zh-CN');
		gtrans_write_link(url,slang,'ar');
		gtrans_write_link(url,slang,'hi');
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    function div_opacity100(e, trans)
    {
		if (e != null)
		{
			var element = document.getElementById(e);
			//alert("div_opacity100");
			
			if(element != null)
			{
				if (typeof (element.style.opacity) != 'undefined')
				{
					element.style.opacity = trans / 100.0;
					//alert(" MOZ");
				}
				else
				{
					element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + trans + ')';
					//alert(" IE");
				}
			}
		}
		else
		{
			//
		}
    }

    function div_opacity(e, trans)
    {
        div_opacity100(e, Math.round(trans * 100));
    }

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
   // http://home.arcor.de/martin.honnen/javascript/2008/01/test2008012201.html

    /*  use Effect.Fade(e, { duration: 0.4, from: 0, to: global_opacity }); INSTEAD
    	<script src="common/scripts/scriptaculous/scriptaculous.js?load=effects" type="text/javascript"></script>
    */
    function div_fade (e, from, to, step, current)
    {
        // ex: div_fade ('mlux', 0, 0.3, 0.1);
        // cuurent is only internally set and used

          var element = document.getElementById(e);

          //alert("fade " + from + " " + to + " " + current);
          if (typeof current == 'undefined') {
            current = from;
          }


          if (typeof element.style.opacity != 'undefined') {
            element.style.opacity = current;
          }
          else if (typeof element.style.filter != 'undefined') {
            element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (current * 100) + ')';
          }

          if (from > to) {
            current -= step;
            current = Math.round(current * 100) / 100;
            if (current >= to) {
              setTimeout(function () { div_fade(e, from, to, step, current); }, 25);
            }
          }
          else {
            current += step;
            current = Math.round(current * 100) / 100;
            if (current <= to) {
              setTimeout(function () { div_fade(e, from, to, step, current); }, 25);
            }
          }
    }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////