
	var someWin=null;
	function Command(cmd,ID1,ID2){
		var str;
		switch(cmd) {
			case "PhotoGaleryComment":
				someWin = openWin(cmd, "PhotoGaleryComment.asp?ID="+ID1, 350, 250, false, false);
				someWin.focus();
				someWin = null;
				break;
			case "CompanyComment":
				someWin = openWin(cmd, "CompanyComment.asp?CID="+ID1, 350, 250, false, false);
				someWin.focus();
				someWin = null;
				break;
			case "NewsComment":
				someWin = openWin(cmd, "NewsComment.asp?NID=" + ID1, 350, 250, false, false);
				someWin.focus();
				someWin = null;
				break;
			case "PopPicture":
				someWin = openWin(cmd, "/PopupPicture.asp?FLD="+ID1+"&ID="+ID2 , 500, 500, false, true,true);
				someWin.focus();
				someWin = null;
				break;
		}
	}
	
	function openWin(winName, urlLoc, w, h, showStatus, isViewer,isViewer2) {
		l = (screen.availWidth - w)/2;
		t = (screen.availHeight - h)/2;
		features  = "toolbar=no";      // yes|no 
		features += ",location=no";    // yes|no 
		features += ",directories=no"; // yes|no 
		features += ",status=" + (showStatus?"yes":"no");  // yes|no 
		features += ",menubar=no";     // yes|no 
		features += ",scrollbars=" + (isViewer2?"yes":"no");   // auto|yes|no 
		features += ",resizable=" + (isViewer?"yes":"no");   // yes|no 
		features += ",dependent";      // close the parent, close the popup, omit if you want otherwise 
		features += ",height=" + h;
		features += ",width=" + w;
		features += ",left=" + l;
		features += ",top=" + t;
		return window.open(urlLoc,winName,features);
	} 
