//  file: s-pop.js
//  description: öffnet ein Popup-Fenster
//  version: 1.0 - 16.07.2002
//  guen (C) OMNIWORX GbR

var win = null;
var pic = "";

function openwin(src, width, height) {
	if (win != null) {
		win.close();
	}
	win = null;
	win = window.open(src+".html","fenster1","width="+width+", height="+height+", personalbar=no, status=no, menubar=no, resizable=yes, location=no, scrollbars=no, dependent=no, screenX=100, screenY=100");	
	width = width + 40;
	height = height + 40;
	win.resizeTo(width, height);
	win.focus();
}


function closewin(src) {
	src.close();
}


function showPic(bild, width, height) {
	openwin("bild", width, height);
	pic = bild;
}


function getPic() {
	return pic;
}


function setPic() {
  pic = window.opener.getPic();
	var reg = new RegExp('bilder/foto\.gif');	
	var tmpPfad = document.pic.src.replace(reg, pic);		
	document.pic.src = tmpPfad; 
}

