var labelWin=0;
var popUpWin=0;
var popUpWin2=0;
function labelWindow(URLStr, scrollbar, resizable, left, top, width, height)
{
  if(labelWin)
  {
    if(!labelWin.closed) labelWin.close();
  }
  labelWin = open(URLStr, 'labelwin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbar+',resizable='+resizable+',copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
function openWin(linkURL)
{
  if(popUpWin)
  {
  if (popUpWin && popUpWin.open && !popUpWin.closed) popUpWin.close();
  }
	var w = 700, h = 400; // default sizes
	var x = 100, y = 150; // default sizes
    var w1 = 100, h1 = 150;
	if (window.screen) {
	  if( typeof( window.screen.availWidth ) == 'number' ) {
	  w = window.screen.availWidth - 100;
	  h = window.screen.availHeight - 150;
	  }
	}
  popUpWin = window.open(linkURL, 'detailpage', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+w+',height='+h+',left=100,top=150,screenX=100,screenY=150');
  bringToTop = popUpWin.focus();
}
function closeWin() {
  if (popUpWin && popUpWin.open && !popUpWin.closed) popUpWin.close();
}

function openWin2(linkURL, width, height)
{
  if(popUpWin2)
  {
  if (popUpWin2 && popUpWin2.open && !popUpWin2.closed) popUpWin2.close();
  }
  w = width + 20;
  h = height + 20;
  popUpWin2 = window.open(linkURL, 'win2', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+w+',height='+h+',left=150,top=150,screenX=150,screenY=150');
  bringToTop = popUpWin2.focus();
}
function closeWin2() {
  if (popUpWin2 && popUpWin2.open && !popUpWin2.closed) popUpWin2.close();
}
