var win = null;

function openUrl (url)  {
    window.location = url
}
        
function openPopupSmall (url)  {
    var w, h;
    w = 250;
    h = 280;
                
    if (win && win.open) {
        if (win.closed){
            win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
        } else {
            win.focus();
            win.resizeTo(w,h)
            win.location = url
        }
    } else {
        win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
    }
}
            
function openPopupMedium (url)  {
    var w, h;
    w = 450;
    h = 350;
                
    if (win && win.open) {
        if (win.closed){
            win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
        } else {
            win.focus();
            win.resizeTo(w,h)
            win.location = url
        }
    } else {
        win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
    }
}
            
function openPopupLarge (url)  {
    var w, h;
    w = 525;
    h = 700;
                
    if (win && win.open) {
        if (win.closed){
            win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
        } else {
            win.focus();
            win.resizeTo(w,h)
            win.location = url
        }
    } else {
        win = window.open(url, 'popUp', 'width='+w+',height='+h+',left=0,top=0,resizable=yes,menubar=no,scrollbars=no')
    }
}

function openNewBrowser(url) {
    win = window.open(url)
}


function demoPopUp(sp)
{
    if (sp == 'fast')
    {
        popUpWindow('/SenseoUS/senseo320x240.html', 320, 270);
        
    } else {
        popUpWindow('/SenseoUS/senseo240x180.html', 240, 210)
    }
}

function demoPopUpEx(sp,prefix)
{
    if (sp == 'fast')
    {
        popUpWindow('/SenseoUS/'+prefix+'_senseo320x240.html', 320, 270);
        
    } else {
        popUpWindow('/SenseoUS/'+prefix+'_senseo240x180.html', 240, 210)
    }
}

var popUpWin=0;
function popUpWindow(URLStr, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'InActionDemoWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height);
}

var popUpWin1=0;
function productPopUpWindow(URLStr, width, height)
{
  if(popUpWin1)
  {
    if(!popUpWin1.closed) popUpWin1.close();
  }
  popUpWin1 = open(URLStr, 'Senseo', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height);
}

var popUpWin2=0;
function popUpWindowPos(URLStr, width, height, top, left)
{
  if(popUpWin2)
  {
    if(!popUpWin2.closed) popUpWin2.close();
  }
  popUpWin2 = open(URLStr, 'TUIWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',top='+top+',left='+left);
}


var popUpWin3=0;
function popUpWindowWithScroll(URLStr, width, height, top, left)
{
  if(popUpWin3)
  {
    if(!popUpWin3.closed) popUpWin3.close();
  }
  popUpWin3 = open(URLStr, 'ScrollYes', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',top='+top+',left='+left);
}



function openPopupAnnonce(url)  {
    var w, h;
    w = 830;
    h = 521;
                
    if (win && win.open) {
        if (win.closed){
            win = window.open(url, 'popUpAnnonce', 'width='+w+',height='+h+',resizable=no,menubar=no,scrollbars=no,status=no')
        } else {
            win.focus();
            win.resizeTo(w,h)
            win.location = url
        }
    } else {
        win = window.open(url, 'popUpAnnonce', 'width='+w+',height='+h+',resizable=no,menubar=no,scrollbars=no,status=no')
    }
}
