 pbilder = new Array("ahey.jpg",  "akaufmann.gif", "adomke.gif", "ameikolette.gif", "astreit.gif", "ahelms.gif", "ageorgios.gif", "araabe.gif", "avesuvio.gif", "aratsapo.gif", "amueller.gif", "areifendienst.gif", "amarktkauf.gif",  "aramm.gif", "akieker.gif", "acavallino.gif", "aspethmann.jpg", "apetra.gif", "akoegel.gif", "abkuhlmann.gif");
 padressen = new Array( "2!http://www.tanz-treff-hey.de!0", "0!0!0!0", "0!0!0!0", "2!http://www.meikolette.de!0!0", "2!http://www.streit-metallbau.de!0!0", "2!http://www.helms-holzbau.de!0!0", "0!0!0!0", "2!http://www.raabe-bedachungen.de/", "2!http://www.vesuvio-lemgo.de/", "2!http://www.rats-apotheke-lemgo.de", "2!http://www.sh-mueller.com", "2!http://www.juergensreifendienst.de", "2!http://www.marktkauf.de", "2!http://www.festoolshop-ramm.de!0", "2!http://www.lippe-news.de/werbung/kieker/kieker.htm!0", "2!http://www.eiscafe-cavallino.de", "2!http://www.verlag-spethmann.de", "2!http://www.petras-wasserbettenparadies.de!0!0", "0!0!0!0", "2!http://www.brillen-kuhlmann.de");
 
 anzahl_bilder   = Math.floor(pbilder.length);
 pbilder_1 = new Array();
 pbilder_1 = pbilder_1.concat(pbilder)

 anzahl_bilder_1 = Math.floor(pbilder.length / 3);
 zufall=Math.random();
 zufall*=10;
 zufall=Math.ceil(zufall);
 zufall=zufall-1;

<!-- Öffnen der Seiten
//-->

function offnen_bild(page_name)
{
 F1 = open(page_name,"_blank","width=476,height=375,screenX=0,screenY=0");
}


function offnen(bild_name)
{
 xseite=" ";
 bild_name=eval('document.'+bild_name+'.src');
 bild_base=bild_name.slice(0,7);
 if ( bild_base != "http://" )
	{
	 bild_name = bild_name.substr(72,bild_name.length);
	}
 if ( bild_base == "http://" )
	{
	 bild_name = bild_name.substr(33,bild_name.length);
	}

	 for(i = 0; i < anzahl_bilder ; i++)
	  {
	   if ( pbilder_1[i] == bild_name )
		{
		 parameter = padressen[i].split("!");
		 if ( parameter[0] == "0" )
			{
			 xseite = "../werbung/sno_link.htm";
			 uebergabe = "width=400, height=200 ,screenX=100,screenY=100";		 
			}
		 if ( parameter[0] == "1" )
			{
			 xseite = "../werbung/"+parameter[1];
			 uebergabe = "width="+parameter[2]+",height="+parameter[3]+",screenX=100,screenY=100";
			}
		 if ( parameter[0] == "2" )
			{
			 xseite = parameter[1];
			 uebergabe = "";
			}
		}
          } 
        
 if ( xseite != " ")
	{	
	 F1 = open(xseite,"_blank",uebergabe);
	}
}






function schliessen_layer(layerName)
{
var layerRef="null",layerStyleRef="null",styleSwitch="null";
	var layerShowing="layer1";



if (navigator.appName == "Microsoft Internet Explorer ") 
	{
		layerStyleRef="layer.style.";
		layerRef="document.all";
		styleSwitch=".style";
                eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
        }else{
		eval=document.getElementById(layerName).style.visibility='hidden';
	}



 var myelem= document.getElementById(layerName); 
 myelem.style.visibility = "hidden"; 

 
}


function show_pic(page_name, imgwidth, imgheight)
{
 imgheight=imgheight+100;
 imgwidth=imgwidth+120;
 param="width="+imgwidth+",height="+imgheight+",screenX=0,screenY=0";
 F1 = open(page_name,"_blank", param);
}


<!-- ---------------------------------------------------- -->
<!-- Menü                                                 -->
<!-- ---------------------------------------------------- -->
// Determine browser and version.

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

// Global variable for tracking the currently active button.

var activeButton = null;

// Capture mouse clicks on the page so any active button can be
// deactivated.

if (browser.isIE)
  document.onmousedown = pageMousedown;
if (browser.isNS)
  document.addEventListener("mousedown", pageMousedown, true);

