function normalpopup(url, winid, width, height)
{
	return window.open(url ,winid ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=yes,resizable=yes,menubar=no,status=no,directories=no,location=no');
}

function centerpopup(url, winid, width, height)
{
	return window.open(url ,winid ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=no,resizable=no,menubar=no,status=no,directories=no,location=no');
}

function popimg(url, title, width, height)
{
	str="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\"><html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">\n<title>"+title+"</title>\n</head>\n<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>\n<img src='"+url+"' alt='"+title+"'>\n</body>\n</html>";
	f_win = window.open(url ,"BigImage" ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=no,resizable=yes,menubar=no,status=no,directories=no,location=no');
	f_win.document.writeln(str);
	f_win.focus();
	f_win.document.close();
}

function popup(url, title, width, height)
{
	f_win = window.open(url ,"" ,'width='+width+',height='+height+',top='+((screen.height/2)-(height/2))+',left='+((screen.width/2)-(width/2))+',toolbar=no,scrollbars=yes,resizable=yes,menubar=no,status=no,directories=no,location=no');
	f_win.focus();
}

function popup_imagef(url)
{
	var wnd = window.open('/~client/popup_iresizer.html?'+url ,'' ,'toolbar=no,scrollbars=no,resizable=no,menubar=no,status=no,directories=no,location=no');
}

function toggleById( el )
{
	el = document.getElementById(el);
	if ( el ) el.style.display = ( el.style.display == "none" ) ? "block" : "none";
}

function setById( el, visible )
{
	el = document.getElementById(el);
	if ( el ) el.style.display = (visible) ? "block" : "none";
}
