function openPopup (url,width,height,scroll) {
    if (width == null || width==0) { width = screen.availWidth; LeftPosition=screen.availWidth }
    else {LeftPosition = (screen.availWidth) ? (screen.availWidth-width)/2 : 0; }
    if (height == null || height==0) { height = screen.availHeight * 0.8; TopPosition=screen.availHeight * 0.1 }
    else { TopPosition = (screen.availHeight) ? (screen.availHeight-height)/2 : 0; }

    if (scroll == null) {
	scroll = 'yes';
    }
    settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status,resizable';
    win = window.open(url,'',settings)
}

function changeSnap(url) {
    document.getElementById('top_snap').src = 'http://mozshot.nemui.org/shot/320x320?' + url;
}

function openPopup (url,width,height,scroll) {
    if (width == null || width==0) { width = screen.availWidth; LeftPosition=screen.availWidth }
    else {LeftPosition = (screen.availWidth) ? (screen.availWidth-width)/2 : 0; }
    if (height == null || height==0) { height = screen.availHeight * 0.8; TopPosition=screen.availHeight * 0.1 }
    else { TopPosition = (screen.availHeight) ? (screen.availHeight-height)/2 : 0; }

    if (scroll == null) {
	scroll = 'yes';
    }
    settings = 'height='+height+',width='+width+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status,resizable';
    win = window.open(url,'',settings)
}
function popup (str) { 
    document.getElementById(str).style.display = ""; 
} 
function popdown (str) { 
    document.getElementById(str).style.display = "none"; 
} 
