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 imagePopup(src)
{
	overlib('<img src="' + src + '">', WIDTH, 500, HEIGHT, 400, HAUTO, VAUTO);
/*	function popupOut(event)
	{
		target.style.display='none';
	}

	target.style.display = '';
	target.childNodes[0].src = src;
	target.style.left = 0;
	obj.onmouseout = popupOut;*/
}

function imagePopupMove(obj, event, target, align)
{
	var mult1 = align == 'left'?-1:1;
	var mult2 = align == 'left'?-1:0;
	target.style.left = event.clientX + mult1 * 10 + mult2 * target.clientWidth;
	target.style.top = event.clientY + 10 + pageYOffset;
}

function triggerType(type)
{
	document.getElementById('row_company').style.display = (type != 0)?'none':'';
	document.getElementById('row_post').style.display = (type != 0)?'none':'';
	document.getElementById('row_age').style.display = (type != 1)?'none':'';
	document.getElementById('row_occupation').style.display = (type != 1)?'none':'';
	document.getElementById('row_interest').style.display = (type != 0)?'none':'';
	document.getElementById('row_direction').style.display = (type != 0)?'none':'';
}