function pageMousedown(event) {

  var el;

  // If there is no active menu, exit.

  if (!activeButton)
    return;

  // Find the element that was clicked on.

  if (browser.isIE)
    el = window.event.srcElement;
  if (browser.isNS)
    el = (event.target.className ? event.target : event.target.parentNode);

  // If the active button was clicked on, exit.

  if (el == activeButton)
    return;

  // If the element clicked on was not a menu button or item, close the
  // active menu.

  if (el.className != "menuButton"  && el.className != "menuItem" &&
      el.className != "menuItemSep" && el.className != "menu")
    resetButton(activeButton);
}

function buttonClick(button, menuName) {

  // Blur focus from the link to remove that annoying outline.

  button.blur();

  // Associate the named menu to this button if not already done.

  if (!button.menu)
    button.menu = document.getElementById(menuName);

  // Reset the currently active button, if any.

  if (activeButton && activeButton != button)
    resetButton(activeButton);

  // Toggle the button's state.

  if (button.isDepressed)
    resetButton(button);
  else
    depressButton(button);

  return false;
}

function buttonMouseover(button, menuName) {

  // If any other button menu is active, deactivate it and activate this one.
  // Note: if this button has no menu, leave the active menu alone.

  if (activeButton && activeButton != button) {
    resetButton(activeButton);
//sim if (menuName)
//sim   buttonClick(button, menuName);
  }
}

function depressButton(button) {

  var w, dw, x, y;

  // Change the button's style class to make it look like it's depressed.

  button.className = "menuButtonActive";

  // For IE, set an explicit width on the first menu item. This will
  // cause link hovers to work on all the menu's items even when the
  // cursor is not over the link's text.

  if (browser.isIE && !button.menu.firstChild.style.width) {
    w = button.menu.firstChild.offsetWidth;
    button.menu.firstChild.style.width = w + "px";
    dw = button.menu.firstChild.offsetWidth - w;
    w -= dw;
    button.menu.firstChild.style.width = w + "px";
  }

  // Position the associated drop down menu under the button and
  // show it. Note that the position must be adjusted according to
  // browser, styling and positioning.

  x = getPageOffsetLeft(button);
  y = getPageOffsetTop(button) + button.offsetHeight;
  if (browser.isIE) {
    x += 2;
    y += 2;
  }
  if (browser.isNS && browser.version < 6.1)
    y--;

  // Position and show the menu.

  button.menu.style.left = x + "px";
  button.menu.style.top  = y + "px";
  button.menu.style.visibility = "visible";

  // Set button state and let the world know which button is
  // active.

  button.isDepressed = true;
  activeButton = button;
}

function resetButton(button) {

  // Restore the button's style class.

  button.className = "menuButton";

  // Hide the button's menu.

  if (button.menu)
    button.menu.style.visibility = "hidden";

  // Set button state and clear active menu global.

  button.isDepressed = false;
  activeButton = null;
}

function getPageOffsetLeft(el) {

  // Return the true x coordinate of an element relative to the page.

  return el.offsetLeft + (el.offsetParent ? getPageOffsetLeft(el.offsetParent) : 0);
}

function getPageOffsetTop(el) {

  // Return the true y coordinate of an element relative to the page.

  return el.offsetTop + (el.offsetParent ? getPageOffsetTop(el.offsetParent) : 0);
}



    var http_request = false;

    function MakeSurvey(url) {

	var wahl=0;
	var sizes=document.survey.wahl;
	for (i=0; i<sizes.length; i++) {
		if (sizes[i].checked==true) {
			wahl = sizes[i].value;
		}
	}

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }

        http_request.onreadystatechange = alertInhalt;
        http_request.open('POST', url, true);
	http_request.setRequestHeader('Pragma', 'no-cache');
	http_request.setRequestHeader('Cache-Control', 'must-revalidate');
	http_request.setRequestHeader('If-Modified-Since', document.lastModified);
	http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http_request.send('wahl=' + wahl + '&post=1&Abstimmen=1');
//	http_request.send('wahl=1&post=1&Abstimmen=1');


    }

    function ShowSurvey(url) {

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }

        http_request.onreadystatechange = alertInhalt;
        http_request.open('GET', url, true);
	http_request.setRequestHeader("Pragma", "no-cache");
	http_request.setRequestHeader("Cache-Control", "must-revalidate");
	http_request.setRequestHeader("If-Modified-Since", document.lastModified);
        http_request.send(null);

//      http_request.send(null);
//	http_request.send("wahl=" + document.getElementById("wahl").value);
//	alert(document.getElementById('wahl').value);
//	http_request.setRequestHeader("application/x-www-form-urlencoded");



    }

    function alertInhalt() {
        if (http_request.readyState == 4) {
            if (http_request.status == 200) {
		document.getElementById('survey').innerHTML=http_request.responseText;
            } else {
                alert('Bei dem Request ist ein Problem aufgetreten.');
            }
        }

    }
