﻿function swapHint(id, text) {
    var o = document.getElementById(id);
    if (o != null) {
        o.onfocus = function() {
	        if (this.value == text) {
		        this.value = '';
	        }
        }
        o.onblur = function() {
	        if (this.value == '') {
		        this.value = text;
	        }
        }  
        o.onblur();
    }
}

function disableAndSubmit(obj, str) {
    obj.disabled = true;
    obj.value = str;
    obj.form.submit();
}