
function getClientWidth()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
}

function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:window.innerHeight;
}

function winInfo(id)
{
	var Obj=document.getElementById(id);
	var width=parseInt(Obj.style.width);
	var height=parseInt(Obj.style.height);
	
	var ObjW=parseInt(width)/2;
	var ObjH=parseInt(height)/2;
	
	var W=parseInt(getClientWidth()/2-ObjW); // + getBodyScrollLeft();
	var H=parseInt(getClientHeight()/2-ObjH); // + getBodyScrollTop();
	
	
	Obj.style.display="block";
	Obj.style.position="absolute";
	Obj.style.top=H+"px";
	Obj.style.left=W+"px";
	Obj.style.width=width+"px";
	Obj.style.height=height+"px";
	Obj.style.position="fixed";
	
		//alert("Размеры объекта: "+width+" x "+height+"\nРазмеры пополам: "+ObjW+" x "+ObjH+"\nРазрешение браузера: "+getClientWidth()+" x "+getClientHeight()+"\nНовые координаты: "+W+" x "+H+"\nИстинные координаты: "+Obj.style.top+" x "+Obj.style.left+" - "+Obj.style.position);

}

function winInfoDestroy(id)
{
	var divObj=document.getElementById(id);
	divObj.style.position="absolute";
	divObj.style.display="none";
}

function getBodyScrollTop()
{
  return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
}

function getBodyScrollLeft()
{
  return self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft) || (document.body && document.body.scrollLeft);
}



	var i=1;
	function addField()
	{
		i++;
		var list=document.getElementById("uploadform");
		
		var newli=document.createElement("li");
		var newin=document.createElement("input");
		newin.setAttribute("type","file");
		newin.setAttribute("name","myfile"+i);
		
		newli.appendChild(newin);
		list.appendChild(newli);
	}


