/*
 * Copyright (c) 2006 University of Utah and the Flux Group.
 * All rights reserved.
 * This file is part of the Netbed/Emulab network testbed software.
 * In brief, you can't redistribute it or use it for commercial purposes,
 * and you must give appropriate credit and return improvements to Utah.
 * See the file LICENSE at the root of the source tree for details.
 * 
 */
function focus_text(textInput, defval) {
    if (textInput.value == defval) {
	textInput.value = "";
	textInput.className = "textInput";
    }
}

function blur_text(textInput, defval) {
    // Strip whitespace.
    var sval = textInput.value.replace(/(\s+)/ig, "");
    if (sval == "") {
	textInput.value = defval;
	textInput.className = "textInputEmpty";
    }
}
