/*
上传表单浮动层 兼容FF
2009-9-17 by 56770.Kingdge
Copyright www.56770.com
*/
document.write('<style>#uploadpaneldiv{width:268px !important;width:268px;position:absolute;font:line-height:18px;z-index:100;}.Tips_uploadpaneldiv{POSITION: absolute}</style>');
var uploadxs = {};
uploadxs.pos = (function(){
	var t = {};
	t.getX = function (obj){
        var curleft = 0;
        if (obj.offsetParent)
        {
          while (obj.offsetParent){
             curleft += obj.offsetLeft;
             obj = obj.offsetParent;
          }
          curleft += obj.offsetLeft;
        }
        else if (obj.x) {
          curleft += obj.x;
        }
        return curleft;
    };
    t.getY = function (obj){
    var curtop = 0;
        if (obj.offsetParent){
          while (obj.offsetParent){
             curtop += obj.offsetTop;
             obj = obj.offsetParent;
          }
          curtop += obj.offsetTop;
        }
        else if (obj.y)
          curtop += obj.y;
        return curtop;
    };
	return t;
})();
function Upload_tooltip(c){
	var _tooltips = document.getElementsByTagName('div');
	for (var i=0;i<_tooltips.length;i++) {
		if (_tooltips[i].getAttribute('tooltip') == 'Upload') _tooltips[i].parentNode.removeChild(_tooltips[i]);
	}
	var _tooltip = document.createElement('div');
	_tooltip.innerHTML = '<div id="uploadpaneldiv">'+c+'</div>';
	_tooltip.className = 'Tips_uploadpaneldiv';
	_tooltip.setAttribute('tooltip', 'Upload');
	_tooltip.style.width='200px';
	_tooltip.style.zIndex = '999';
	_tooltip.style.display = 'none';
	return document.body.appendChild(_tooltip);
}
function uploadpanel(dddd,ssss,ffff){
var offsetT = 5;
var offsetL = -120;
var uploadTable=''
uploadTable='<div class="mainbody-block2"><table width=268 border="0" cellspacing="0" cellpadding="0" class="classtable">'
           +'<tr><td height="30" class="classtop" onclick="closediv()" title="点击鼠标关闭" align="right">&nbsp;&nbsp;<a href="http://www.56770.com" target="_blank"><span style="font-size:10px">56770 EShop File Upload</span></a></td></tr>'
           +'<tr><td height="118" align="center" style="background:#F7F3F7"><iframe src="'+ AdminPath +'upfile/Upload_other.asp?formname='+dddd+'&inputname='+ssss+'&foldername='+ffff+'" width="96%" height="118" frameborder="0" scrolling="no"></iframe></td></tr>'
           +'</table></div>';      
var tooltip = Upload_tooltip(uploadTable);
var o = document.getElementById("Upload_"+ ssss +"")
tooltip.style.top=offsetT ? (uploadxs.pos.getY(o) + offsetT) + 'px' : (uploadxs.pos.getY(o) - 80) + 'px';
tooltip.style.left=offsetL ? (uploadxs.pos.getX(o) + offsetL) + 'px' : (uploadxs.pos.getX(o) - 80) + 'px';
tooltip.style.visibility='visible'
tooltip.style.display = 'block';
tooltip.id = 'Upload_tooltip';
return false
}
function closediv(){
	document.getElementById("uploadpaneldiv").style.visibility='hidden'
	document.getElementById("uploadpaneldiv").style.display='none'
}