document.write('<link rel="stylesheet" type="text/css" href="images/skm.css"/>');

var bt, et;
var DH = 0;
var an = 0;
var al = 0;
var ai = 0;
if (document.getElementById) {
    ai = 1; 
    DH = 1;
} else {
    if (document.all) {
        al = 1; 
        DH = 1;
    } else { 
        browserVersion = parseInt(navigator.appVersion); 
        if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {
            an = 1; 
            DH = 1;
        }
    }
} 

function fd(oi, wS) {
    if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); 
    if (al) return wS ? document.all[oi].style: document.all[oi]; 
    if (an) return document.layers[oi];
}

function pw() {
    return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;
}

function findPos(obj)
{
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}
            
function showtips(obj, oi, off, up) {
    if (DH) {
        if(bt != null)
            clearTimeout(bt);

        bt = setTimeout(function(){doShowtips(obj,oi,off,up)}, 1500);
    }
}
 
function hidetips(oi) {
    if(bt != null) {
        clearTimeout(bt);
        bt = null;
    }

    if(et != null) {
        clearTimeout(et);
        et = null;
    }

    ds = fd(oi,1); 
    st = ds.visibility; 
    if (st == "visible" || st == "show") { 
        ds.visibility = "hidden"; 
    }
}
             
function doShowtips(obj, oi, off, up) {
    if(bt != null) {
        clearTimeout(bt);
        bt = null;
    }

    if(et != null) {
        clearTimeout(et);
        et = null;
    }

    var coors = findPos(obj);

    var wp = pw(); 
    ds = fd(oi,1); 
    dm = fd(oi,0); 
    st = ds.visibility; 
    if (dm.offsetWidth) 
        ew = dm.offsetWidth; 
    else if (dm.clip.width) 
        ew = dm.clip.width; 

    if (st != "visible" && st != "show") { 
        if(up == 0) {
            tv = coors[1] + obj.offsetHeight + off; 
        } else {
            tv = coors[1] - dm.offsetHeight - off; 
        }
        
        lv = coors[0]; 
            
        if (lv < 2) 
            lv = 2; 
        else if (lv + ew > wp) 
            lv -= ew/2; 
            
        if (!an) {
            lv += 'px';tv += 'px';
        } 
            
        ds.left = lv; 
        ds.top = tv; 
        ds.visibility = "visible";
        if(up == 1) {
            ds.width = "120 pt";
        }
        et = setTimeout(function(){hidetips(oi)}, 6000);
    }
}

function display(showobj, hideobj){
   var lt = setTimeout(function(){doDisplay(showobj, hideobj)}, 800);
}

function doDisplay(showobj, hideobj){
   if(document.getElementById(showobj).style.display == "none"){
      document.getElementById(showobj).style.display = "inline";
   }
   if(document.getElementById(hideobj).style.display == "inline"){
      document.getElementById(hideobj).style.display = "none";
   }  
}
