// Window functions by Piotr Dzwonnik



function openWindowCenter(url,windowname,width,height)
{
	var popupwindow = window.open(url,windowname,'status,width='+width+', height='+height+', top='+(screen.availHeight-height)/2+',left='+(screen.availWidth-width)/2); 
	popupwindow.focus();
}

function openWindowCenterEx(url,windowname,width,height,adds)
{
	var popupwindow = window.open(url,windowname,'width='+width+', height='+height+', top='+(screen.availHeight-height)/2+',left='+((screen.availWidth-width)/2) + ','+adds); 
	popupwindow.focus();
}