function IsBlocked(popupwin){
if(!popupwin) return true;
try{
return popupwin.closed;
}
catch(e){
return true;
}
 }

function PopupWindow(){
return NewPopup("", screen.height, screen.width, (screen.availWidth/2), (screen.availHeight/2));
}

function BrowserWindow(){
return NewWindow("", screen.height, screen.width, (screen.availWidth/2), (screen.availHeight/2));
}

function ModelessWindow(){
if(document.all && document.getElementById){
return window.showModelessDialog("/freescan/sample.htm");
}
else return PopupWindow();
}

function ChannelWindow(){
return window.open("", "", "channelmode=yes");
}

function FullscreenWindow(){
return window.open("", "", "fullscreen=yes");
}

function NewPopup(url, name, top, left, width, height){
return window.open(url, name, "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",menubar=no,location=no,status=no,toolbar=no,scrollbars=no");
}

function NewWindow(url, name, top, left, width, height){
return window.open(url, name, "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",menubar=yes,location=yes,status=yes,toolbar=yes,scrollbars=yes");
}