/*
 * zugängliche Popup-Funktionen
 */
 
// Default-Werte
var _POPUP_FEATURES = 'location=0,statusbar=0,menubar=0';

// poppt neues Fenster mit Optionen auf
function raw_popup(url, target, features, pW, pH) {
    var scrW = screen.availWidth;
    var scrH = screen.availHeight;
	scrX = (scrW - pW - 10) * .5;
	scrY = (scrH - pH - 30) * .5;
    if (isUndefined(features)) features = _POPUP_FEATURES;
    if (isUndefined(target  )) target   = '_blank';
    features += "width=" +pW + ",scrollbars=yes,height=" + pH + ",top=" + scrY + ",screenX=" + scrX + ",screenY=" + scrY;
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}

function link_popup(src, features,width,height) {
    // zu benutzen: <a href="..." onclick="link_popup(this,...)" ...
    return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features,width,height);
}

// MISC CLEANING-AFTER-MICROSOFT STUFF
function isUndefined(v) {
    var undef;
    return v===undef;
}

function lmapopup() {  
  var features = "location=0,statusbar=0,menubar=0,width=280,height=190,top=220,screenX=200,screenY=200";
  
  var theWindow = window.open('popup.php', '_blank', features);
  theWindow.focus();
  return theWindow;

}