function PopupWindow(href, w, h, settings, offsett, offsetl) 
{
	offsett = (offsett) ? offsett:0;
	offsetl = (offsetl) ? offsetl:0;
	leftpos = (screen.width) ? (screen.width/2)-(w/2) : 0;
	toppos = (screen.height) ? (screen.height/2)-(h/2) : 0;
	settings = 'height='+h+',width='+w+',top='+(toppos+offsett)+',left='+(leftpos+offsetl)+','+settings;
	return window.open(href, 'popupwindow'+Math.floor(Math.random() * 10000), settings)
}