var dystart;var qTime=0;var vTime=0;var pView=0;var tTime;function timeSet(){dystart=new Date();return true}function getValue(b){var c=0,a;if(b!=null){if(b.length!=null){for(a=0;a<b.length;a++){c=c+parseInt(b[a].getAttribute("value"),10)}}else{c=b.getAttribute("value")}}return c}var viewRatio=50;var maxViewTime=5000;function timecheck(h,f){var b,k,g,j,i,d,a,c,e;b=document.getElementById("queryTbl");if(b==null||dystart==0||dystart==null){return}k=document.getElementById("viewTbl");g=document.getElementById("pageTbl");j=document.getElementById("totalTbl");i=getValue(h);d=getValue(f);a=new Date();c=(a-dystart-i-d);e=(a-dystart);c=(c<0)?0:c;j.style.backgroundColor="transparent";b.title="DB: "+i+" [ms]";k.title="JSP: "+d+" [ms]";g.title="IE: "+c+" [ms]";j.innerHTML=Math.round(e/100)/10+" [s]";if(e>maxViewTime){j.style.backgroundColor="#ffff33";viewRatio=viewRatio*maxViewTime/e}b.innerHTML="&nbsp;";k.innerHTML="&nbsp;";g.innerHTML="&nbsp;";b.width=Math.floor(i/viewRatio+1);k.width=Math.floor(d/viewRatio+1);g.width=Math.floor(c/viewRatio+1);dystart=0}$(function(){$(".toggleTop").click(function(){toggleTopFrame(this)});$(".toggleSub").click(function(){toggleSubFrame(this)});$(".toggleAll").click(function(){toggleAllFrame(this)})});var old_cols=null;var old_rows=null;var old_prnt=null;var toggleCol=false;var toggleRow=false;var toggleAll=false;var togglePrnt=false;function toggleTopFrame(a){var c,b,d;c="TOP_FRAME";b=top.document.getElementById(c);if(!b){d=top.document.getElementsByName(c);if(d.length==1){b=d[0]}}if(!b){return}if(b.cols.indexOf(",")<0){return}if(toggleCol){toggleCol=false;if(old_cols.split(",")[0]<=10||old_cols.split(",")[0]>512){b.cols="160,*"}else{b.cols=old_cols}if(a!=null){if(a.className.length==0){a.style.backgroundColor="Red"}else{a.className="toggleTop"}}}else{toggleCol=true;old_cols=b.cols;b.cols="10,*";if(a!=null){if(a.className.length==0){a.style.backgroundColor="Gray"}else{a.className="toggleOff"}}}}function toggleSubFrame(a){var c,h,f,e,g,d,b;c="SUB_FRAME";h=parent.document.getElementById(c);if(!h){f=parent.document.getElementsByName(c);if(f.length==1){h=f[0]}}if(!h){return}if(toggleRow){toggleRow=false;if(old_rows){h.rows=old_rows}if(a!=null){if(a.className.length==0){a.style.backgroundColor="Green"}else{a.className="toggleSub"}}}else{toggleRow=true;if(h.rows.split(",")[0]<1000){old_rows=h.rows;if(parent.QUERY!=null){e=parent.QUERY.document.getElementById("QUERY_TBL");if(e!=null){g=h.rows.split(",");d=(e.offsetTop+e.offsetHeight+e.parentNode.offsetTop)+",*";for(b=2;b<g.length;b++){d=d+","+g[b]}h.rows=d}}}if(a!=null){if(a.className.length==0){a.style.backgroundColor="Gray"}else{a.className="toggleOff"}}}}function toggleAllFrame(a){if(toggleAll){toggleAll=false;if(toggleCol){toggleTopFrame()}if(toggleRow){toggleSubFrame()}if(a!=null){if(a.className.length==0){a.style.backgroundColor="Blue"}else{a.className="toggleAll"}}}else{toggleAll=true;if(!toggleCol){toggleTopFrame()}if(!toggleRow){toggleSubFrame()}if(a!=null){if(a.className.length==0){a.style.backgroundColor="Gray"}else{a.className="toggleOff"}}}}function toggleFrame(g){var e,c,b,a,f,d;e=parent.document.getElementsByTagName("FRAMESET");if(e.length==1){oSubFrame=e[0]}if(!oSubFrame){return}if(togglePrnt){togglePrnt=false;oSubFrame.rows=old_prnt;if(g){g.innerHTML="(-)"}}else{togglePrnt=true;old_prnt=oSubFrame.rows;c=-1;for(a=0;a<parent.frames.length;a++){if(self.frames.name==parent.frames[a].name){c=a;break}}f=oSubFrame.rows.split(",");if(g==null){f[c]="0"}else{f[c]=(g.offsetTop+g.offsetHeight+g.parentNode.offsetTop);g.innerHTML="(+)"}d=f[0];for(b=1;b<f.length;b++){d=d+","+f[b]}oSubFrame.rows=d}}function adjustFrameHeightSleep(){if($("body").width()==0){setTimeout(function(){adjustFrameHeightSleep()},10)}else{adjustFrameHeight()}}$(function(){if($("body").width()==0){setTimeout(function(){adjustFrameHeightSleep()},1);return}adjustFrameHeight()});$(function(){if(typeof(h_qryFcs)=="undefined"||h_qryFcs!="false"){focusFirstElm()}});function focusFirstElm(){var g,e,a,c,b,d;g=document.getElementsByTagName("FORM");if(g.length>0){a=false;c=g[0];for(b=0;b<c.elements.length;b++){d=c.elements[b];if(d!=null&&!d.disabled&&!d.readOnly&&(d.type=="text"||d.type=="checkbox"||d.type=="radio"||d.type=="passwd"||d.type=="textarea"||d.type=="select-one"||d.type=="select-multiple")){if(document.getBoxObjectFor){e=document.getBoxObjectFor(d);if(e.width!=0){a=true}}else{if(d.getBoundingClientRect){e=d.getBoundingClientRect();if(e.left!=e.right){a=true}}}if(a){d.focus();break}}}historyBack()}}function focus1(){alert("Old Script Error!!\ncustom/query_info.jsp,custom/result_info.jsp Please delete the following part.\n<script>Tag(Header fix and Focus) , BODY onLoad and oncontextmenu Attribute")};