function preview(page,width,height)
{
	var left,top,screenWidth,screenHeight;

	// общий синтаксис
	if (self.innerHeight)
	{
		left = self.innerWidth;
		top = self.innerHeight;
	// IE 6 Strict Mode
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		left = document.documentElement.clientWidth;
		top = document.documentElement.clientHeight;
	// Остальные версии IE
	}
	else if (document.body)
	{
		left = document.body.clientWidth;
		top = document.body.clientHeight;
	}

	// определяем разрешение монитора
	if (self.screen)
	{
		screenWidth = screen.width;
		screenHeight = screen.height;
	}

	screenWidth = screenWidth-left;
	screenHeight = screenHeight-top;

	left = ((left-width)/2)+(screenWidth/2);
	top = ((top-height)/2)+(screenHeight/2);

	var open = window.open(page,null,'titlebar=0, status=0, toolbar=0, location=0, menubar=0, scrollbars=1, height='+height+', width='+width+', left='+left+', top='+top);
	open.opener = window;
}

function doRate(id,star){
    $("#rating").load("/vote.php?id="+id+"&vote="+star);
    $("#hint").css({"visibility":"hidden"});
    return false;
}
