/* Smart Mover */
function getWinWidth() {

  if (document.layers)
    return(window.innerWidth);
  else if (document.all)
    return(document.body.clientWidth);
  else
    return(null);
}

function getWinHeight() {

  if (document.layers)
    return(window.innerHeight);
  else if (document.all)
    return(document.body.clientHeight);
  else
    return(null);
}


function nPop(p,w,h) // p = url, w = breite, h = höhe Bsp.: <a href='javascript:('seite','breite','hoehe')'>Text</a>
{

//        dhost = "http://kontur-networx.de/smartmover/";
        dhost = "http://kontur-networx.de/smartmover/";
        var popname = "bla";

        if(!w) {
        var w = 400;
        }
        if(!h) {
        var h = 380;
        }

        var ww = getWinWidth();
        var wh = getWinHeight();

        if(ww > w) {
        var posx = (ww - w) / 2 ;
        } else {
        var posx = 10;
        }

        if(ww > w) {
        var posy = (wh - h) / 2 ;
        } else {
        var posy = 10;
        }
//        alert(dhost+p);
        tPop = window.open(dhost+p,popname,'location=no,scrollbars=no,resizable=no,top='+posy+',left='+posx+',width='+w+',height='+h+'');
        tPop.focus();
}

