/*
上传表单浮动层 兼容FF
*/
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='<table width=268 border="0" cellspacing="0" cellpadding="0" class="classtable">'
           +'<tr><td height="27" class="classtop" onclick="closediv()" title="点击鼠标关闭" align="right">&nbsp;&nbsp;<a href="http://www.Pcwx.cn" target="_blank">Powered by Pcwx.cn</a></td></tr>'
           +'<tr><td class="classtd" height="118" align="center"><iframe src="upfile/Upload_other.asp?formname='+dddd+'&inputname='+ssss+'&foldername='+ffff+'" width="100%" height="118" frameborder="0" scrolling="no"></iframe></td></tr>'
           +'</table>';      
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'
}