//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//  DataGlyphics Inc. Copyright © 1998-2006. All Rights Reserved.  //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
function DoUploadProgress(sender)
{
if(sender.ProgressID && sender.userfile.value!='')
{
var strPid = sender.ProgressID.value;
sender.action+='?pid='+strPid;
openPopup('/upload_progress.asp?pid='+strPid,'UploadProgress','status,toolbar=false',250,120);
}
return true;
}
function focusPopup(objPopup,theURL,winName,features,width,height)
{
var blnIsOpen = true;
if (typeof(objPopup) != 'object') {
blnIsOpen = false;
} else if (objPopup.closed) {
blnIsOpen = false;
}
if (blnIsOpen== false) {
objPopup = returnPopup(theURL,winName,features,width,height);
}
objPopup.focus();
return objPopup;
}
function openPopup(theURL,winName,features,width,height)
{
var winWidth	= width;
var winHeight	= height;
var strWinSize	= ",width=" + winWidth + ",height=" + winHeight;
if (window.screen) {
var winPosL = (screen.availWidth - winWidth) / 2;
var winPosT = (screen.availHeight - winHeight) / 2;
strWinSize += ",left=" + winPosL + ",screenX=" + winPosL + ",top=" + winPosT + ",screenY=" + winPosT;
}	
window.open(theURL,winName,features + strWinSize);
}
function returnPopup(theURL,winName,features,width,height)
{
var winWidth	= width;
var winHeight	= height;
var strWinSize	= ",width=" + winWidth + ",height=" + winHeight;
if (window.screen) {
var winPosL = (screen.availWidth - winWidth) / 2;
var winPosT = (screen.availHeight - winHeight) / 2;
strWinSize += ",left=" + winPosL + ",screenX=" + winPosL + ",top=" + winPosT + ",screenY=" + winPosT;
}	
return window.open(theURL,winName,features + strWinSize);
}
function closePopup() {
window.close(self);
}
function ul_onclick(jsObj)
{
var i;
var style;
for (i = 0; i < jsObj.children.length; i++)
{
style = jsObj.children[i].style;
if (style.display == "none")
{
style.display = "";
}
else
{
style.display = "none";
}
} 
}
function verifyMsg(jsStrURL, jsStrMsg) 
{
if (confirm (jsStrMsg)) 
{		
this.window.location=jsStrURL;
return true;
}
}
function buildHumanSQL(objElement, strHeadline) {
var inputLocal	= objElement;
var strSQLHuman	= '<b>' + strHeadline + '</b>\n';
strSQLHuman	+='<ul type=square style="margin-top:0; margin-left:15; padding:5">\n';
if (inputLocal) {
var len = inputLocal.length;
var i=0;
for (i=0 ; i<len ; i++) {
if (inputLocal.options[i].selected) {
strSQLHuman += '<li>' + inputLocal.options[i].text + '<br></li>\n';
}
}
}
strSQLHuman += '</ul>'
objElement.form.txt_sqlHuman.value = strSQLHuman;
return true;
}
function getkey(e) {
if (window.event)
return window.event.keyCode;
else if (e)
return e.which;
else
return null;
}
function ClickOnCrKeyPress(e,button)
{
if(getkey(e)==13)
{
button.click();
return false;
}
else return true;
}
function InlineDelete_Submit(sender,keyfield,id,description)
{
if(confirm('Are you sure you want to delete this record?\t\n\n"'+description+'"\t'))
{
eval('sender.form.'+keyfield).value = id;
return true;
}
return false;
}