	var popWin   = null;
	var winCount = 0;
	var winName  = "popWin";
	var popUps=new Object();

	function openPopWin(winURL, winWidth, winHeight, moveX, moveY, winFeatures, sWinName){
	 	winName = "popWin" + winCount++;
		if (sWinName){
			winName = sWinName;
			winName = ReplaceBlank(winName);		
		}else{
			popWin = null;
			try {
	 			closePopWin();
			}
			catch(e){

			}	 			
		}
		
		if (winWidth!='')	winFeatures+=", width=" + winWidth;
		if (winHeight!='')	winFeatures+=", height=" + winHeight;
		if (moveX!='')		winFeatures+=", Left=" + moveX;
		if (moveY!='')		winFeatures+=", Top=" + moveY;
   		
	 	popWin = window.open(winURL, winName, winFeatures);
      	popWin.focus(true);

	 	popUps[winName]=popWin;
	}

	function closePopWin(){
		var winCount=null;  
		if (navigator.appName != "Microsoft Internet Explorer" || parseInt(navigator.appVersion) >=4) { //do not close if early IE
			
			if ((popWin != null) && (!popWin.closed)){
				popWin.close();
			}

			for (winCount in popUps ){
				if ( (popUps[winCount] != null) || (!popUps[winCount].closed) ){
					popUps[winCount].close();
					popUps[winCount]=null;
					delete popUps[winCount];
					delete popWin;					
					
				}
			}
					     
		}	 
	}
	
	function ReplaceBlank(str){
	   var sReplace = / /g;
	   var sResult = str.replace(sReplace , "_");
	   return(sResult);
	}

	
	function LargeImage(sImageName, str){
	    if (sImageName!= ''){
	    
	   	 openPopWin ('LargeImage.asp?n=' + escape(sImageName) + '&c=' + str,200,200,'','','toolbar=no,scrollbars=yes,location=no,frameborder=no,border=no,status=yes,menubar=no,resizable=yes,titlebar=no','ImageWindow')
	    }
	}


