﻿/* efolder */
function openEfolder(u) {
    var EfolderWindow = window.open(u, '_blank', 'left=10,top=10,toolbar=0,menubar=0,scrollbars=1,status=0,location=0,width=960,height=700');
    if (EfolderWindow == null)
        alert('Please turn off your popup-blocker');
    else
        EfolderWindow.focus();
}

/* search */
function StartSearch(TextboxID, WatermarkText) {
    var search = $get(TextboxID).value.trim();
    if (search != '' && search != WatermarkText)
        document.location.href = "/search.aspx?query=" + encodeURIComponent(search);
    return false;
}

/* menu */
var menuTimeoutID;
var menuLast;
function show(elementid) {
    if (menuLast == elementid)
        clearTimeout(menuTimeoutID);
    else if (menuLast != null)
        $get(menuLast).style.display = 'none';
    menuLast = elementid;
    $get(elementid).style.display = 'inline';
}

function hide(elementid) {
    menuTimeoutID = setTimeout("$get('" + elementid + "').style.display = 'none';", 300);
}


/* watermark textbox */
function WaterBoxFocus(txt, WatermarkText) {
    if (txt.value == WatermarkText) {
        txt.value = '';
        txt.className = '';
    }
}
function WaterBoxBlur(txt, WatermarkText) {
    if (txt.value == '') {
        txt.className = 'water';
        txt.value = WatermarkText;
    }
}
function WaterBoxPwdBlur(pwd, txtid) {
    if (pwd.value == '') {
        pwd.style.display = 'none';
        $get(txtid).style.display = 'inline';
    }
}
function WaterBoxPwdShow(note, pwdid) {
    note.style.display = 'none';
    $get(pwdid).style.display = 'inline';
    $get(pwdid).focus();
}

