﻿
var s10 = this;
var scrdata_stack  = new Array();
var s10hta = null;
String.prototype.hc =
function(f)
{
return (f.className != null && (f.className.substr(0, this.length) == this));
}
String.prototype.startsWith =
function(str)
{
return (this.substr(0,str.length)==str);
}
String.prototype.endsWith =
function(str)
{
return (this.match(str+"$")==str);
}
function stringEndsWith(s,t)
{
return s.endsWith(t);
};
String.prototype.toNumber =
function()
{
var z = parseInt(this, 10);
if (isNaN(z)) return 0;
return z;
}
Number.prototype.toNumber =
function()
{
if (isNaN(this)) return 0;
return this;
}
function s2h(str){var x = new Array(); for (var i=0; i <str.length; i++){x.push(str.charCodeAt(i).toString(16));}; return x.join(''); };
function h2s(str){var x = new Array(); for (var i=0; i <str.length; i+=2){x.push(String.fromCharCode(parseInt(str.substr(i,2), 16)));}; return x.join('');};
function trim(s){return s.replace(/^\s\s*/, '').replace(/\s\s*$/, '')};
function mylength(a)
{
if (typeof(a.length) == 'number') return a.length;
var i = 0;
while (typeof(a[i+100]) != 'undefined') i = i+100;
while (typeof(a[i+10]) != 'undefined') i = i+10;
while (typeof(a[i]) != 'undefined') i++;
return i;
}
function textToHTML(s)
{
return s.replace(/&/g, "&amp;").replace(/</g,"&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
};
function inpvalue(f)
{
if (f.getAttribute('s10inlinelabelactive') != 1) return f.value;
return "";
}
function filepath(s)
{
s = s.replace(/\\/g, "/");
var k = s.indexOf(':');
if (k == 1)
{
return (s);
};
if (s.indexOf(':') < 0 && s.substr(0,2) != '..')
{
return (rootpath + s);
};
return s;
}
function mytop()
{
var p = window;
while (p.parent != null && p.parent != p && !p.location.href.toLowerCase().endsWith("synactives10.ctlmain.html"))
{
p = p.parent;
};
return  p.parent;
}
var sessionid = "";
var rootpath = location.href.substring(0,  location.href.indexOf("classes"));
var stepno = 0;
var previous_stepno = -1;
var language = "de";
var logoff_active = false;
var unload_active = false;
var quickhelp = true;
var popuplevel = 0;
var dialog_applid = "";
var dialog_screenid = "";
var retval = "";
var remote_sessionid = "";
var remote_rootpath = ""
var tree_generate = "";
var show_dialog_popup = "";
var recording_feedback = null;
var icontreefolder    = '../../synactiveS10/images/treefolder.gif';
var icontreeitem      = '../../synactiveS10/images/treeitem.gif';
var icontreeplus      = '../../synactiveS10/images/treeplus.gif';
var icontreeminus     = '../../synactiveS10/images/treeminus.gif';
var icontreeempty     = '../../synactiveS10/images/treeempty.gif';
var is_mobile = false;
if (window.screen.width * window.screen.height < 600*800) is_mobile = true;
function relPosLeft(f)
{
if (!f) return 0;
var left = f.offsetLeft;
while (f.offsetParent)
{
f = f.offsetParent;
left += f.offsetLeft;
};
return left;
}
function relPosTop(f)
{
if (!f) return 0;
var top = f.offsetTop;
while (f.offsetParent)
{
f = f.offsetParent;
top += f.offsetTop;
};
return top;
}
function check_completion(wnd, level)
{
if (!level) level = 0;
if (wnd == null)
{
return true;
};
var doc = wnd.document;
if (doc == null) return true;
if (typeof(wnd.document) != 'object') return true;
try
{
if (typeof(doc.readyState) == "undefined")
{
return true;
}
if (doc.readyState != 'complete')
{
return false;
};
var allframes = wnd.frames;
for (var k=0;k<allframes.length;k++)
{
var frm = allframes[k].frameElement;
if (!check_completion(frm.contentWindow, level+1)) return false;
};
}
catch(e){;};
return true;
}
function myscreenleft(wnd)
{
if (typeof(wnd.screenX)     != 'undefined')   return wnd.screenX;
if (typeof(wnd.screenLeft)  != 'undefined')   return wnd.screenLeft;
if (typeof(wnd.screen.left) != 'undefined')   return wnd.screen.left;
return 0;
}
function myscreentop(wnd)
{
if (typeof(wnd.screenY)    != 'undefined')    return wnd.screenY;
if (typeof(wnd.screenTop)  != 'undefined')    return wnd.screenTop;
if (typeof(wnd.screen.top) != 'undefined')    return wnd.screen.top;
return 0;
}
function myparentWindow(doc)
{
if (typeof(doc.parentWindow) == 'object' && doc.parentWindow != null) return doc.parentWindow;
if (typeof(doc.defaultView) == 'object'  && doc.defaultView != null)  return doc.defaultView;
return null;
}
function myparentnode(f)
{
if (typeof(f.parentNode) == 'object') return f.parentNode;
if (typeof(f.parentElement) == 'object') return f.parentElement;
return null;
};
function mypopupshow(scrdata, myp, left, top, width, height, zIndex, scroll, f_focus, dialog, tween)
{
if (f_focus != undefined)
{
try
{
if (f_focus != scrdata.quickhelpfocus) return;
if (scrdata.ctmPopup != null && scrdata.ctmPopup.visible) return;   }
catch(e){return;};
};
if (myp.element == null)
{
var pdoc = null;
if (myp.anchor == null)
{
if (dialog == true)
{
pdoc = scrdata_stack[0].appl_doc;
if (popuplevel> 0)
{
scrdata_stack[popuplevel-1].dia_popup_set_inactive();
};
}
else
{
pdoc = scrdata.appl_doc;
};
}
else
{
pdoc = myp.anchor.ownerDocument;
};
if (pdoc.s10divstack)
{
myp.element = pdoc.s10divstack.pop();
}
else
{
pdoc.s10divstack = new Array();
};
if (myp.element == null)
{
myp.element = pdoc.createElement("div");
}
else
{
myp.element.style.cssText = "";
myp.element.onmousedown = null;
};
myp.doc = pdoc;
pdoc.body.appendChild(myp.element);
};
var element = myp.element;
element.style.display = "none";
element.style.zIndex =  zIndex;
element.style.background = myp.background;
element.style.position = "absolute";
element.style.padding = "0px";
element.style.border =  "0px";
element.style.left = left + "px";
element.style.top =  top  + "px";
element.style.width  = width + "px";
if (height > 0)
{
element.style.height = height + "px";
}
else
{
element.style.height = "";
};
myp.fullscreen = false;
if (height < 10 && width < 10)
{
element.style.width = '100%';
element.style.height = '100%';
element.style.left = "0px";
element.style.top =  "0px";
myp.fullscreen = true;
};
element.style.borderwidth = "1px";
if (scroll)
{
if (height > 800)
{
element.style.height= 800 + "px";
element.style.overflow = "auto";
};
};
var popupcontent = myp.body.join('');
mysetinnerHTML(document, element, popupcontent);
myp.visible = true;
if (!scroll)
{
myp.shim = createShim(scrdata.appl_doc, myp.anchor, left, top, width, height, zIndex);
};
if (myp.fullscreen != true && myp.nodrag != true)
{
if (!document.all)
{
element.onmousedown = function(e) {scrdata.popupclick = true; return dragstartMOZ(scrdata, e, element, dialog); };
}
else
{
element.onmousedown = function() {scrdata.popupclick = true; return dragstartIE(scrdata, element, dialog); };
};
};
switch(tween)
{
case 'tweenNo':
{
element.style.display = "block";
return;
};
case 'tweenMenu':
{
element.style.clip = "rect(0px,0px,0px,0px)";
element.style.display = "block";
myp.time     = 100;
myp.timestep = 35;
myp.top  = top;
var tweenFunc =  function(){tweeningInTop(myp);};
myp.control = setInterval(tweenFunc,1);
return;
};
case 'tweenSubmenu':
{
element.style.clip = "rect(0px,0px,0px,0px)";
element.style.display = "block";
myp.time     = 100;
myp.timestep = 35;
myp.left  = left;
var tweenFunc =  function(){tweeningInLeft(myp);};
myp.control = setInterval(tweenFunc,1);
return;
};
case 'tweenMsg':
{
element.style.display = "block";
return;
};
default:
{
element.style.display = "block";
return;
};
};
}
function tweeningInTop(myp)
{
var moveThis = myp.element;
var MSCOUNT = 500;
if (!moveThis)
{
clearInterval(myp.control);
return;
};
if (myp.time > MSCOUNT)
{
moveThis.style.top = myp.top + "px";
moveThis.style.clip = 'rect(auto,auto,auto,auto)';
clearInterval(myp.control);
return;
};
var moveThis = myp.element;
var h = moveThis.offsetHeight;
var hdyn = strongEaseInOut(h, myp.time, MSCOUNT);
moveThis.style.top =  (myp.top+hdyn-h) + "px";
moveThis.style.clip = "rect( "+ (h-hdyn) + "px, auto," + h + "px,auto)";
if (myp.shim)
{
myp.shim.style.height = hdyn + "px";
};
myp.time += myp.timestep;
}
function tweeningInLeft(myp)
{
var moveThis = myp.element;
var MSCOUNT = 500;
if (!moveThis)
{
clearInterval(myp.control);
return;
};
if (myp.time > MSCOUNT)
{
moveThis.style.left = myp.left + "px";
moveThis.style.clip = 'rect(auto,auto,auto,auto)';
clearInterval(myp.control);
return;
};
var moveThis = myp.element;
var w = moveThis.offsetWidth;
var wdyn = strongEaseInOut(w, myp.time, MSCOUNT);
moveThis.style.left = (myp.left+wdyn-w) + "px";
moveThis.style.clip =  "rect(auto," + w + "px,auto," + (w-wdyn) +"px)";
if (myp.shim)
{
myp.shim.style.width = wdyn + "px";
};
myp.time += myp.timestep;
}
function strongEaseInOut(c,t,d)
{
if ((t/=d/2) < 1) return Math.floor(c/2*t*t*t*t*t);
return Math.floor(c/2*((t-=2)*t*t*t*t + 2));
}
function enable_drag(wnd)
{
if (typeof(wnd) != 'object') return;
if (wnd == null) return;
if (typeof(wnd.document) != 'object') return;
var doc = wnd.document;
if (doc == null) return;
for (var k = 0; k<wnd.frames.length; k++)
{
try
{
enable_drag(wnd.frames[k].frameElement.contentWindow);
}
catch(e){;};
};
doc.onmouseup   = dragstop;
doc.onmousemove = dodrag;
};
function disable_drag(wnd)
{
if (typeof(wnd) != 'object') return;
if (wnd == null) return;
if (typeof(wnd.document) != 'object') return;
var doc = wnd.document;
if (doc == null) return;
for (var k = 0; k<wnd.frames.length; k++)
{
try
{
disable_drag(wnd.frames[k].frameElement.contentWindow);
}
catch(e){;};
};
doc.onmouseup   = null;
doc.onmousemove = null;
};
function mysetinnerHTML(doc, element, value)
{
if (!element) return;
if (typeof(element.innerHTML) != 'undefined')
{
element.innerHTML = value;
return;
};
var range = doc.createRange();
range.setStartBefore(element);
var fragment = range.createContextualFragment(value);
while (element.hasChildNodes())element.removeChild(element.lastChild);
element.appendChild(fragment);
}
function use_showmodal()
{
if (window.showModalDialog && window.document.all)
{
return true;
}
else
{
return false;
};
}
function createShim(doc, anchor, left, top, width, height, zIndex)
{
if (height<20 || width<20) return null;
var shim = null;
var shimdoc = doc;
if (anchor != null)
{
shimdoc = anchor.ownerDocument;
};
shim = shimdoc.createElement('iframe');
shimdoc.body.appendChild(shim);
shim.style.borderWidth = "0px";
shim.style.position = "absolute";
shim.style.top = top + "px";
shim.style.left = left + "px";
shim.style.width = width  + "px";
shim.style.height = height + "px";
shim.style.zIndex = zIndex-1;
shim.style.display = 'block';
return shim;
}
function reset_error_focus(obj)
{
if(!obj) return;
if (typeof(obj.className) != "string") return;
switch(obj.className)
{
case 'inputerr':
case 'inputfocus':
case 'inputerrfocus':
obj.className='input';
return;
case  'inputreqerr':
case  'inputreqfocus':
case  'inputreqerrfocus':
case  'inputreqfilled':
case  'inputreqerrfilled':
obj.className='inputreq';
if (inpvalue(obj) != "") obj.className = 'inputreqfilled';
return;
case 'inputerrcell':
case 'inputfocuscell':
case 'inputerrfocuscell':
obj.className='inputcell';
return;
case  'inputreqerrcell':
case  'inputreqfocuscell':
case  'inputreqerrfocuscell':
case  'inputreqfilledcell':
obj.className='inputreqcell';
if (inpvalue(obj) != "") obj.className = 'inputreqcellfilled';
return;
case 'checkboxerr':
obj.className='checkbox';
return;
case 'checkboxcell':
obj.className='checkboxcell';
return;
};
}
function mypopup()
{
this.body   = new Array();
this.visible = false;
this.anchor = null;
this.shim = null;
this.background = "#f3f2ed";
this.msgtype = '';
this.fullscreen = false;
this.nodrag = false;
this.doc = null;
}
function mypopupwrite(myp, text)
{
myp.body.push(text);
}
function mypopupclose(myp)
{
if (myp == null) return false;
if (myp.element != null)
{
var q =  myparentnode(myp.element);
if (q != null) q.removeChild(myp.element);
myp.element.innerHTML = '';
myp.doc.s10divstack.push(myp.element);
myp.element = null;
};
if (myp.body != null) myp.body.length = 0;
if (myp.shim != null)
{
var q =  myparentnode(myp.shim);
if (q != null) q.removeChild(myp.shim);
delete myp.shim;
myp.shim = null;
};
return true;
}
function ui_text(id)
{
switch(language.toLowerCase())
{
case 'de':
switch(id)
{
case 'Print':  return 'Drucken';
case 'Search': return 'Suchen';
case 'Help':   return 'Hilfe';
case 'ReqMsg': return "Bitte alle benötigten Felder ausfüllen";
case 'ReqExp': return "Ohne diese Informationen kann der Vorgang nicht fortgeführt werden";
case 'confirm_logoff': return "Möchten Sie die Anwendung verlassen (logoff)?";
case 'Select': return "Auswählen";
case 'Menu':  return "Menü";
case 'Open document':  return "Dokument öffnen";
default: return id;
};
case 'en':
switch(id)
{
case 'Print':  return 'Print';
case 'Search': return 'Search';
case 'Help':   return 'Help';
case 'ReqMsg': return "Please fill in all required entry fields";
case 'ReqExp': return "The transaction cannot be continued without this information";
case 'confirm_logoff': return "Do you want to log off?";
case 'Select': return "Select";
case 'Menu':  return "Menu";
case 'Open document':  return "Open document";
default: return id;
};
case 'fr':
switch(id)
{
case 'Print':  return 'Imprimer';
case 'Search': return 'Recherche';
case 'Help':   return 'Aide';
case 'ReqMsg': return "Voyez saisir toutes les données requises";
case 'ReqExp': return "Pas de continuation possible sans ces données";
case 'confirm_logoff': return "Voulez-vous quitter l'application?";
case 'Select': return "Sélection";
case 'Menu':  return "Menu";
case 'Open document':  return "Ouvrir le document";
default: return id;
};
default:
return id;
};
}
var style_rowselect_color = '#010101';
var style_rowselect_backgroundColor = '#d0d0e0';
var DragXMAX = 0;
var DragYMAX = 0;
var DragEvent = null;
var DragObject = null;
var DragWindow = null;
var DragResize = 0;
var DragX = 0;
var DragY = 0;
function dragstartIE(scrdata, element, dialog)
{
if (dialog && scrdata != scrdata_stack[popuplevel-1]) return true;
DragEvent = myparentWindow(element.ownerDocument).event;
var s = DragEvent.srcElement.style.cursor;
if (s == 'nw-resize') return dragstart(DragEvent, element, 4);
if (s == 'ne-resize') return dragstart(DragEvent, element, 5);
if (s == 'n-resize')  return dragstart(DragEvent, element, 2);
var topoffset = DragEvent.offsetY;
if (topoffset < 20)
{
return dragstart(DragEvent, element, 0);
}
else
{
if (DragEvent.offsetX > element.offsetWidth-20)
{
return dragstart(DragEvent, element, 1);
};
if (DragEvent.offsetX < 20)
{
return dragstart(DragEvent, element, 3);
};
return dragstop();
};
}
function dragstartMOZ(scrdata, e, element, dialog)
{
if (dialog && scrdata != scrdata_stack[popuplevel-1]) return true;
var s = e.target.style.cursor;
if (s == 'nw-resize') return dragstart(e, element, 4);
if (s == 'ne-resize') return dragstart(e, element, 5);
if (s == 'n-resize')  return dragstart(e, element, 2);
if (e.pageY  < element.style.top.toNumber() + 20)
{
return dragstart(e, element, 0);
}
else
{
if (e.pageX > element.style.left.toNumber() + element.style.width.toNumber() - 20)
{
return dragstart(e, element, 1);
};
if (e.pageX < element.style.left.toNumber() + 20)
{
return dragstart(e, element, 3);
};
return dragstop();
};
}
function dragstart(e, element, resize)
{
DragObject = element;
DragResize = resize;
switch(resize)
{
case 0:
DragX =  e.screenX - element.style.left.toNumber();
DragY =  e.screenY - element.style.top.toNumber();
break;
default:
DragX =  e.screenX;
DragY =  e.screenY;
break;
};
DragWindow = myparentWindow(element.ownerDocument);
DragXMAX =  scrdata_stack[0].windowwidth(DragWindow )  + scrdata_stack[0].windowScrollX(DragWindow ) - 20;
DragYMAX =  scrdata_stack[0].windowheight(DragWindow ) + scrdata_stack[0].windowScrollY(DragWindow ) - 30;
mytop().document.onmouseout = dragstop;
for (var k = popuplevel; k>=0; k--)
enable_drag(scrdata_stack[k].appl_wnd);
return false;
}
function dragstop()
{
if (DragObject == null) return true;
DragObject = null;
for (var k = popuplevel; k>0; k--)
disable_drag(scrdata_stack[k-1].appl_wnd);
mytop().document.onmouseout = null;
return false;
}
function dodrag(e)
{
if (DragObject == null) return true;
if (!e) e = DragEvent;
if (popuplevel > 0 && scrdata_stack[popuplevel-1].diaPopupFullscreen && typeof(scrdata_stack[popuplevel-1].diaPopup) == 'object' && DragObject == scrdata_stack[popuplevel-1].diaPopup.element) return false;
var x = e.screenX - DragX;
var y = e.screenY - DragY;
if (DragResize > 0) return dodragResize(x, y);
if (x > DragXMAX)
{
DragObject.style.left = DragXMAX + "px";
dragstop();
return false;
};
if (y > DragYMAX)
{
DragObject.style.top  = DragYMAX + "px";
dragstop();
return false;
};
if (x <  60 - DragObject.offsetWidth)
{
x = 60 - DragObject.offsetWidth;
DragObject.style.left = x + "px";
dragstop();
return false;
};
if (y < 0)
{
DragObject.style.top  = "0px";
dragstop();
return false;
};
DragObject.style.left = x + "px";
DragObject.style.top  = y + "px";
return false;
}
function dodragResize(x, y)
{
var w =  DragObject.style.width.toNumber() + x;
var wneg = DragObject.style.width.toNumber() - x;
var h = DragObject.style.height.toNumber() + y;
switch(DragResize)
{
case 1:
if (w > 50) DragObject.style.width =  w + "px";
break;
case 2:
if (h > 50) DragObject.style.height =  h + "px";
break;
case 3:
if (wneg > 50)
{
DragObject.style.left =   (DragObject.style.left.toNumber() + x)+ "px";
DragObject.style.width =  wneg + "px";
};
break;
case 4:
if (w > 50) DragObject.style.width  =  w + "px";
if (h > 50) DragObject.style.height =  h + "px";
break;
case 5:
if (wneg > 50)
{
DragObject.style.left =   (DragObject.style.left.toNumber() + x)+ "px";
DragObject.style.width =  wneg + "px";
};
if (h > 50) DragObject.style.height =  h + "px";
break;
};
DragX =  DragX + x;
DragY =  DragY + y;
return false;
}
function is_output(f)
{
return ('output'.hc(f) ||'legend'.hc(f));
;
}
function is_outputhtml(f)
{
return 'outputhtml'.hc(f);
}
function is_outputcell(f)
{
return ('outputcell'.hc(f) ||  'checkboxoutcell'.hc(f));
}
function is_outputcellhtml(f)
{
return 'outputcellhtml'.hc(f);
}
function is_outputcellmenu(f)
{
return 'outputcellmenu'.hc(f);
}
function is_outputcellactivemenu(f)
{
return 'outputcellactivemenu'.hc(f);
}
function is_outputcellactive(f)
{
return 'outputcellactive'.hc(f);
}
function is_outputselect(f)
{
return 'outputselect'.hc(f);
}
function is_input(f)
{
return 'input'.hc(f);
}
function is_inputreq(f)
{
return 'inputreq'.hc(f);
}
function is_inputcell(f)
{
return 'inputcell'.hc(f) ||  'inputfocuscell'.hc(f)  ||  'inputerrcell'.hc(f) ||  'checkboxcell'.hc(f);
}
function is_inputselect(f)
{
return 'inputselect'.hc(f);
}
function is_button(f)
{
return 'button'.hc(f);
}
function is_buttoncell(f)
{
return 'buttoncell'.hc(f);
}
function is_image(f)
{
return 'image'.hc(f);
}
function is_imagecell(f)
{
return 'imagecell'.hc(f);
}
function is_messagearea(f)
{
return 'messagearea'.hc(f);
}
function is_cell(f)
{
if (f.className == null || f.className.indexOf('cell') == -1) return false;
if (
'inputcell'.hc(f)			||
'outputcell'.hc(f)			||
'inputfocuscell'.hc(f)		||
'inputerrcell'.hc(f)		||
'inputerrfocuscell'.hc(f)	||
'checkboxcell'.hc(f)		||
'checkboxoutcell'.hc(f)	||
'checkboxerrcell'.hc(f)	||
'buttoncell'.hc(f)			||
'imagecell'.hc(f)
)
return true;
return false;
}
function is_select(f)
{
return 'inputselect'.hc(f) || 'outputselect'.hc(f);
}
function tagINNER(f)
{
return (f && (f.tagName == 'DIV' || f.tagName == 'SPAN'  || f.tagName == 'LEGEND'))
}
function is_tabcolhead(f)
{
return 'tabcolhead'.hc(f);
}
function is_radio(f)
{
return (f && f.className && (f.className == "radio" ||  f.className == "radioerr"));
}
function is_radioout(f)
{
return (f && f.className && f.className && f.className == "radioout");
}
function is_radioany(f)
{
return 'radio'.hc(f);
}
function is_checkbox(f)
{
return ('checkbox'.hc(f) && ! 'checkboxout'.hc(f));
}
function is_checkboxout(f)
{
return 'checkboxout'.hc(f);
}
function is_checkboxany(f)
{
return 'checkbox'.hc(f);
}
function is_tabimage(f)
{
return 'tabimage'.hc(f);
}
function is_tabfloat(f)
{
return 'tabfloat'.hc(f);
}
function is_label(f)
{
return 'label'.hc(f);
}
function is_labelradio(f)
{
return 'labelradio'.hc(f);
}
function is_labelcheckbox(f)
{
return 'labelcheckbox'.hc(f);
}
function is_labelmenu(f)
{
return 'labelmenu'.hc(f);
}
function is_box(f)
{
return 'box'.hc(f);
}
function noaction(s10ctl, e)
{
e = S10Event(s10ctl, e)
return eventnoaction(e);
};
function eventnoaction(e)
{
if (!e) return false;
if (typeof(e.stopPropagation) == 'function')
{
e.stopPropagation();
}
else
{
e.cancelBubble = true;
};
if (typeof(e.preventDefault) == 'function')
{
e.preventDefault();
};
if (e.returnValue)
{
e.returnValue = false;
};
return false;
};
function search_event_app(e, app)
{
if (e != null) return e;
if (app == null) return null;
if (app.event != null) return app.event;
var frames = app.frames;
for (var i=0;i<frames.length;i++)
{
e = search_event_app(e, frames[i]);
if (e != null) return e;
};
return null;
}
function target(e)
{
var targ = null;
if (e != null)
{
if (e.target != null) targ = e.target;
if (e.srcElement != null) targ = e.srcElement;
}
else
{
if (window.event != null && window.event.srcElement != null) targ = window.event.srcElement;
};
if (targ != null)
{
while(targ.nodeType != 1) targ = targ.parentNode;
};
return targ;
}
function S10Event(s10ctl, e)
{
if (e != null) return e;
if (window.event) return window.event;
var c = S10Event;
while (c.caller) c = c.caller;
if (c.arguments[0] && typeof(c.arguments[0].target) == 'object') return c.arguments[0];
var app = null;
switch(s10ctl.scrdata.application_frame_no)
{
case 1: app = s10ctl.parent.parent.app1; break;
case 2: app = s10ctl.parent.parent.app2; break;
};
return search_event_app(e, app);
}
function eventtarget(scrdata, e)
{
var f = target(e);
if (f == null) f = scrdata.lastfocus;
return f;
};
function mouseout_inner_element(e, container)
{
if (e == null) e = window.event;
var targ = (e.relatedTarget) ? e.relatedTarget : e.toElement;
while (targ != null && targ != container && targ.tagName != 'BODY'){
targ = targ.parentNode;
if (targ == container)
{
return true;
};
};
return false;
}
function cch(s10ctl, f)
{
s10ctl.scrdata.cellchanged(f);
}
function valuehelp(s10ctl, f)
{
if (!s10ctl.scrdata.allowui()) return;
var scrdata = s10ctl.scrdata;
var fdename = de_from_element(scrdata, f);
if (fdename == "") return false;
var de = repository.dataelements[fdename];
var i = 0;
var parentclass = "";
while (de != null && i<10)
{
var s = new Array();
s = de.contextmenu.split(";");
for (k=0; k<s.length; k++)
{
if (s[k].substr(0,6) == "search")
{
var h = s[k].split("~");
if (parentclass == "")
{
s10ctl.context_menu_step(h[0], f);
}
else
{
s10ctl.context_menu_step(h[0] + '@' + parentclass, f);
};
return false;
};
};
for (k=0; k<s.length; k++)
{
if (s[k].substr(0,10) == "valuehelp=")
{
var h = s[k].split("~");
s10ctl.context_menu_step(h[0], f);
return;
};
};
i++;
var parent = de.parent;
if (parent != "")
{
de = repository.dataelements[parent];
var p = new Array();
p = parent.split(".");
parentclass= p[0];
}
else
{
de = null;
};
};
s10ctl.contextmenu(f);
return false;
}
function showcellmenuicon(scrdata, f)
{
if (mypopupclose(scrdata.icopopup)) scrdata.icopopup = null;
if (is_checkboxany(f)) return;
if (is_radioany(f)) return;
if (!create_ctmitemlist(scrdata, f)) return;
scrdata.icopopup = new s10.mypopup;
scrdata.icopopup.anchor = f;
var  popupitemhtml =
'<div  onclick="s10ctl.showcontextmenu()"><img  src="' + rootpath + 'icons/cellcontexticon.gif" width="12" height="16"></div>';
mypopupwrite(scrdata.icopopup, popupitemhtml);
mypopupshow(scrdata, scrdata.icopopup, relPosLeft(f)+f.offsetWidth, relPosTop(f), 12, 0, 100+s10.popuplevel*200, false, null, false, 'tweenNo');
};
function contextsubmenu_close(scrdata, level)
{
while(scrdata.ctmPopupStack.length > level)
{
var popup = scrdata.ctmPopupStack.pop();
s10.mypopupclose(popup);
};
if (scrdata.previous_menu_item.length > level+1)
{
scrdata.previous_menu_item.length = level+1;
};
}
function external_dialog_window(w)
{
try
{
var query = w.parent.parent.document.location.search;
if (!query || query == "")
{
return "";
};
if (query.substr(1,12) == "RemoteDialog")
{
return h2s(query.substr(14));
};
}
catch(e){return "";};
return "";
};
function dialog_session(w)
{
try
{
if (typeof(w.parent.parent.opener) == 'object' && w.parent.parent.opener != null)
var s = w.parent.parent.opener.s10dialogArguments;
if (typeof(s) == 'object' && s != null)
{
return s;
};
}
catch(e){};
try
{
if (w.parent.parent.parent.parent.location.search.substr(0,14) == "?RemoteDialog=")
var s = w.parent.parent.parent.parent.frames[0].s10;
if (typeof(s) == 'object' && s != null)
{
return s;
};
}
catch(e){};
try
{
var s = w.parent.parent.parent.parent.frames[0].frames[0];
if (w.parent.parent.parent != w.parent.parent.parent.parent && typeof(s.s10) == 'object' && s != null)
{
return s;
};
}
catch(e){};
return null;
};
function FrontendRepository()
{
this.dataelements = new Array();
this.structures   = new Array();
this.history      = new Array();
this.historytext  = new Array();
this.historyglobals = new Array();
this.history_fid = "";
this.history_value_count = 0;
}
function dataelement(parent, contextmenu)
{
this.parent      = parent;
this.contextmenu = contextmenu;
}
var repository = new FrontendRepository;
function nhbeg(fid)
{
var s = new Array();
s = fid.split("=");
if (s[1])
{
repository.historyglobals[s[1]] = s[0];
repository.history_fid = s[0];
}
else
{
repository.historyglobals[fid] = fid;
repository.history_fid = fid;
};
repository.history[repository.history_fid]     = new Array();
repository.historytext[repository.history_fid] = new Array();
repository.history_value_count = 0;
}
function nhv(value)
{
repository.history_value_count++;
repository.history[repository.history_fid].push(decodeURIComponent(value));
}
function nht(text)
{
repository.historytext[repository.history_fid].push(decodeURIComponent(text));
}
function nhend()
{
}
function newde(str)
{
var s = new Array();
s = str.split("|");
repository.dataelements[s[0]] = new dataelement(s[1], s[2]);
}
function newstr(str)
{
var s = new Array();
s = str.split("|");
repository.structures[s[0]] = s[1];
}
function resolve_structures(name, classname)
{
var n = name.indexOf(".");
if (n<=0) return (classname + "." + name);
var pre = name.substr(0,n);
var s  = repository.structures[classname + "." + pre];
if (s == null) return (classname + "." + name);
return resolve_structures(name.substr(n+1),s);
}
function de_from_element(scrdata, f)
{
if (!f) return "";
var fname = f.getAttribute("name");
if (!fname) return "";
fname = fname.toLowerCase();
if (typeof(f.ownerDocument) != 'object' || f.ownerDocument == null) return "";
var f_ifi = find_doc_ifi(scrdata.mainifi, f.ownerDocument);
var fullname;
if (is_cell(f))
{
var s = new Array();
s = f.id.split("#");
s = s[1].split(".");
var r = '';
for (var k=2; k<s.length; k++)
{
r = r + '.' + s[k];
};
fullname  = get_fulls10object(scrdata.mainifi, f_ifi)+ s[0] + r;
}
else
{
var de = fname
if (de.substr(0,6) == "label_")
{
de = de.substr(6,200);
};
fullname =  get_fulls10object(scrdata.mainifi, f_ifi) + de;
};
fullname = resolve_structures(fullname, scrdata.applid);
if (repository.dataelements[fullname] != null)  return fullname;
return fullname;
}
function get_fulls10object(parifi, ifix)
{
if (parifi == ifix)  return parifi.s10object;
for (var i=0;i<parifi.ifis.length;i++)
{
var s10object = get_fulls10object(parifi.ifis[i], ifix);
if (s10object != null) return (parifi.s10object + s10object);
};
return null;
}
function ctmitem(action, text, icon, submenu)
{
this.action = action;
this.text   = text;
this.icon   = icon;
this.submenu  = submenu;
}
function create_ctmitemlist(scrdata, f, treeclass)
{
scrdata.ctmobject = f;
if (!f || !f.style || f.style.visibility == 'hidden' || f.style.width.substr(0,1) == '0') return false;
scrdata.ctmitemlist.length = 0;
var fdename = "";
if (treeclass)
{
fdename = treeclass + ".nodelabel";
}
else
{
fdename = de_from_element(scrdata, f);
};
var history = null;
var historytext = null;
if (!f.readOnly)
{
var historyname =  repository.historyglobals[fdename];
if (historyname)
{
history      =   repository.history[historyname];
historytext  =   repository.historytext[historyname];
var k = 0;
for (k=0; k<history.length; k++)
{
if (history[k] != historytext[k])
{
scrdata.ctmitemlist.push(new ctmitem("set="+history[k],  history[k] + " "+ historytext[k], ""));
}
else
{
scrdata.ctmitemlist.push(new ctmitem("set="+history[k],  historytext[k], ""));
};
};
};
};
add_context_menu(scrdata.ctmitemlist, fdename, "", history, f);
if (scrdata.ctmitemlist.length != 0 && f.className.substr(0,16) == 'outputcellactive')
{
var part1 = 'on_doubleclick';
var part2 =  ui_text('Select');
var part3 = '';
var part4 = '';
scrdata.ctmitemlist.push(new ctmitem(part1, part2, part3, part4));
};
return scrdata.ctmitemlist.length != 0;
}
function add_context_menu(ctmlist, fdename, defparentclass, history, f)
{
var parentclass = "";
var de = repository.dataelements[fdename];
var i = 0;
while (de != null && i<10)
{
var s = new Array();
s = de.contextmenu.split(";");
for (i=0; i<s.length; i++)
{
var t = new Array();
t = s[i].split("~");
if (t.length == 4)
{
t[0] = decodeURIComponent(t[0]);
t[1] = decodeURIComponent(t[1]);
t[2] = decodeURIComponent(t[2]);
t[3] = decodeURIComponent(t[3]);
if (!f.readOnly || (t[0].substr(0,6) != "search" && t[0].substr(0,9) != "valuehelp" && t[0].substr(0,4) != "help" ))
{
if (parentclass == '' || t[0].indexOf("=") > 0)
{
var in_history = false;
if (t[0].substr(0,4) == "set=")
{
in_history = f.readOnly;
if (history != null && !in_history)
{
for (k=0; k<history.length; k++)
{
if (history[k] == t[0].substr(4))
{
in_history= true;
k = history.length;
};
};
};
};
if (defparentclass != '' && t[0].indexOf("=") <= 0)
{
ctmlist.push(new ctmitem(t[0] + '@' + defparentclass, t[1], t[2], t[3]));
}
else
{
if (!in_history)  ctmlist.push(new ctmitem(t[0], t[1], t[2], t[3]));
};
}
else
{
ctmlist.push(new ctmitem(t[0] + '@' + parentclass, t[1], t[2], t[3]));
};
};
};
};
i++;
var parent = de.parent;
if (parent != "")
{
de = repository.dataelements[parent];
var p = new Array();
p = parent.split(".");
parentclass= p[0];
}
else
{
de = null;
};
};
}
function find_doc_ifi(parifi, doc)
{
if (!parifi) return null;
if (parifi.doc == doc)  return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var docifi= find_doc_ifi(parifi.ifis[i], doc);
if (docifi != null) return docifi;
};
return null;
}
function find_tab_ifi(parifi, partabname)
{
if (!parifi) return null;
if (parifi.tablename == partabname) return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var tabifi = find_tab_ifi(parifi.ifis[i], partabname);
if (tabifi != null) return tabifi;
};
return null;
}
function find_tab_ifi_fullname(parifi, fullname)
{
if (!parifi) return null;
if (parifi.fulltablename == fullname) return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var tabifi = find_tab_ifi_fullname(parifi.ifis[i], fullname);
if (tabifi != null) return tabifi;
};
return find_tab_ifi(parifi, fullname);
}
function find_wnd_ifi(parifi, wnd)
{
if (!parifi) return null;
if (parifi.wnd == wnd)  return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var wndifi= find_wnd_ifi(parifi.ifis[i], wnd);
if (wndifi != null) return wndifi;
};
return null;
}
function find_iframe_ifi(parifi, iframe)
{
if (!parifi) return null;
if (parifi.iframe == iframe)  return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var iframeifi= find_iframe_ifi(parifi.ifis[i], iframe);
if (iframeifi != null) return iframeifi;
};
return null;
}
function find_ifiid_ifi(parifi, ifiid)
{
if (!parifi) return null;
if (parifi.ifiid == ifiid)  return parifi;
for (var i=0;i<parifi.ifis.length;i++)
{
var ifiidifi= find_ifiid_ifi(parifi.ifis[i], ifiid);
if (ifiidifi != null) return ifiidifi;
};
return null;
}
function get_checkbox_ifi(ifi, obj)
{
for (var k=0; k<ifi.celements.length; k++)
{
if (ifi.celements[k] == obj)
{
return ifi;
};
};
for (var i=0;i<ifi.ifis.length;i++)
{
var matchifi = get_checkbox_ifi(ifi.ifis[i], obj);
if (matchifi != null)
return matchifi;
};
return null;
}
function get_checkboxlabel_ifi(ifi, obj)
{
for (var k=0; k<ifi.clelements.length; k++)
{
if (ifi.clelements[k] == obj)
{
return ifi;
};
};
for (var i=0;i<ifi.ifis.length;i++)
{
var matchifi = get_checkboxlabel_ifi(ifi.ifis[i], obj);
if (matchifi != null)
return matchifi;
};
return null;
}
function get_radio_ifi(ifi, obj)
{
for (var k=0; k<ifi.relements.length; k++)
{
if (ifi.relements[k] == obj)
{
return ifi;
};
};
for (var i=0;i<ifi.ifis.length;i++)
{
var matchifi = get_radio_ifi(ifi.ifis[i], obj);
if (matchifi != null)
return matchifi;
};
return null;
}
function get_radiolabel_ifi(ifi, obj)
{
for (var k=0; k<ifi.rlelements.length; k++)
{
if (ifi.rlelements[k] == obj)
{
return ifi;
};
};
for (var i=0;i<ifi.ifis.length;i++)
{
var matchifi = get_radiolabel_ifi(ifi.ifis[i], obj);
if (matchifi != null)
return matchifi;
};
return null;
}
function ScreenData(wnd)
{
this.window = wnd;
this.s10ctl = wnd;
this.applid = "";
this.screenid = "";
this.oldapplid     = "";
this.oldscreenid   = "";
this.popuplevel = 0;
this.remote_dialog = false;
this.lastfocus = null;
this.first_error_field = null;
this.first_input = null;
this.first_input_tab_activated = null;
this.application_focus = null;
this.ctmobject = null;
this.ctmitemlist = new Array();
this.ctmPopup = null;
this.ctmPopupStack = new Array();
this.mainifi = null;
this.application_frame_no = 1;
this.change_application_frame = false;
this.currenttreenode = null;
this.currentsubtreelevel = 0;
this.f_valuehelp = null;
this.quickhelpfocus = null;
this.popupclick = false;
this.icopopup = null;
this.tree_generate = null;
this.appl_wnd = null;
this.appl_doc = null;
this.cursor_object = null;
this.cursor_object_style = null;
this.previous_menu_item = new Array();
this.chcells         = new Array();
this.chcells_reset_done = false;
this.state_disable_input = true;
this.msgPopup = null;
this.msgPopupHeight = 0;
this.msgPopupWidth  = 0;
this.msgtype = "";
this.msgtext = "";
this.diaPopup = null;
this.diaPopupHeight = 0;
this.diaPopupWidth  = 0;
this.diaPopupTop = 0;
this.diaPopupLeft = 0;
this.diaPopupFullscreen = false;
this.diaPopupHeaderbgcolor = "";
this.diaPopupTitle = "";
if (popuplevel > 0)
{
scrdata_stack[popuplevel-1].close_msg_popup();
};
this.set_popuplevel =
function(popuplevel)
{
this.popuplevel = popuplevel;
s10.scrdata_stack[popuplevel] = this;
};
this.show_msg_popup =
function(type, msg, explanation, element, width, height)
{
if (!type || type == "" || type == " ") return;
if (!msg  || msg  == "") return;
if (type == 'E')  this.close_popups();
if (is_mobile && (type == 'E' || type == 'I'))
{
alert(msg + "\n\n\n" + explanation);
return;
};
if (type == 'Q' && this.msgPopup != null && this.msgPopup.msgtype == 'Q')
{
if (element == this.msgPopup.anchor)
{
this.msgPopup.visible = true;
return;
};
this.close_msg_popup();
};
if (this.msgPopup == null || !this.msgPopup.visible)
{
this.msgPopup = new mypopup;
this.msgPopupHeight = 20;
};
this.msgPopup.msgtype = type;
this.msgPopup.nodrag = true;
var msgdivheight = 24;
var text =   '';
var cssclass       = "messagetext";
var onclickoption =  'onclick="s10ctl.scrdata.close_msg_popup();"';
switch(type)
{
case 'E':
break;
case 'I':
break;
case 'S':
break;
case 'V':
break;
case 'H':
cssclass = "helppopup";
break;
case 'Q':
cssclass = "quickhelp";
break;
default:
break;
};
text = text + '<div class="' + cssclass + '">'  +  msg + '</div>';
if (explanation != "")
{
text = text + '<div class="messageexplanation">' + explanation + '</div>';
};
var  x = 0;
var  y = 0;
var anchor = this.lastfocus;
if (element)
{
anchor = element;
}
else
{
if (type == 'E' && this.first_error_field != null)
{
anchor = this.first_error_field;
};
};
if (anchor != null && (typeof(anchor.offsetLeft) == 'unknown' || typeof(anchor.offsetLeft) == 'undefined'))
{
anchor = null;
};
if (anchor != null)
{
x = this.absPosLeft(anchor);
y = this.absPosTop(anchor) + anchor.offsetHeight + 5;
if (type == 'Q' || type == 'V')
{
x = x-4;
};
}
else
{
x = this.windowwidth() / 10;
y = this.windowheight() / 5;
};
if (width && height)
{
this.msgPopupWidth  = width.toNumber() +  20;
this.msgPopupHeight = height.toNumber() + 6;
}
else
{
this.msgPopupWidth  = 200;
};
var newdiv =
'<div style="width:100%; padding:3px; height:100%; border-width: 1px;border-style:solid; border-color: rgb(200,200,200); background-color:rgb(255,255,220);'
+ 'border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px;"' + onclickoption + '>'
+ text +  '</div>';
var XMAX =  this.windowwidth()  + this.windowScrollX();
var YMAX =  this.windowheight() + this.windowScrollY();
if (x+this.msgPopupWidth > XMAX-20) x = XMAX - this.msgPopupWidth-20;
if (x<0) x =  0;
if (y+100 > YMAX) y =  YMAX - 100;
if (y<0) y =  0;
mypopupwrite(this.msgPopup, newdiv);
if (type != 'Q')
{
mypopupshow(this, this.msgPopup, x, y, this.msgPopupWidth, 0, 200+s10.popuplevel*200, true, null, false, 'tweenMsg');
}
else
{
var scrdata = this;
var msgPopup = this.msgPopup;
var msgPopupWidth = this.msgPopupWidth;
var msgPopupHeight = this.msgPopupHeight;
msgPopup.anchor = anchor;
var msgFunc =  function(){mypopupshow(scrdata, msgPopup, x, y, msgPopupWidth, 0 , 200+s10.popuplevel*200, true, anchor, false, 'tweenMsg');};
this.window.setTimeout(msgFunc, 300);
};
}
this.show_dialog_popup = null;
this.diaPopup = null;
this.absPosLeft =
function(f)
{
if (!f) return 0;
var left = relPosLeft(f);
var wnd = myparentWindow(f.ownerDocument);
if (wnd == null || wnd == this.appl_wnd)
{
return left;
};
left = left - this.windowScrollX();
if (typeof(wnd.frameElement) == 'object')
{
return left + this.absPosLeft(wnd.frameElement) + wnd.frameElement.style.paddingLeft.toNumber();
};
return left - myscreenleft(wnd) + myscreenleft(this.appl_wnd);
}
this.absPosTop =
function (f)
{
if (!f) return 0;
var top = relPosTop(f);
var wnd = myparentWindow(f.ownerDocument);
if (wnd == null || wnd == this.appl_wnd)
{
return top;
};
top = top - this.windowScrollY(wnd);
if (typeof(wnd.frameElement) == 'object')
{
return top + this.absPosTop(wnd.frameElement) + wnd.frameElement.style.paddingTop.toNumber();
};
return top - myscreentop(wnd) + myscreentop(this.appl_wnd);
}
this.menu_in =
function(f,e)
{
if (this.ctmPopup != null && this.ctmPopup.visible)
{
f.style.borderColor= ' #606060 #ffffff #ffffff #606060';
this.s10ctl.contextmenu(f);
}
else
{
f.style.borderColor= '#ffffff #606060  #606060 #ffffff';
};
return noaction(this.s10ctl, e);
}
this.menu_down =
function(f,e)
{
f.style.borderColor= ' #606060 #ffffff #ffffff #606060';
return noaction(this.s10ctl, e);
}
this.menu_click =
function(f,e)
{
f.style.borderColor= ' #606060 #ffffff #ffffff #606060';
this.s10ctl.contextmenu(f);
return noaction(this.s10ctl, e);
}
this.menu_out =
function(f,e)
{
f.style.borderColor = '#c3c3c3';
return noaction(this.s10ctl, e);
}
this.cellchanged =
function (f)
{
this.chcells.push(f);
}
this.cellfocusgot =
function(scrdata, f)
{
this.close_ctm_popup();
if (f == null) return;
if (f.onhelp == null)
{
f.onhelp          = function(e){return scrdata.hlp(this, e);};
f.oncontextmenu   = function(e){return scrdata.cxm(this, e);};
f.onclick         = function(e){return scrdata.clk(this, e);};
f.ondblclick      = function(e){return scrdata.dbc(this, e);};
f.onkeypress      = scrdata.s10ctl.okp;
f.onkeydown       = scrdata.s10ctl.okd;
f.onblur          = scrdata.s10ctl.cfl;
f.onchange        = function(){return cch(scrdata.s10ctl, this);};
};
this.lastfocus = f;
switch(f.className)
{
case 'inputcell':              f.className='inputfocuscell';         showcellmenuicon(this, f); break;
case 'inputerrcell':           f.className='inputerrfocuscell';      showcellmenuicon(this, f); break;
case 'inputreqcell':           f.className='inputreqfocuscell';      showcellmenuicon(this, f); break;
case 'inputreqerrcell':        f.className='inputreqerrfocuscell';   showcellmenuicon(this, f); break;
case 'checkboxcell':                                                 showcellmenuicon(this, f); break;
case 'checkboxerrcell':                                              showcellmenuicon(this, f); break;
default:    break;
};
}
this.dbc =
function(f, e)
{
if (!this.allowui()) return false;
this.close_popups();
if (is_input(f) && inpvalue(f) == '') return this.s10ctl.contextmenu(f);
this.s10ctl.context_menu_step("on_doubleclick", f);
return noaction(this.s10ctl, e);
}
this.clk =
function(f, e)
{
if (is_outputcellmenu(f) || is_outputcellactivemenu(f))
{
return this.cxm(f, e);
};
if (is_outputcellactive(f))
{
return this.dbc(f, e);
};
return true;
}
this.hlp =
function (f, e)
{
if (!this.allowui()) return false;
var fdename = de_from_element(this, f);
if (fdename == "") return false;
var de = repository.dataelements[fdename];
var i = 0;
while (de != null && i<10)
{
var s = new Array();
s = de.contextmenu.split(";");
for (i=0; i<s.length; i++)
{
if (s[i].substr(0,5) == "help=")
{
var h = s[i].split("~");
this.s10ctl.context_menu_step(h[0], f);
return noaction(this.s10ctl, e);
};
};
i++;
var parent = de.parent;
if (parent != "")
{
de = repository.dataelements[parent];
}
else
{
de = null;
};
};
return noaction(this.s10ctl, e);
}
this.cxm =
function(f, e)
{
if (this.allowui()) this.s10ctl.contextmenu(f);
return noaction(this.s10ctl, e);
}
this.close_ctm_popup =
function()
{
contextsubmenu_close(this, 0);
if (mypopupclose(this.ctmPopup))
{
this.ctmPopup = null;
};
}
this.close_msg_popup =
function()
{
if (mypopupclose(this.msgPopup))
{
this.msgPopup = null;
};
}
this.dia_popup_close_from_img =
function(img)
{
if (popuplevel<1) return;
var f = img.parentNode.parentNode.parentNode;
var base_scrdata = scrdata_stack[popuplevel-1];
if (f != base_scrdata.diaPopup.element) return;
if (recording_feedback != null)
{
try
{
recording_feedback(scrdata_stack[popuplevel].applid + "." + scrdata_stack[popuplevel].screenid + "°" + "~dia_popup_close" + "°" + ""+ "°" + "");
}
catch(e){;};
};
base_scrdata.dia_popup_close();
}
this.dia_popup_close =
function()
{
if (mypopupclose(this.diaPopup))
{
this.diaPopup = null;
this.disable_input();
popuplevel--;
if (popuplevel > 0)
{
scrdata_stack[popuplevel-1].dia_popup_set_active();
};
this.s10ctl.inlinecallscreenreturn();
};
}
this.dia_popup_set_inactive =
function()
{
var s = this.diaPopup.element.firstChild.style;
if (this.diaPopupHeaderbgcolor == '') this.diaPopupHeaderbgcolor =  s.backgroundColor;
s.backgroundColor = '#858585';
var t = this.diaPopup.element.firstChild.firstChild.style;
t.color = '#d4d0c8';
}
this.dia_popup_set_active =
function()
{
var s = this.diaPopup.element.firstChild.style;
s.backgroundColor =  this.diaPopupHeaderbgcolor;
var t = this.diaPopup.element.firstChild.firstChild.style;
t.color = '#fff';
}
this.dia_popup_fullscreen =
function(img)
{
var f = img.parentNode.parentNode.parentNode;
var base_scrdata = scrdata_stack[popuplevel-1];
if (f != base_scrdata.diaPopup.element) return;
if (base_scrdata.diaPopup == null) return;
if (base_scrdata.diaPopup.fullscreen) return;
if (base_scrdata.diaPopupFullscreen)
{
base_scrdata.diaPopupFullscreen = false;
f.style.top    =  base_scrdata.diaPopupTop     + "px";
f.style.left   =  base_scrdata.diaPopupLeft    + "px";
f.style.width  =  base_scrdata.diaPopupWidth   + "px";
f.style.height =  base_scrdata.diaPopupHeight  + "px";
img.src = img.src.replace('fullscreenoff.gif', 'fullscreen.gif');
}
else
{
base_scrdata.diaPopupFullscreen = true;
base_scrdata.diaPopupTop  = f.style.top.toNumber();
base_scrdata.diaPopupLeft = f.style.left.toNumber();
f.style.top  =  "0px";
f.style.left =  "0px";
f.style.width =  "100%";
f.style.height = "100%";
img.src = img.src.replace('fullscreen.gif', 'fullscreenoff.gif');
};
}
this.close_popups =
function()
{
this.close_ctm_popup();
if (!this.popupclick) this.close_msg_popup();
this.popupclick = false;
this.quickhelpfocus = null;
}
this.allowui =
function()
{
if (this.lastfocus && typeof(this.lastfocus.name) == 'unknown')
{
this.lastfocus = null;
};
if (this.s10ctl.mymodaltimer != null)
{
this.s10ctl.mymodalwnd.focus();
return false;
};
this.close_ctm_popup();
if (this.s10ctl.serverwait)
{
return false;
};
if (this.diaPopup != null)
{
return false;
};
return true;
}
this.disable_input =
function()
{
this.state_disable_input = true;
}
this.cursor_normal =
function()
{
if (this.cursor_object == null) return;
if (typeof(this.cursor_object.style) == "object") this.cursor_object.style.cursor = this.cursor_object_style;
if (typeof(this.cursor_object.ownerDocument) == "object"
&& typeof(this.cursor_object.ownerDocument.body) == "object"
&& this.cursor_object.ownerDocument.body != null
&& typeof(this.cursor_object.ownerDocument.body.style) == "object")  this.cursor_object.ownerDocument.body.style.cursor = 'auto';
this.cursor_object = null;
}
this.cursor_wait  =
function(f)
{
if (f == null) return;
if (f == this.cursor_object) return;
if (typeof(f.style) != "object") return;
if (this.cursor_object != null) this.cursor_normal();
this.cursor_object = f;
this.lastfocus = f;
this.cursor_object_style = f.style.cursor;
f.style.cursor = "wait";
if (typeof(f.ownerDocument) == "object"
&& typeof(f.ownerDocument.body) == "object"
&& f.ownerDocument.body != null
&& typeof(f.ownerDocument.body.style) == "object")  f.ownerDocument.body.style.cursor = 'wait';
}
this.ttgg =
function(f)
{
if (!this.allowui()) return;
if (f.tagName == 'A')
{
f= f.previousSibling.previousSibling.previousSibling;
};
var h = f;
while (h.tagName != 'A')
{
h = h.nextSibling;
};
h.focus();
var s = f.parentNode.nextSibling;
if (s.style.display == 'none')
{
f.src   = s10.icontreeminus;
s.style.display = 'block';
this.s10ctl.treeplus(s);
}
else
{
f.src   = s10.icontreeplus;
s.style.display = 'none';
this.s10ctl.treeminus(s);
};
}
this.ttpt =
function(f)
{
if (!this.allowui()) return;
if (f.tagName == 'A')
{
f.focus();
f= f.previousSibling.previousSibling.previousSibling;
};
var s = f.parentNode.nextSibling;
if (typeof(f.s10expand) != "string" || f.s10expand != "1")
{
f.s10expand = "1";
this.s10ctl.treenodeexpand(s);
s.style.display = 'block';
f.src     = icontreeminus;
}
else
{
this.ttgg(f);
};
}
this.ttscb =
function(f)
{
if (!this.allowui()) return;
var cb = f.previousSibling;
cb.checked = !cb.checked;
this.ttcb(cb);
}
this.ttggl =
function(f)
{
if (!this.allowui()) return;
while(f.tagName != 'A')
{
f = f.nextSibling;
};
f.onclick(f);
}
this.ttptl =
function(f)
{
if (!this.allowui()) return;
while(f.tagName != 'A')
{
f = f.nextSibling;
};
f.onclick(f);
}
this.ttns =
function(f)
{
if (!this.allowui()) return;
while (f.tagName != 'A')
{
f = f.nextSibling;
};
f.focus();
this.s10ctl.treenodeclicked(f);
return false;
}
this.tcxm =
function tcxm(f,c)
{
if (!this.allowui()) return;
while (f.tagName != 'A')
{
f = f.nextSibling;
};
f.focus();
this.s10ctl.treecontextmenu(f, c);
return false;
}
this.ttcb =
function(f)
{
if (!this.allowui()) return;
var b = '0';
if (f.checked == true)
{
b = '1';
};
this.s10ctl.treenodecheckbox(f, b);
}
this.windowScrollX =
function(w)
{
var wnd = w;
if (!wnd) wnd = this.appl_wnd;
if (wnd == null) wnd = this.window;
if (wnd.document.body.scrollLeft) return wnd.document.body.scrollLeft;
return wnd.document.documentElement.scrollLeft;
}
this.windowScrollY =
function(w)
{
var wnd = w;
if (!wnd) wnd = this.appl_wnd;
if (wnd == null) wnd = this.window;
if (wnd.document.body.scrollTop) return  wnd.document.body.scrollTop;
return wnd.document.documentElement.scrollTop;
}
this.windowwidth =
function(w)
{
var wnd = w;
if (!wnd) wnd = this.appl_wnd;
if (wnd == null) wnd = this.window;
if (wnd.innerWidth)
{
return wnd.innerWidth;
}
else
{
var doc = wnd.document;
if (doc.body && doc.body.offsetWidth)
{
return doc.body.offsetWidth;
}
else
{
return 0;
}
}
}
this.windowheight =
function(w)
{
var wnd = w;
if (!wnd) wnd = this.appl_wnd;
if (wnd == null) wnd = this.window;
if (wnd.innerHeight)
{
return wnd.innerHeight;
}
else
{
var doc = wnd.document;
if (doc.body &&doc.body.offsetHeight)
{
return doc.body.offsetHeight;
}
else
{
return 0;
}
}
}
this.initresizefullheight =
function(tb, s)
{
if (tb.height == 0) return;
var b = 0;
if (s.substr(3,1) == ',') b = parseInt(s.substr(4), 10);
if (! (b > -1)) b = 0;
var r = this.resizefullheight;
var wnd = myparentWindow(tb.ownerDocument);
var fres = function(){r(tb, wnd, b);};
fres();
wnd.onresize = fres;
}
this.resizefullheight =
function(tb, wnd, b)
{
var H = wnd.innerHeight;
if (!H) H = wnd.frameElement.clientHeight;
if (b<16) b = 16;
var h = H - relPosTop(tb) - b;
if (h>50) tb.height = h;
}
this.change_style =
function(obj, val)
{
var iv = 1
while (val[iv])
{
switch(val[iv].substr(0,1))
{
case "c":
if (val[iv] == "c")
{
obj.style.color = '';
break;
};
obj.style.color = '#' + val[iv].substr(1);
break;
case "b":
if (val[iv] == "b")
{
obj.style.backgroundColor = '';
break;
};
obj.style.backgroundColor = '#' + val[iv].substr(1);
break;
case "f":
this.application_focus = obj;
break;
case "i":
if (val[iv] == "i")
{
obj.style.backgroundImage = '';
break;
};
var img = filepath(decodeURIComponent(val[iv].substr(1)));
obj.style.backgroundImage = "url(" + img + ")";
obj.style.backgroundRepeat = 'no-repeat';
break;
case "r":
if (val[iv].substr(1) == "1")
{
if (is_checkboxany(obj))
{
obj.disabled = true;
}
else
{
obj.setAttribute('readOnly', true);
var cn = obj.className;
cn = cn.replace('input', 'output');
cn = cn.replace('focus','');
cn = cn.replace('err','');
cn = cn.replace('req','');
obj.className = cn;
if (this.lastfocus = obj)
{
if (mypopupclose(this.icopopup)) this.icopopup = null;
};
};
}
else
{
if (is_checkboxany(obj))
{
obj.disabled = false;
}
else
{
obj.setAttribute('readOnly', false);
};
};
break;
case "t":
obj.title =  decodeURIComponent(val[iv].substr(1));
break;
case "y":
obj.style.cssText =  decodeURIComponent(val[iv].substr(1));
break;
case "u":
if (val[iv].substr(1) == "1")
{
obj.style.textDecoration = 'underline';
}
else
{
obj.style.textDecoration = 'none';
};
break;
case "s":
if (!is_cell(obj)) break;
if (val[iv].substr(1) == "1")
{
if (obj.style.color == '' && obj.style.backgroundColor == '')
{
obj.style.color = style_rowselect_color;
obj.style.backgroundColor = style_rowselect_backgroundColor;
};
}
else
{
var old_color = obj.style.color;
var old_backgroundColor = obj.style.backgroundColor;
obj.style.color = style_rowselect_color;
obj.style.backgroundColor = style_rowselect_backgroundColor;
if (old_color = obj.style.color && old_backgroundColor == obj.style.backgroundColor)
{
obj.style.color = '';
obj.style.backgroundColor = '';
}
else
{
obj.style.color = old_color;
obj.style.backgroundColor = old_backgroundColor;
};
};
break;
};
iv = iv + 1;
};
}
};
function is_hta()
{
try
{
return (top.location.href.endsWith('.hta'));
}
catch(e){;};
return false;
}
function hta_assert()
{
if (s10hta == null)
{
s10hta =  new ActiveXObject("S10hta.session");
if (s10hta == null) alert("Please install ActiveX object 'S10hta.session'");
};
};
function hta_logon(scrdata, user, password, options)
{
hta_assert();
var path = top.location.href;
if (path.startsWith("file:/" + "/" + "/"))
{
path = path.substr(8);
};
var k = path.lastIndexOf("/");
path = path.substr(0, k+1) + "programs/smaragd.dll";
return s10hta.Logon(path, user, password, "hta=yes;" + options);
};
function hta_step(scrdata, sessionid, ifields, ivalues, action,ofields, tfields)
{
hta_assert();
return s10hta.Step(sessionid, ifields, ivalues, action,ofields, tfields);
};
function hta_logoff(scrdata, sessionid)
{
hta_assert();
return s10hta.Logoff(sessionid);
};
function S10Quickhelp(b)
{
if (b == null)
{
return quickhelp;
};
if (b == true)
{
quickhelp = true;
}
else
{
quickhelp = false;
};
return quickhelp;
}

