// Java Document

function imGetLayer(sName) {return document.all?document.all[sName]:document.getElementById?document.getElementById(sName) : "";}

// PopupWin

function imPopUpWin(sUrl,w,h,cb,sb){
if (cb=='yes') 
sProp=''; else {
if ((w==-1) || (h==-1)) {
sProp= 'width='+screen.width+',height='+screen.height+',top=0,left=0,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; } else {
l=(screen.width)?(screen.width-w)/2:100; t=(screen.height)?(screen.height-h)/2:100; sProp='width='+ w +',height='+ h +',top='+ t +',left='+ l +',scrollbars='+ sb +',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; }}
oWin=window.open(sUrl,'',sProp); }

// ToolTip

function IMTip() {
var el = imGetLayer('jgToolTip'); var oldmove; var attached = false; var effect_step = 0; var effect_timer = null; this.imShown = false; this.show = function(obj,content,position,x,y,content_style,must_move,effect,pos_x,pos_y) {
this.imLeft = 0; this.imRight = 0; this.imTop = 0; this.imBottom = 0; el.style.top = '-10000px'; el.style.bottom = ''; el.style.left = '-10000px'; el.style.right = ''; switch(position) {
case 'tl': this.imLeft = 1; this.imTop = 1; break; case 'tr': this.imRight = 1; this.imTop = 1; break; case 'bl': this.imLeft = 1; this.imBottom = 1; break; case 'br': this.imRight = 1; this.imBottom = 1; break; }
this.imX = (x ? x : 0); this.imY = (y ? y : 0); el.style.display = 'none'; el.innerHTML = '<div style=\"' + content_style + '\">' + content + '</div>'; el.imMustMove = must_move; this.imShown = true; switch(effect) {
case 0: el.style.display = ''; break; case 1: clearTimeout(this.effect_timer); this.effect_step = 0; el.style.height = ''; this.fade(); break; case 2: clearTimeout(this.effect_timer); this.effect_step = 0; el.style.height = ''; el.style.opacity = 0.9; el.style.filter = 'alpha(opacity=90)'; el.style.visible='hidden'; el.style.display = ''; elch = el.clientHeight; el.style.display = 'none'; el.style.visible='visible'; this.slide(elch); break; }
if(el.imMustMove == true) {
this.detach(); document.onmousemove = function(e) {
this.imTip.move(e); }; el.onmouseover = function(e) {
imt.move(e); }; }
else {
if(this.imLeft == 1) {
el.style.left = (pos_x != undefined ? pos_x : (this.mouseX-this.imX+10)) + 'px'; }
else {
el.style.right = (pos_x != undefined ? document.documentElement.clientWidth-pos_x : (document.documentElement.clientWidth-this.mouseX-this.imX+10)) + 'px'; }
if(this.imTop == 1) {
el.style.top = (pos_y != undefined ? pos_y : (this.mouseY-this.imY+10)) + 'px'; }
else {
el.style.bottom = (pos_y != undefined ? document.documentElement.clientHeight-pos_y : (document.documentElement.clientHeight-this.mouseY+this.imY+10)) + 'px'; }}
return false; }; this.mousepos = function(evt) {
var e = (evt) ? evt : window.event; this.mouseX = ((e.pageX) ? e.pageX : (e.clientX + document.documentElement.scrollLeft)); this.mouseY = ((e.pageY) ? e.pageY : (e.clientY + document.documentElement.scrollTop)); }; this.attach = function() {
this.attached = true; document.imOldOnMouseMove = document.onmousemove; document.imTip = this; document.onmousemove = function(e) {
this.imTip.mousepos(e); }; }; this.detach = function() {
if(this.attached) {
this.attached = false; document.onmousemove = document.imOldOnMouseMove; }}; this.fade = function() {
if(this.effect_step <= 100) {
el.style.opacity = this.effect_step/100; el.style.filter = "alpha(opacity=" + this.effect_step + ")"; if(this.effect_step == 0) {
el.style.display = ''; }
this.effect_step += 15; this.effect_timer = setTimeout('imt.fade()',50); }}; this.slide = function(height) {
if(this.effect_step <= 100) {
el.style.height = height/100*this.effect_step + 'px'; if(this.effect_step == 0) {
el.style.display = ''; }
this.effect_step += 5; this.effect_timer = setTimeout('imt.slide(' + height + ')',25); }}; this.move = function(evt) {
var e = (evt) ? evt : window.event; if(this.imLeft != 0) {
el.style.left = (((e.pageX) ? e.pageX : (e.clientX + document.documentElement.scrollLeft))-this.imX+10) + 'px'; el.style.right = ''; }
else {
el.style.right = (((e.pageX) ? document.documentElement.clientWidth-e.pageX : (document.documentElement.clientWidth-e.clientX-document.documentElement.scrollLeft))-this.imX+10) + 'px'; el.style.left = ''; }
if(this.imTop != 0) {
el.style.top = (((e.pageY) ? e.pageY : (e.clientY + document.documentElement.scrollTop))-this.imY+10) + 'px'; el.style.bottom = ''; }
else {
el.style.bottom = ((e.pageY ? document.documentElement.clientHeight-e.pageY : (document.documentElement.clientHeight-e.clientY-document.documentElement.scrollTop))-this.imY+10) + 'px'; el.style.top = ''; }}; this.hide = function() {
this.imShown = false; el.style.display = 'none'; el.innerHTML = ''; el.style.top = '-10000px'; el.style.bottom = ''; el.style.left = '-10000px'; el.style.right = ''; document.onmousemove = document.imOldOnMouseMove; el.onmouseover = function(){}; this.attach(); }; }

function imTipShow(oLink,iVal,iWidth,sBgColor,sBdColor,sFColor,sFont,iSize,bBold,bItalic,sHtml,iMode,bHead) {
oLink.title = ''; var sStyle = 'position: relative; width: '+iWidth+'px; padding: '+iVal[3]+'px 0 '+iVal[3]+'px 0; margin: '+iVal[5]+'px;'; var sBuf = ''+
'<div style="position: absolute; top: 0; left: 0; width: '+iVal[2]+'px; height: '+iVal[3]+'px; background: url(images/tooltip.gif) no-repeat 0 0; overflow: hidden; " ></div>'+
'<div style="position: absolute; top: 0; left: '+iVal[3]+'px; width: '+(iWidth-iVal[2]-iVal[2])+'px; height: '+(iVal[3]-iVal[7])+'px; border-top: '+iVal[7]+'px solid #'+sBdColor+'; background-color: #'+sBgColor+'; overflow: hidden; " ></div>'+
'<div style="position: absolute; top: 0; left: '+(iWidth-iVal[2])+'px; width: '+iVal[2]+'px; height: '+iVal[3]+'px; background: url(images/tooltip.gif) no-repeat -'+iVal[2]+'px 0px; overflow: hidden; " ></div>'+
'<div style="position: absolute; bottom: 0; left: 0; width: '+iVal[2]+'px; height: '+iVal[3]+'px; background: url(images/tooltip.gif) no-repeat 0px -'+iVal[3]+'px; overflow: hidden; " ></div>'+
'<div style="position: absolute; bottom: 0; left: '+iVal[3]+'px; width: '+(iWidth-iVal[2]-iVal[2])+'px; height: '+(iVal[3]-iVal[7])+'px; border-bottom: '+iVal[7]+'px solid #'+sBdColor+'; background-color: #'+sBgColor+'; overflow: hidden; " ></div>'+
'<div style="position: absolute; bottom: 0; left: '+(iWidth-iVal[2])+'px; width: '+iVal[2]+'px; height: '+iVal[3]+'px; background: url(images/tooltip.gif) no-repeat -'+iVal[2]+'px -'+iVal[3]+'px; overflow: hidden; " ></div>'+
'<div style="position: relative; border-left: '+iVal[7]+'px solid #'+sBdColor+'; border-right: '+iVal[7]+'px solid #'+sBdColor+'; background-color: #'+sBgColor+'; padding: 0 '+(3+iVal[7])+'px 0 '+(3+iVal[7])+'px; font: '+iSize+'pt '+sFont+'; color: #'+sFColor+'; '+(bBold==1?'font-weight:bold; ':'')+(bItalic==1?'font-style:italic; ':'')+'">'+
sHtml+
'</div>'; if (iVal[1] != 0)
sBuf += (iVal[1]==1?'<div style="position: absolute; top:-'+(iVal[5]-iVal[7])+'px ; left: '+parseInt(iVal[6]/100*iWidth-iVal[4]/2)+'px; width: '+iVal[4]+'px; height: '+iVal[5]+'px; background: url(images/tooltip.gif) no-repeat -'+(iVal[2]*2)+'px 0px; overflow: hidden; " ></div>':'<div style="position: absolute; bottom:-'+(iVal[5]-iVal[7])+'px ; left: '+parseInt(iVal[6]/100*iWidth-iVal[4]/2)+'px; width: '+iVal[4]+'px; height: '+iVal[5]+'px; background: url(images/tooltip.gif) no-repeat -'+(iVal[2]*2+iVal[4])+'px 0px; overflow: hidden; " ></div>'); imt.attach(); if(iMode >= 0)
imt.show(oLink,sBuf,(iVal[1] == 2 ? 'bl' : 'tl'),parseInt((iWidth)*iVal[6]/100)+iVal[5],0,sStyle,true,iMode); else {
iX = imGetPositionX(oLink,bHead); iY = imGetPositionY(oLink,bHead); imt.show(oLink,sBuf,(iVal[1] == 2 ? 'bl' : 'tl'),parseInt((iWidth-iVal[4])*iVal[6]/100)+iVal[5],0,sStyle,false,Math.abs(iMode)-1,iX,iY+(iVal[1] == 2 ? -iVal[5] : oLink.offsetHeight+iVal[5])); }
return false; }

function imTipHide(){
imt.hide(); imt.detach(); }

