function showlayer(obj,Layer){
	var ShowTop,ShowLeft;
	ShowTop=parseInt(event.clientY)+parseInt(document.body.scrollTop)-parseInt(event.offsetY)-2;
	ShowLeft=parseInt(event.clientX)+parseInt(document.body.scrollLeft)-parseInt(event.offsetX)-2;
	if(obj.submenu=="right"){
		ShowLeft+=parseInt(obj.offsetWidth);
	}else if(obj.submenu=="bottom_left"){
		ShowTop+=parseInt(obj.offsetHeight);
	}else if(obj.submenu=="bottom_right"){
		ShowTop+=parseInt(obj.offsetHeight);
		ShowLeft-=parseInt(Layer.offsetWidth);
		ShowLeft+=parseInt(obj.offsetWidth);
	}else if(obj.submenu=="left"){
		ShowLeft-=parseInt(Layer.offsetWidth);
	}else if(obj.submenu=="top"){
		ShowTop-=parseInt(Layer.offsetHeight);
	}
	Layer.style.top=ShowTop;
	Layer.style.left=ShowLeft;
	Layer.style.display="";
}
function hiddenlayer(Layer){
	Layer.style.display="none";
}



var imgObj,popwidth,popheight,scrolls;
function checkimg(theURL){
	if (typeof(imgObj) == "object"){
		if(imgObj.width!=0 &&imgObj.height!=0){
			popwidth=(imgObj.width>screen.width)?screen.width:(imgObj.width+6);
			popheight=(imgObj.height>screen.height)?screen.height:(imgObj.height+26);
			scrolls=(imgObj.height>screen.height||imgObj.width>screen.width)?"":"scroll:no;";
			window.showModalDialog("pop.htm", theURL, "dialogWidth:"+popwidth+"px; dialogHeight:"+popheight+"px; status:no; directories:yes;"+scrolls+"Resizable=no; help:no;"  );
			//alert(theURL+":"+imgObj.width+"¡Á"+imgObj.height);
		}
		else{
			setTimeout("checkimg('" + theURL + "')", 50);
		}
	}
}
function fpop(theURL) { //v2.0
	imgObj = new Image();
	imgObj.src = theURL;
	checkimg(theURL);
	  // ÉèÖÃÍ¼ÏñÔ´
	return false;
}




