/****************************************************/
function showpic(p,w,h)
{
	var sw = screen.width;
	var sh = screen.height;
	var ratio = w / h;
	var coef = 0.75;
	if( (w > sw) || ( h > sh) )
	{
		if(ratio > 1)
		{
			neww = sw * coef;
			h = h * (neww / w);
			w = neww;
		}
		else
		{
			newh = sh * coef;
			w = w * (newh / h);
			h = newh;
		}
	} 
	l = (screen.width - w)/2;
  t = (screen.height - h)/2;
	var address = "showpic.php?p=" + p + "&w=" + w + "&h=" + h;
	var theWindow = window.open(address,"","HEIGHT=" + h + ",WIDTH=" + w + ",resizable=1");
  theWindow.moveTo(l,t); 
}
/****************************************************/
function POP(a,b)
{
	var theWindow = window.open(a,"",b);
	theWindow.moveTo(0,0);
}
/****************************************************/
function showplayer(p,w,h)
{
	var w = 600;
	var h = 580;
	var sw = screen.width;
	var sh = screen.height;
	var ratio = w / h;
	var coef = 0.75;
	if( (w > sw) || ( h > sh) )
	{
		if(ratio > 1)
		{
			neww = sw * coef;
			h = h * (neww / w);
			w = neww;
		}
		else
		{
			newh = sh * coef;
			w = w * (newh / h);
			h = newh;
		}
	} 
	l = (screen.width - w)/2;
  	t = (screen.height - h)/2;
	var theWindow = window.open("player.php","Oxtron_ArtMaster_Player","HEIGHT=" + h + ",WIDTH=" + w + ",resizable=1");
  	theWindow.moveTo(l,t); 
}
/****************************************************/

