﻿function opensmallwindow(page, sContent, height, width) {
    if (height == '')
        height = 300
    if (width == '')
        width = 525

    var sOpts = "resizable=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,height=" + height + ",width=" + width

    var OpenWin = window.open(page, "smWindow", sOpts);
    if (OpenWin != null) {
        if (sContent != '') {
            OpenWin.document.write(sContent);
            OpenWin.document.close();
        }
        OpenWin.focus();
    }

}

function clearDefault(el) {
    if (el.defaultValue == el.value) el.value = "";
    // If Dynamic Style is supported, clear the style
    if (el.style) el.style.cssText = "";

}
function getCookieSupport() {
    var persist = true;
    do {
        var c = 'gCStest=' + Math.floor(Math.random() * 100000000);
        document.cookie = persist ? c + ';expires=Tue, 01-Jan-2030 00:00:00 GMT' : c;
        if (document.cookie.indexOf(c) !== -1) {
            document.cookie = c + ';expires=Sat, 01-Jan-2000 00:00:00 GMT';
            return persist;
        }
    } while (!(persist = !persist));
    return null;
}
 


  function SetCookieSupportMsg(fld,msg) {
         var result = getCookieSupport();
         if (result == null || result == "") {
             document.getElementById(fld).innerHTML = msg;
             
         }
         else
             document.getElementById(fld).style.display ="";
      
     }

