
function disabledPostBack()
{
 if (event.keyCode == 13)
 {  //disable postback to server
  event.cancelBubble = true;
  event.returnValue = false;
 }
}

function openUpdateWindow(_controlFile)
{
window.open("/superAdmin/update.aspx?controlFile="+_controlFile,"window", "width=650, height=700, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no")
}

function openEmail(_groupID)
{
window.open("/email.aspx?groupID="+_groupID,"window", "width=425, height=600, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no")
}

function openScrollableUpdateWindow(_controlFile)
{
window.open("/superAdmin/update.aspx?controlFile="+_controlFile,"window", "width=650, height=500, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no")
}

function openHtmlWindow(_controlFile)
{
window.open("/superAdmin/update.aspx?controlFile="+_controlFile,"window", "width=650, height=500, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes")
}

function openImageWindow(_formElement)
{
window.open("/superAdmin/imageUpload.aspx?formElement="+_formElement,"window2", "width=550, height=400, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no")
}

function getRandomNum(lbound, ubound) {
return (Math.floor(Math.random() * (ubound - lbound)) + lbound);
}
function getRandomChar() {
var numberChars = "0123456789";
var lowerChars = "abcdefghijklmnopqrstuvwxyz";
var upperChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var charSet;
charSet += numberChars;
charSet += lowerChars;
charSet += upperChars;

return charSet.charAt(getRandomNum(0, 12));
}
function getPassword() {
var rc = "";
var length=12;
if (length > 0)
rc = rc + getRandomChar();
for (var idx = 1; idx < length; ++idx) {
rc = rc + getRandomChar();
}
return rc;
}

function openKatrinaEmail()
{
window.open('http://www.ceresgp.com/emailCRL.aspx','window', 'width=525, height=800, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=yes')
}