var fen_name = new Array();
function CM_openBrWindow(theURL,winName,features,W,H) { //v2.0
	var wf = features; 
	if (window[winName] && !window[winName].closed){
  		window[winName].location.replace(theURL);
		window[winName].focus();
	}
	else{
        wf = wf + ",width=" + W; 
        wf = wf + ",height=" + H; 
		window[winName]=window.open(theURL,winName,wf);
		fen_name[fen_name.length++]=winName; 
	}
}

function CM_closeWindow(){
	var nwin = fen_name.length;
	for(var i=0;i<nwin;i++){
		if (window[fen_name[i]] && !window[fen_name[i]].closed){
			window[fen_name[i]].close();
			fen_name.length--;
		}
	}
}

