var UserAgent = navigator.userAgent;
var AppVersion = (((navigator.appVersion.split('; '))[1].split(' '))[1]);
var divWidth;
var realWidth;
var stat = false;

document.write( "<div id=LayerDiv style='position:absolute;top:-100px;z-index:3;'></div>" );

function showLayer(f, e) {
	if(UserAgent.indexOf("MSIE") < 0 || AppVersion < 5 ) {
		return;
	}

	if(stat) {
		if(e.x < realWidth / 2) {
			document.all.LayerDiv.style.left = e.x+document.body.scrollLeft + 5;
		}
		else {
			document.all.LayerDiv.style.left = e.x+document.body.scrollLeft - divWidth - 5;
		}
		document.all.LayerDiv.style.top = e.y + document.body.scrollTop + 5;
    }
    document.all.LayerDiv.style.display = "block";
    return;
}   

function showLayer_ALT(t, f, e) {
	if(UserAgent.indexOf("MSIE") < 0 || AppVersion < 5 ) { 
		return;
	}

	var sub_msg = "";
	realWidth = document.body.clientWidth - 148;
	divWidth = document.all.LayerDiv.scrollWidth;

	if(f.msg && f.msg.value) {
		sub_msg = f.msg.value;
	}

	if(sub_msg) {
		stat = true;
		document.all.LayerDiv.innerHTML = ""
		   +"<table width=400 cellspacing=0 cellpadding=0"
		   +"<tr><td></td></tr></table>";

	   content = ""
		   +"<table height=20 bgcolor=#FEFFCB cellspacing=0 cellpadding=0"
		   +" style='filter:alpha(opacity=100); border:1 solid #AFB086'>"
		   +"<tr><td style='text-indent:2px;cursor:hand;font-size:9pt;height:16px;padding-top:2px;word-break:break-all;'>"
		   +"<font color=black style='font-size:9pt'>"+sub_msg+"</font>"
		   +"</td><td width=10 nowrap></td></tr></table>";

	   document.all.LayerDiv.children(0).cells(0).innerHTML = content;
	   showLayer(f, e);
   }
	else {
	   stat = false;
   }
   return;
}

function hideSelectGuide_ALT() {
	stat = false;
	document.all.LayerDiv.innerHTML = "";
	document.all.LayerDiv.style.display = "none";
	return;
}
