42
| <![CDATA[<script language="JavaScript" type="text/JavaScript">
<!--
function formOnLoadAction() {
// Adiciona as janelas modais como filhas da janela chamadora, pois a chamada não é a window.open()
if (window.dialogArguments && window.dialogArguments.parentWindow) {
var openerWindow = window.dialogArguments.parentWindow;
if (!openerWindow.children) {
openerWindow.children = new Array();
}
try {
openerWindow.children.push(window);
} catch (e) {
// do nothing
}
}
if (top.opener) {
if (top.opener.children) {
if (top.opener.children.indexOf(window) == -1) {
top.opener.children.push(window);
}
} else {
if (!top.opener.parent.children) {
top.opener.parent.children = new Array();
}
if (top.opener.parent.children.indexOf(window) == -1) {
top.opener.parent.children.push(window);
}
}
} else if (mainform.isPopup && !mainform.isPrincipal && !mainform.isLoginForm) {
if (!top.$mainform().children) {
top.$mainform().children = new Array();
}
if (top.$mainform().children.indexOf(window) == -1) {
top.$mainform().children.push(window);
}
}
}
var isformcontainer = true;
var mainframe = null;
if (opener != null) {
try {
mainframe = opener.mainframe;
} catch(e) {
// Só ocorre no Mozilla 2
}
}
try{
if (opener.closewindow)
opener.close();
} catch(e) {}
var sys = 'TR2';
var isDotNET = false;
var isTomcat7 = false;
var formId = $mainform().URLEncode('8872');
var codigo = 'null';
var codFormComp = 'null';
var lastFormZindex = 1000;
;
var unloaded = false;
function formOnUnLoadAction() {
if (!unloaded) {
unloaded = true;
try {
if (mainform.formOnUnLoadAction) {
mainform.disableCloseChildren = true;
mainform.formOnUnLoadAction();
}
} catch(e) {
//Ignora Erros
}
try {
if (mainform.onunload) {
get('form.do?sys=TR2¶m=cancel&formID='+ formId);
mainform.onunload();
}
} catch(e) {
//Ignora Erros
}
try {
get('closeform.do?sys=TR2&action=closeform&formID='+ formId);
} catch(e) {
//Ignora Erros
}
if(mainform.isPrincipal){
closeFormHierarchy(formId);
}
closeFormAndChildren();
try { removeChild(mainform); } catch(e){}
if (opener) {
try { opener.removeChild(window); } catch(e){}
try { opener.removeChild(mainform); } catch(e){}
}
if (parent) {
try { parent.removeChild(window); } catch(e){}
try { parent.removeChild(mainform); } catch(e){}
}
window.mainframe = null;
if (httpPool) {
httpPool.free();
httpPool = null;
}
}
}
function changeTitle(t) {
if (parent && parent.changeTitle && parent != window)
parent.changeTitle(t);
else
document.title = t;
}
function remainSession() {
try {
httpPool.processAsyncGet('remainSession.do?sys=TR2&datetime='+(new Date().getMilliseconds()));
} catch(e) {
//Ignora erros
}
setTimeout(remainSession, 15000000);
}
setTimeout(remainSession, 15000000);
//-->
</script>]]>
|