function swapDisplay(obj){
    obj.style.display=obj.style.display=='none'?'inline':'none';
    return obj.style.display;
}
function swapDIVHide(obj){
    if(obj.style.display=='none')
    {
     obj.style.display = 'inline';
     obj.style.visibility='visible';
    } else
    {
      obj.style.display = 'none';
     obj.style.visibility='hidden';
    }
}
function openWindow(url, name, windowFeatures, w, h, alignment)
{

        if(alignment == "CENTER")
        {
         temp_wnd=window.open(url,name,windowFeatures+',height='+h+',width='+w+',top='+(screen.availHeight-h)/2+',left='+(screen.availWidth-w)/2);
        } else
        {
        temp_wnd=window.open(url,name,windowFeatures+',height='+h+',width='+w+',top='+0+',left='+0);
        if(alignment == "LEFT")
        {
                temp_wnd.moveTo(0,0);
                temp_wnd.resizeTo(w,screen.availHeight);
                top.moveTo(w,0);
                top.resizeTo(screen.availWidth-w,screen.availHeight);
        } else
        if(alignment == "RIGHT")
        {
                temp_wnd.moveTo(screen.availWidth-w,0);
                temp_wnd.resizeTo(w,screen.availHeight);
                top.moveTo(0,0);
                top.resizeTo(screen.availWidth-w,screen.availHeight);
        } else
        if(alignment == "TOP")
        {
                temp_wnd.moveTo(0,0);
                temp_wnd.resizeTo(screen.availWidth,h);
                top.moveTo(0,h);
                top.resizeTo(screen.availWidth,screen.availHeight-h);
        } else
        if(alignment == "BOTTOM")
        {
                temp_wnd.moveTo(0,screen.availHeight-h);
                temp_wnd.resizeTo(screen.availWidth,h);
                top.moveTo(0,0);
                top.resizeTo(screen.availWidth,screen.availHeight-h);
        }
        }
        temp_wnd.focus();
}