def make_thumb_string(bigThumbURL, smallThumbURL, name, pdrive=False):
    if not bigThumbURL:
        return ''

    bigThumbURL = bigThumbURL + '/../'

    thumbStr = """
<A HREF="%(thumb_url)s" %(popup)s>%(anchor)s</A>
"""
    
    dict = {}
    dict['thumb_url'] = bigThumbURL
    dict['popup'] = ryw_view.make_explorer_popup_string(
        bigThumbURL, (ryw_view.POPUP_DIR_WIDTH, ryw_view.POPUP_DIR_HEIGHT),
        pdrive = pdrive)
    
    if smallThumbURL:
        imgAnchorStr = """
<IMG SRC="%(small_thumb_url)s" BORDER=0 TITLE="%(thumb_name)s">"""
        d2 = {}
        d2['thumb_name'] = name
        d2['small_thumb_url'] = smallThumbURL
        dict['anchor'] = imgAnchorStr % d2
    else:
        dict['anchor'] = name
        
    return thumbStr % dict
def make_dir_string(dURL, iconName, name):
    if not dURL:
        return ''


    #isLan = ryw.is_lan()
    isLan = False

    dStr = """<A HREF="%(d_url)s" %(popup)s>%(anchor)s</A>"""

    dict = {}
    dict['d_url'] = dURL
    dict['popup'] = ryw_view.make_explorer_popup_string(
        dURL, (ryw_view.POPUP_DIR_WIDTH, ryw_view.POPUP_DIR_HEIGHT),
        pdrive=isLan)

    iconImgStr = """
<IMG SRC="%(icon_name)s" BORDER=0 TITLE="%(title_name)s">"""
    d2 = {}

    if isLan:
        d2['icon_name'] = '/icons/p_folder.open.gif'
    else:
        d2['icon_name'] = iconName
    d2['title_name'] = name

    dict['anchor'] = iconImgStr % d2

    return dStr % dict
def print_explorer_string(auxiURL, subDir, title):

    isLan = ryw.is_lan()
    ryw.db_print('print_explorer_string: isLan: ' + repr(isLan), 46)
    
    theStr = """
<BR>    
<A HREF="%(the_url)s" %(popup)s>%(anchor)s</A>
"""
    dict = {}
    theURL = ryw_view.glue_auxi_URL(auxiURL, subDir, '', checkIt = False)
    dict['the_url'] = theURL
    dict['popup'] = ryw_view.make_explorer_popup_string(
        theURL, (ryw_view.POPUP_DIR_WIDTH, ryw_view.POPUP_DIR_HEIGHT),
        pdrive=isLan)
    
    anchorStr = """
<IMG SRC="%(iconImg)s" TITLE="%(title)s" BORDER=0>"""
    d2 = {}
    d2['title'] = title
    if isLan:
        d2['iconImg'] = '/icons/p_folder.gif'
    else:
        d2['iconImg'] = '/icons/folder.gif'
    dict['anchor'] = anchorStr % d2
    print theStr % dict