var newWin = null;
function closeWin(){
	if (newWin != null){
		if(newWin.closed) 
			var flag = false ;
		else
			var flag = true ;
	}
	else {
		var flag = false ;
	}
	
	return flag ;
}

function popUp(strURL,strType,strHeight,strWidth) {
	if(!closeWin()) {
		var strOptions="";
		if (strType=="console") strOptions="height="+strHeight+",width="+strWidth;
		if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
		if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
		newWin = window.open(strURL, 'newWin', strOptions);
		newWin.focus();
	}
}