/*** 
  Window PopUP
 ***/

var popup_window = null;

function popup(status,url)
{
	if (status == "BIG")
		popup2(750,500,url,"_blank");
	else if (status == "LARGE")
		popup2(520,520,url,"_blank");
	else if (status == "MED")
		popup2(640,480,url,"_blank");
	else if (status == "SMALL")
		popup2(320,240,url,"_blank");
	else if (status == "TINY")
		popup2(200,120,url,"_blank");
	else if (status == "SIGNATURE")
		popup2(440,140,url,"SIGNATURE");
	else
		popup2(580,400,url,"_blank");
}

function popup2(x,y,url,name)
{
  var iMyWidth;
  var iMyHeight;
 
  //gets top and left positions based on user's resolution so hint window is centered.

  //half the screen width minus half the new window width (plus 5 pixel borders).
  iMyWidth = (window.screen.width/2) - ( ( x / 2 ) + 10 );

  //half the screen height minus half the new window height (plus title and status bars).
  iMyHeight = (window.screen.height/2) - ( ( y / 2 ) + 50 ); 


  popup_window = window.open( url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=yes,height=" + y + ",width=" + x + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight )
  popup_window.focus();

}
