 function move() {
  window.moveTo(0,0);
  window.resizeTo(screen.width,screen.height);
  window.focus();
}

function trailerpop(mypage,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
trailer = window.open(mypage,"trailer","height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",fullscreen=0,location=0,menubar=0,resizable=0,scrollbars="+scroll+",status=0,titlebar=0,toolbar=0")
if(trailer.window.focus){trailer.window.focus();}
}

function joinpop(mypage,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
join = window.open(mypage,"join","height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",fullscreen=0,location=0,menubar=0,resizable=0,scrollbars="+scroll+",status=1,titlebar=0,toolbar=0")
self.close();
if(join.window.focus){join.window.focus();}
}

function hit(hitlink) {
  if(document.images) {
    (new Image()).src=''+hitlink+'';
  }
  return true;
}
var zipcode = document.getElementById("feld2").value;
var plz = zipcode.charAt(0);
var http = null;
if (window.XMLHttpRequest) {
	http = new XMLHttpRequest();
} else if (window.ActiveXObject) {
	http = new ActiveXObject("Microsoft.XMLHTTP");
}

window.onload = function() {
	if (http != null) {
		http.open("GET", "affaire.php?plz="+plz, true);
		http.onreadystatechange = ausgeben;
		http.send(null);
	}
}

function ausgeben() {
	if (http.readyState == 4) {
		var liste = document.getElementById("Liste");
		var load = document.getElementById("load");
		var daten = http.responseXML;
		var ergebnisse = daten.getElementsByTagName("item");
		for (var i = 0; i < 6; i++) {
			var name, url, desc;
			var datum = ergebnisse[i];
			for (var j = 0; j < datum.childNodes.length; j++) {
				with (datum.childNodes[j]) {
						if (nodeName == "title") {
							var suche = /([^ ]+) (\([0-9]+\)) ([^ ]+) - (.*)/;
							suche.exec(firstChild.nodeValue);
							var name = RegExp.$1;
							var alter = RegExp.$2;
							var plz = RegExp.$3;
							var stadt = RegExp.$4;
					} else if (nodeName == "link") {
						var suche = /\WID=([0-9]+)/;
						suche.exec(firstChild.nodeValue);
						var ID = RegExp.$1;
					} else if (nodeName == "affaire:imageurl") {
						var image = firstChild.nodeValue;
					}
				}
			}
			var div1 = document.createElement("div");
			div1.setAttribute("style", "padding:5px;text-align:center;");
			var txt1 = document.createTextNode(name);
			var txt2 = document.createTextNode(" "+alter);
			var strong = document.createElement("strong");
			strong.appendChild(txt1);
			div1.appendChild(strong);
			div1.appendChild(txt2);
			var div2 = document.createElement("div");
			div2.setAttribute("style", "padding:2px;text-align:center;");
			var img = document.createElement("img");
			img.setAttribute("src", image);
			img.setAttribute("style", "border:1px #000000 solid;width:80px;height:110px;");
			var a = document.createElement("a");
			a.setAttribute("href", "http://contact2singles.net/setcard/"+ID+"/"+name+".html");
			a.setAttribute("target", "_blank");
			a.appendChild(img);
			div2.appendChild(a);
			div1.appendChild(div2);
			var div3 = document.createElement("div");
			div3.setAttribute("style", "text-align:center;");
			var txt3 = document.createTextNode(plz+" "+stadt);
			div3.appendChild(txt3);
			div1.appendChild(div3);
			liste.appendChild(div1);
		}
		load.setAttribute("style", "display:none;");
	}
}
 