
var documentroot = 'DR';



	
function openPhoto(p,w,h)
	{
	var window_width = String(Number(w) + 20);
	var window_height = String(Number(h) + 20);
	var window_scroll = "no";
	
	if(screen.width)
		{
		if((Number(w) + 20) > screen.width)
			{
			window_width = String(Number(screen.width) - 80);
			window_scroll = "yes";
			}
		if((Number(h) + 20) > screen.height)
			{
			window_height = String(Number(screen.height) - 80);
			window_scroll = "yes";
			}
		}
	else
		{
		if(w > 560)
			{
			window_height = "560";
			window_scroll = "yes";
			}
		if(h > 400)
			{
			window_height = "400";
			window_scroll = "yes";
			}
		}
	var open_specs = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + window_scroll + ",resizable=no,copyhistory=no,height=" + window_height + ",width=" + window_width + ",top=10,left=10";
	window.open(p,'one',open_specs);
	}


	
	

function popUp(whatType)
{
	var popUpURL, popupName, popUpParams;
	
	switch (whatType)
	{
	case "example" :
		popUpURL = documentRoot + 'example.phtml';
		popupName = 'example';
		popUpParams = 'toolbar=1,status=0,scrollbars=1,resizable=0,height=320,width=500';
		break;
		
	case "normal" :
		popUpURL = arguments[1];
		popupName = 'popup';
		popUpParams = 'toolbar=1,menubar=0,status=1,scrollbars=1,resizable=1,height=570,width=534';
		break;

	default :
		return false;
		break;
	}
	window.open(popUpURL, popupName, popUpParams);
}
