﻿function WatermarkFocus(txtElem, strWatermark) {
    if (txtElem.value == strWatermark) {
        txtElem.value = '';
    }
}

function WatermarkBlur(txtElem, strWatermark) {
    if (txtElem.value == '') {
        txtElem.value = strWatermark;
    }
}

function getQuerystring(key, default_) {
    if (default_ == null) default_ = "";
    key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
    var qs = regex.exec(window.location.href);
    if (qs == null)
        return default_;
    else
        return qs[1];
}
