//open a new window fit to picture
function PopupPic(sPicURL) {
   newWin = window.open( "popup_pic.html?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
	newWin.moveTo(300,300);
}

//open a new window with fixed width and height
var popWin = null;
var winCount = 0;
var winName = "popWin";

function openPopWin(winURL, winWidth, winHeight) {
	var d_winLeft = 100;
	var d_winTop = 100;
	
	winName = "popWin" + winCount++;
	
	closePopWin();
	
	/*if (openPopWin.arguments.length >= 4)
	  winFeatures = ",resizable=yes,scrollbars=yes," + winFeatures
	else
	  winFeatures = ",resizable=yes,scrollbars=yes"
	
	if (openPopWin.arguments.length == 6)
	  winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
	else
	  winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)*/
	
	popWin = window.open(winURL, winName, "width=" + winWidth + "px,height=" + winHeight + "px,resizable=yes,scrollbars=yes");

	popWin.resizeTo(500,550);
}

function closePopWin(){
  if (navigator.appName != "Microsoft Internet Explorer" ||
                           parseInt(navigator.appVersion) >=4)
    if(popWin != null) if(!popWin.closed) popWin.close()
}

function getLocation(winWidth, winHeight, winLeft, winTop){
  return ""
}

//open a new window
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}